Benutzer-Werkzeuge

Webseiten-Werkzeuge


linux:allgemein:ffmpeg

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
linux:allgemein:ffmpeg [31.10.2018 19:24]
marc
— (aktuell)
Zeile 1: Zeile 1:
-====== FFMPEG ====== 
- 
-===== Konvertieren ===== 
- 
- 
-  $ ffmpeg -i input.avi output.mp4 
- 
- 
-  $ ffmpeg -i input.avi -c:v libx265 -crf 23 output.mp4 
- 
- 
-==== Mergen / Zusammenführen ==== 
- 
-  $ ffmpeg -i "concat:input1.mpg|input2.mpg|input3.mpg" -c copy output.mpg 
- 
-==== Zeitlich schneiden ==== 
- 
-  $ ffmpeg -i input.mp4 -ss 00:03:15 -t 05:16:50 output.mp4 
- 
-[HH:]MM:SS[.m...] 
- 
- 
-==== oben und unten 350 px wegschneiden ==== 
- 
-  $ ffmpeg -i input.mp4 -filter:v "crop=in_w:in_h-700" output.mp4 
- 
- 
-==== Gescheindigkeit Faktor 1/2 (halbiert) ==== 
- 
-  $ ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" output.mp4 
- 
- 
-==== Automatisiertes Konvertieren ==== 
- 
-This is a typical scenario for find and xargs: 
- 
-  $ find /path/to/basedir -name '*.avi' -print0 | xargs -0 convert.sh 
- 
-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: 
- 
-<code> 
-#!/bin/bash 
- 
-for i; do 
-        d=$(dirname "$i") 
-#       b=$(basename "$i" | cut -d. -f1) 
-        FILE=(basename "$i") 
-        b=${FILE%.*} 
-        ffmpeg -i "$i"  "$d/$b.mp4" 
-#        ffmpeg -i "$i" -c:v libx265 -crf 23 -c:a copy "$d/X265_$b" 
-done 
-</code> 
- 
-for i without anything means the same as "for all arguments given", which are the files passed by xargs. 
- 
-To prepend the filename with a string, you must split the name into the directory and base part, and then put it together again. 
- 
  
linux/allgemein/ffmpeg.1541010256.txt.gz · Zuletzt geändert: 31.10.2018 19:24 von marc