Benutzer-Werkzeuge

Webseiten-Werkzeuge


ffmpeg

ffmpeg

ffmpeg documentation

Convert an AVCHD / MTS file to MP4 using ffmpeg

ffmpeg -i 00031.MTS -s 480x320 -b:v 4000k 00031.MP4

Video in gif umwandeln

mkdir frames
ffmpeg -i input.mp4 -vf scale=320:-1:flags=lanczos,fps=10 frames/ffout%03d.png
convert -loop 0 frames/ffout*.png output.gif

Mit ffmpeg Videos erstellen

https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images

ffmpeg -r 0.2 -start_number 410 -f image2 -i Peer%03d.jpg -vcodec libx264 output2.mp4

Mit ffmpeg Zeitraffervideos erstellen

s=30;i=1;while true; do ffmpeg -f video4linux2 -s 1280x720 -r 1 -i /dev/video0 -vframes 1 -f image2 pic`printf %05d $i`.jpg;i=$(($i+1));sleep $s;done
ffmpeg -r 10 -f image2 -i pic%5d.jpg -c:v libx264 -r 25 -pix_fmt yuv420p zeitraffer.mp4

http://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images

ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4

http://demaya.de/wp/2010/08/mit-ffmpeg-zeitraffervideos-erstellen/

s=10;i=1;while [ $i -lt 5 ]; do ffmpeg -f video4linux2 -s 640x480 -r 1 -i /dev/video0 -vframes 1 -f image2 pic`printf %05d $i`.jpg;i=$(($i+1));sleep $s;done  

FFmpeg Howto
FFmpeg Documentation
ffmpeg commands for all needs
Videohokuspokus mit ffmpeg
Converting video in linux using ffmpeg and mencoder
ffmpeg: some useful tricks
http://www.unitedhome.de/wikka.php?wakka=WebCam

mp4 -> flv

ffmpeg -i 2012-07_tourenwoche.mp4 -vcodec libx264 -threads 0 -qscale 4 -s 640x360 -f flv 2012-07_tourenwoche_qscale4.flv
-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst quality)

rm -> avi

midi -> mp3

timidity -Ow ./file-to-play.midi
ffmpeg -i ./file-to-play.wav ./file-to-play.mp3

1:1 Umwandeln von einem Format in ein anderes

ffmpeg -formats
ffmpeg -i /pfad/quelle.avi /pfad/ziel.mpg
ffmpeg -i 00009.mts -ar 22050 -ab 128k -aspect 16:9 -b 800k -f flv -s 480x270 00009.flv

MTS -> mp3

ffmpeg -i video.MTS -ac 2 audio.mp3

MTS -> mp4

ffmpeg -i 00000.MTS -vcodec mpeg4 -b:v 15M -acodec libmp3lame -b:a 192k 00000.mp4
for i in *.MTS; do ffmpeg -i "$i" -vcodec mpeg4 -b:v 15M -acodec libmp3lame -b:a 192k "$i.mp4"; done
for i in *.MTS; do ffmpeg -i "$i" -vcodec mpeg4 -b:v 15M -acodec libmp3lame -b:a 192k "$i.mp4"; NEWNAME=`echo $i | cut -d "." -f1`; mv "$i.mp4" "$NEWNAME.mp4";done

mpeg -> dv

ffmpeg -i 1.mpeg -y -hq -s pal -r pal -target dv /video/trial.dv
ffmpeg -i name.mpeg -y -s pal -r pal -ac 2 -ar 48000 name.dv

3GP to AVI

ffmpeg -i clip.3gp -f avi -vcodec xvid -acodec mp3 -ar 22050 file.avi

mp4 to avi

ffmpeg -i name.mp4 -acodec libmp3lame -ab 128k -vcodec libxvid -b 800k name.avi

YouTube Videos oder andere Flash-Videos in 3gp für zB Nokia Handy umwandeln

ffmpeg -i /pfad/quelle.flv -s 176x144 -acodec libmp3lame /pfad/ziel.3gp 
  • link (-an = ohne Ton)

avi-File in flv-File umwandeln

ffmpeg -i falsecreek010.avi -ab 64000 -ar 11025 -f flv -s 480x270 -b 900k -aspect 16:9 falsecreek900.flv
ffmpeg -i name.avi -ar 22050 -ab 32 -f flv -s 320x240 name.flv
ffmpeg -i test001.avi -ar 44100 -ab 64000 -f flv -s 320x240 -sameq test001.flv
ffmpeg -i test.avi -ar 44100 -ab 64000 -f flv -s 360x216 -sameq test.flv

MOV -> AVI

ffmpeg -i dscn6914.mov -sameq -vcodec msmpeg4v2 -acodec pcm_u8 dscn6914.avi

MP3 > AAC

ffmpeg -i source.mp3 -acodec libfaac -ab 128k dest.aac

WMA > mp3

for i in *.wma; do ffmpeg -i "$i" -ab 128k "$i.mp3"; NEWNAME=`echo $i | cut -d "." -f1`; mv "$i.mp3" "$NEWNAME.mp3"; done

*.trp

  • trp file is a MPEG-TS file with H.264 video stream
avconv -i aufnahme01.trp -y -s pal -r pal -ac 2 -ar 48000 aufnahme01.dv
avconv -i input.trp -vcodec copy -acodec copy -f mp4 output.mp4

Film drehen um 90°

mencoder -oac copy -ovc lavc -vf rotate=1 original.mp4 -o 90_CW_rotated.mp4

ffmpeg -vf "transpose=1" -i input.mp4 output.mp4

YouTube Video -> mp3

ffmpeg -i video.flv -vn -ar 44100 -ac 2 -ab 192k -f mp3 audio.mp3

YouTube Video mp4 -> mp3

ffmpeg -i video.mp4 -vn -ar 44100 -ac 2 -ab 192k -f mp3 audio.mp3

VOB -> mp4

ffmpeg -i VTS_01_1.VOB -aspect 16:9 -acodec libmp3lame -ab 128k video.mp4
Immerhin! BTW, man findet mit "arecord -l" fürs Aufnehmen bzw. "aplay -l" 
fürs Abspielen recht leicht die passende Nummern hinter "hw:" heraus. Die 
erste Zahl ist die Karte, die zweite das Gerät, jedenfalls in der deutschen 
Ausgabe. In /dev/snd/ sind das dann im Fall von hw:0,0 pcmC0D0c fürs 
Aufnehmen und pcmC0D0p fürs Abspielen (C für Card, D für Device und c für 
Capture bzw. p für Playback).

wmv -> mp4

ffmpeg -i input.wmv -c:v libx264 -crf 23 -c:a libfaac -q:a 100 output.mp4

Mit VLC: Medien > Konvertieren/Speichern > Datei > Dateiauswahl > Hinzufügen > input.wmv > [x] Mehr Optionen aneigen > Konvertieren/Speichern > Konvertieren > Profil: Video -H.264 + MP3 (MP4) > Zieldatei > output.mp4 > Start

wav -> mp3

ffmpeg -i audio.wav -acodec libmp3lame audio.mp3
ffmpeg.txt · Zuletzt geändert: 2022/08/30 14:06 von admin