Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
|
linux:allgemein:ffmpeg [25.01.2017 15:44] marc [Konvertieren] |
— (aktuell) | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== FFMPEG ====== | ||
| - | |||
| - | ===== Konvertieren ===== | ||
| - | |||
| - | |||
| - | $ ffmpeg -i input.avi output.mp4 | ||
| - | |||
| - | |||
| - | $ ffmpeg -i input.avi -c:v libx265 output.mp4 | ||
| - | ==== Mergen / Zusammenführen ==== | ||
| - | |||
| - | $ ffmpeg -i " | ||
| - | |||
| - | ==== 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 " | ||
| - | b=$(basename " | ||
| - | 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. | ||
| - | |||