Video - FFMPEG

Do., 03/11/2016 - 15:27
Body

Video size umcodieren

ffmpeg -i take2.mp4 -s 1920x1080 take2-fullhd.mp4 | ergibt schwarze balken

ffmpeg -i 1cd-kamera-tool-2.mp4 -aspect 16:9 -vf scale=1920:1080 1cd-kamera-tool-2-HD2.mp4 | besser

batch, ganzes folder mit allen videos

for f in *.mp4; do ffmpeg -i "$f" -aspect 16:9 -vf scale=1920:1080 "${f%.hd}.mp4"; done

https://trac.ffmpeg.org/wiki/Scaling%20(resizing)%20with%20ffmpeg

Audio aus einem Video entfernen

ffmpeg -i INPUT.mp4 -codec copy -an OUTPUT.mp4

Audio entfernen und neues Aduio hinzufügen

http://ochremusic.com/2016/07/05/replacing-video-audio-using-ffmpeg/

ffmpeg -i INPUT.mp4 -i AUDIO.wav -map 0:0 -map 1:0 -c:v copy -c:a aac -b:a 256k -shortest OUTPUT.mp4 ffmpeg -i VideoFile.mp4 -i AudioFile.mkv -acodec copy -vcodec copy -map 0:v -map 1:a Output.mkv ffmpeg -i input.mp4 -i input.aac -map 0:0 -map 1:0 -c:v copy -c:a copy output.mp4

Video speed

https://trac.ffmpeg.org/wiki/How%20to%20speed%20up%20/%20slow%20down%20a%20video 30 here is the speed 30 = 30x faster?  ffmpeg -i input.mkv -vf "setpts=(1/30)*PTS" output.mkv  ffmpeg -i montage-griff.MOV -vf "setpts=(1/30)*PTS" montage-griff-SPEEDUP.mp4 Batch

http://stackoverflow.com/questions/5784661/how-do-you-convert-an-entire-directory-with-ffmpeg

Slideshow/Video aus einem Bild

http://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images ffmpeg -framerate 24 -i img%03d.png output.mp4 %03d heißt, die Benennun gder bilder ist bild001 bild002 bild003

Videos verbinden

https://trac.ffmpeg.org/wiki/Concatenate

Um 180° drehen

ffmpeg -i in.mov -vf "transpose=2,transpose=2" out.mov

Video in frames zerlegen

ffmpeg -i comic-HD.MP4 -r 25/1 frames/comic-hd%03d.png

Recode video/Audio for Davinic Resolve in Linux

for f in *.avi; do ffmpeg -i "$f" -acodec pcm_s24le -vcodec libx264 "${f}.mov"; done;

Webm

https://trac.ffmpeg.org/wiki/Encode/VP8 Deshake/Video stabilisieren https://video.stackexchange.com/questions/19089/youtube-like-video-stabilization-on-linux

MP4 to gif

https://askubuntu.com/questions/648603/how-to-create-an-animated-gif-from-mp4-video-via-command-line

convert macht irgendwie viel zu große Dateien, ffmpeg erzeugt ein gif das wirklich die Größe der inputfiles hat. wtf?

ffmpeg -i %03d.png output.gif

 

split gif 

ffmpeg -i file.gif -vsync 0 path/output$03d.png mogrify -format jpg -quality 100 *.png
Tagging
Add new comment
The content of this field is kept private and will not be shown publicly.

Plain text

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <drupal-entity data-*>
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.