Ffmpeg video converter: Difference between revisions

From Edgar BV Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 15: Line 15:


ffmpeg -y -i hoogenboom/reclame_onderhoud.avi -vcodec msmpeg4 -vtag MP43 -qscale 2 -s 1280x576 -aspect 20:9 -an reclame_onderhoud.wmv
ffmpeg -y -i hoogenboom/reclame_onderhoud.avi -vcodec msmpeg4 -vtag MP43 -qscale 2 -s 1280x576 -aspect 20:9 -an reclame_onderhoud.wmv
== Output naar flash / flv ==


ffmpeg -i input.mp4 -b:v 583000 -ar 44100 -qscale 2 output.flv
ffmpeg -i input.mp4 -b:v 583000 -ar 44100 -qscale 2 output.flv


(-b:v = video bitrate, -ar = audio bitrate, has to be one of a few possible values - you get these values from ffmpeg -i inputfile )  
(-b:v = video bitrate, -ar = audio bitrate, has to be one of a few possible values - you get these values from ffmpeg -i inputfile )  
== Omzetten naar .TP ==
ffmpeg -i inputfile -vcodec copy -acodec copy output.ts
rename .ts -> .tp
== Meerdere video's ==


Bij omzetten van meerdere video's is het zetten van een batch variabele handig:
Bij omzetten van meerdere video's is het zetten van een batch variabele handig:

Revision as of 13:02, 20 February 2012

Ro find out the video bitrate of a movie, do ffmpeg -i inputfile

Then you can use -b bitrate option to set the output bitrate in order to not lose quality. The -qscale 3 option also ensures a highter quality (nb if possible use -qscale 2 though)

Command lines

ffmpeg -y -i cb_d3_6.mpg -vcodec h264 -me_method full -b 700k -rc_max_rate 768 -an test.mp4

ffmpeg -y -i hoogenboom/reclame_golf.avi -vcodec libx264 -me_method full -b 700k -an test.mp4

ffmpeg -y -i hoogenboom/reclame_golf.avi -vcodec libx264 -me_method full -qscale 2 -s 1280x576 -aspect 20:9 -an reclame_golf.mp4

ffmpeg -y -i hoogenboom/reclame_onderhoud.avi -vcodec libx264 -me_method full -qscale 2 -s 1280x576 -aspect 20:9 -an reclame_onderhoud.mp4

ffmpeg -y -i hoogenboom/reclame_onderhoud.avi -vcodec msmpeg4 -vtag MP43 -qscale 2 -s 1280x576 -aspect 20:9 -an reclame_onderhoud.wmv

Output naar flash / flv

ffmpeg -i input.mp4 -b:v 583000 -ar 44100 -qscale 2 output.flv

(-b:v = video bitrate, -ar = audio bitrate, has to be one of a few possible values - you get these values from ffmpeg -i inputfile )

Omzetten naar .TP

ffmpeg -i inputfile -vcodec copy -acodec copy output.ts

rename .ts -> .tp

Meerdere video's

Bij omzetten van meerdere video's is het zetten van een batch variabele handig:

set params= -an -vcodec rawvideo -y  -s 1920x1080
ffmpeg.exe -i "G:\Cheil\20110804 Gateway video\aangeleverd\Hub_SmartTV_nl.mp4" %params% "G:\Cheil\20110804 Gateway 


Veelgebruikte regels

Samsung WMV 2 ( voor schone XP installaties zonder codecs:)

set params= -vcodec wmv2 -qscale 2 -an -y 


Omzetten naar raw video 1080p voor gebruik in editor (levert grote bestanden op!)

-vcodec rawvideo -y -s 1920x1080


High quality h264 mp4 bestanden

ffmpeg.exe -i "input.avi" -vcodec libx264 -b 6000k -g 200 -y "output.mp4"

Roteren

The MAN page for ffmpeg states the following use ffmpeg -i inputfile.mpg -vf "transpose=1" outputfile.mpg


The key being that you are not to use a degree variable, but a predefined setting variable from the MAN page.


0=90CounterCLockwise and Vertical Flip (default)

1=90Clockwise

2=90CounterClockwise

3=90Clockwise and Vertical Flip


Scalen

ffmpeg -i yoursourcefile -s 640x480 youroutputfile


Croppen

ffmpeg -i inputfile -fv crop=1280:752 -qscale 2 outputfile

Waar crop=1280:752 het gewenste outputformaat is en qscale de qualiteit behoudt. Zo werkt het croppen van het midden.