View Full Version : ffmpeg Command Lines
Fishman0919
24th January 2013, 07:14
I started this thread so people can share some ffmpeg Command Lines that work well for them... and so other can maybe help to improve them
Here's a nice all around command line I use for MPEG2 encoding. Change # to what you need
ffmpeg.exe -i "####.avs" -framerate 23.976 -aspect 16:9 -dc # -g 12 -maxrate 7500k -q:v 2 -b_strategy 2 -brd_scale 2 -bf 2 -profile:v 4 -pass 1 -passlogfile ffmpeg -an -f mpeg2video pass1.m2v
ffmpeg.exe -i "####.avs" -framerate 23.976 -aspect 16:9 -dc # -g 12 -lmin 0.01 -mblmin 1 -qmin 1 -qmax 31 -maxrate 7500k -b:v ####k -bf 2 -pre_dia_size 3 -dia_size 3 -qcomp 0.7 -qblur 0 -preme 2 -me_method dia -sc_threshold 0 -sc_factor 4 -bidir_refine 4 -profile:v 4 -mbcmp satd -precmp satd -cmp satd -subcmp satd -skipcmp satd -pass 2 -passlogfile ffmpeg -an -f mpeg2video pass2.m2v
joolzg
24th January 2013, 09:47
Thats weird, i was just going to ask if anybody had got ffmprg with x262, i cannot encoder either mpeg2 or h264 when running ffmpeg and x262.
My problem is as follows, from this command line
./ffmpeg -i ../testStreams/Pil.avi -preset faster -vcodec libx264 -x264opts bitrate=1000:vbv-bufsize=2000 -s 720x576 -acodec mp2 -y -f mpegts a.ts
i get
ffmpeg version N-47348-g0ee0746 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 15 2013 16:48:10 with gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264
libavutil 52. 10.100 / 52. 10.100
libavcodec 54. 78.100 / 54. 78.100
libavformat 54. 41.100 / 54. 41.100
libavdevice 54. 3.101 / 54. 3.101
libavfilter 3. 23.105 / 3. 23.105
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.101 / 0. 17.101
libpostproc 52. 2.100 / 52. 2.100
[mp3 @ 0x2634300] Header missing
[mpeg4 @ 0x2633740] Invalid and inefficient vfw-avi packed B frames detected
Input #0, avi, from '../testStreams/Pil.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:56:37.00, start: 0.000000, bitrate: 1358 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 32 kb/s
x264 [warning]: VBV maxrate unspecified, assuming CBR
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [warning]: bitrate tolerance too small, using .01
x264 [info]: profile High, level 3.0
Output #0, mpegts, to 'a.ts':
Metadata:
encoder : Lavf54.41.100
Stream #0:0: Video: h264, yuv420p, 720x576 [SAR 78:55 DAR 39:22], q=-1--1, 21 kb/s, 90k tbn, 25 tbc
Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> libx264)
Stream #0:1 -> #0:1 (mp3 -> mp2)
Press [q] to stop, [?] for help
[mp3 @ 0x2634300] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[mpeg4 @ 0x3042ea0] Invalid and inefficient vfw-avi packed B frames detected
x264 [error]: Invalid input colorspace
Video encoding failed
This is the same for mpeg2 and h264
Any ideas?
joolz
Fishman0919
24th January 2013, 12:56
Thats weird, i was just going to ask if anybody had got ffmprg with x262, i cannot encoder either mpeg2 or h264 when running ffmpeg and x262.
My problem is as follows, from this command line
./ffmpeg -i ../testStreams/Pil.avi -preset faster -vcodec libx264 -x264opts bitrate=1000:vbv-bufsize=2000 -s 720x576 -acodec mp2 -y -f mpegts a.ts
i get
ffmpeg version N-47348-g0ee0746 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 15 2013 16:48:10 with gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libx264
libavutil 52. 10.100 / 52. 10.100
libavcodec 54. 78.100 / 54. 78.100
libavformat 54. 41.100 / 54. 41.100
libavdevice 54. 3.101 / 54. 3.101
libavfilter 3. 23.105 / 3. 23.105
libswscale 2. 1.103 / 2. 1.103
libswresample 0. 17.101 / 0. 17.101
libpostproc 52. 2.100 / 52. 2.100
[mp3 @ 0x2634300] Header missing
[mpeg4 @ 0x2633740] Invalid and inefficient vfw-avi packed B frames detected
Input #0, avi, from '../testStreams/Pil.avi':
Metadata:
encoder : Nandub v1.0rc2
Duration: 00:56:37.00, start: 0.000000, bitrate: 1358 kb/s
Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 624x352 [SAR 1:1 DAR 39:22], 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 32 kb/s
x264 [warning]: VBV maxrate unspecified, assuming CBR
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [warning]: bitrate tolerance too small, using .01
x264 [info]: profile High, level 3.0
Output #0, mpegts, to 'a.ts':
Metadata:
encoder : Lavf54.41.100
Stream #0:0: Video: h264, yuv420p, 720x576 [SAR 78:55 DAR 39:22], q=-1--1, 21 kb/s, 90k tbn, 25 tbc
Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mpeg4 -> libx264)
Stream #0:1 -> #0:1 (mp3 -> mp2)
Press [q] to stop, [?] for help
[mp3 @ 0x2634300] Header missing
Error while decoding stream #0:1: Invalid data found when processing input
[mpeg4 @ 0x3042ea0] Invalid and inefficient vfw-avi packed B frames detected
x264 [error]: Invalid input colorspace
Video encoding failed
This is the same for mpeg2 and h264
Any ideas?
joolz
Really not the idea I was hoping for of this thread.
...But it looks like ffmpeg can't decode your input file. Maybe a bad file or corrupt.
joolzg
25th January 2013, 10:36
well thats the weird thing, this was just a copy of one of the non working, i cant get any to work. Even live streams which is my end goal
and this file is one of my test files ive been using for testing x264 for the last year and never had an encoding problem with x264 on this, just x262 in x264 mode
ill try some more
joolz
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.