Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | |||
|
linux:allgemein:ffmpeg [24.02.2020 18:44] marc gelöscht |
— (aktuell) | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== FFMPEG ====== | ||
| - | |||
| - | ===== Konvertieren ===== | ||
| - | |||
| - | |||
| - | $ ffmpeg -i input.avi output.mp4 | ||
| - | |||
| - | |||
| - | $ ffmpeg -i input.avi -c:v libx264 -crf 23 output.mp4 | ||
| - | |||
| - | |||
| - | $ ffmpeg -i input.avi -c:v libx265 -crf 28 output.mp4 | ||
| - | ==== Mergen / Zusammenführen ==== | ||
| - | |||
| - | $ ffmpeg -i " | ||
| - | |||
| - | ==== Zeitlich schneiden ==== | ||
| - | |||
| - | $ ffmpeg -i input.mp4 -ss 00:03:15 -t 05:16:50 output.mp4 | ||
| - | |||
| - | [HH: | ||
| - | |||
| - | |||
| - | ==== oben und unten 350 px wegschneiden ==== | ||
| - | |||
| - | $ ffmpeg -i input.mp4 -filter:v " | ||
| - | |||
| - | |||
| - | ==== Geschwindigkeit Faktor 1/2 (halbiert) ==== | ||
| - | |||
| - | $ ffmpeg -i input.mp4 -filter_complex " | ||
| - | |||
| - | |||
| - | ==== Automatisiertes Konvertieren ==== | ||
| - | |||
| - | This is a typical scenario for find and xargs: | ||
| - | |||
| - | $ find / | ||
| - | |||
| - | where -print0 and -0 ensure the proper handling of names with spaces. | ||
| - | |||
| - | And in convert.sh, you have your for loop, almost the same as in your first script: | ||
| - | |||
| - | < | ||
| - | #!/bin/bash | ||
| - | |||
| - | for i; do | ||
| - | d=$(dirname " | ||
| - | # | ||
| - | FILE=(basename " | ||
| - | b=${FILE%.*} | ||
| - | ffmpeg -i " | ||
| - | # ffmpeg -i " | ||
| - | done | ||
| - | </ | ||
| - | |||
| - | for i without anything means the same as "for all arguments given", | ||
| - | |||
| - | To prepend the filename with a string, you must split the name into the directory and base part, and then put it together again. | ||
| - | |||