[FFmpeg-user] 50 Mbps Ifram mpg2 with scaling and pad --sync problem

Dave P lists.davep at gmail.com
Mon Aug 5 15:58:08 CEST 2013


On Aug 5, 2013 9:11 AM, "Jim Shupert" <jshupert at pps-inc.com> wrote:
>
>
> On 8/2/2013 12:46 PM, Jim Shupert, Jr wrote:
>>
>> Friends,
>> I wish to take 720x486 Unc 8 bit rawVideo with 2 chn  pcm audio
>> and make 50 mbps Iframe mpg2 422 1920x1080i with mpg2 audio
>>
>> I realize that upScaling is not best - but I do need to in this
situation.
>>
>> I have something that I think is close but the audio goes out of sync.
>> I wonder why?
>>
>> You will see I have my buffer set rather high - i did that to avoid
>> ...
>> [mpeg @ 0x307afa0] buffer underflow i=0 bufi=354801 size=358510
>> [mpeg @ 0x307afa0] packet too large, ignoring buffer limits to mux it
>> [mpeg @ 0x307afa0] buffer underflow i=0 bufi=354801 size=358510
>> ...
>>
>> here is my command
>>
>> jj at gagarin:~$ ffmpeg -i /media/data/z_parts/dog.avi -vf
>> "scale=1620:1080,pad=1920:1080:150:0:black"  -pix_fmt yuv422p -c:v
>> mpeg2video  -minrate 50000k -maxrate 50000k -b:v 50000k -intra -flags
>> +ildct+low_delay -g 1  -dc 10  -ps 1 -qmin 1 -qmax 3 -top 1  -bufsize
>> 5000000 -rc_init_occupancy 2000000 -rc_buf_aggressivity 0.25  -c:a mp2
>> -async 1 -b:a 224k -ar 48000 -ac 2    /media/data/jtest/dog-3a_1080i.mpg
>>
>> jj at gagarin:~$ ffmpeg -i /media/data/z_parts/dog.avi -vf
>> "scale=1620:1080,pad=1920:1080:150:0:black"  -pix_fmt yuv422p -c:v
>> mpeg2video  -minrate 50000k -maxrate 50000k -b:v 50000k -intra -flags
>> +ildct+low_delay -g 1  -dc 10  -ps 1 -qmin 1 -qmax 3 -top 1  -bufsize
>> 5000000 -rc_init_occupancy 2000000 -rc_buf_aggressivity 0.25  -c:a mp2
>> -async 1 -b:a 224k -ar 48000 -ac 2    /media/data/jtest/dog-3a_1080i.mpg
>> ffmpeg version git-2012-09-24-fd63c2f Copyright (c) 2000-2012 the FFmpeg
>> developers
>>    built on Sep 24 2012 14:09:13 with gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
>>    configuration: --enable-gpl --enable-libfaac --enable-libmp3lame
>> --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora
>> --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree
>> --enable-version3 --enable-x11grab
>>    libavutil      51. 73.101 / 51. 73.101
>>    libavcodec     54. 58.100 / 54. 58.100
>>    libavformat    54. 28.101 / 54. 28.101
>>    libavdevice    54.  2.101 / 54.  2.101
>>    libavfilter     3. 17.100 /  3. 17.100
>>    libswscale      2.  1.101 /  2.  1.101
>>    libswresample   0. 15.100 /  0. 15.100
>>    libpostproc    52.  0.100 / 52.  0.100
>> [avi @ 0x28b5240] non-interleaved AVI
>> Guessed Channel Layout for  Input Stream #0.1 : stereo
>> Input #0, avi, from '/media/data/z_parts/dog.avi':
>>    Duration: 00:00:05.03, start: 0.000000, bitrate: 170941 kb/s
>>      Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 720x486,
>> 29.97 tbr, 29.97 tbn, 29.97 tbc
>>      Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz,
>> stereo, s16, 1536 kb/s
>> File '/media/data/jtest/dog-3a_1080i.mpg' already exists. Overwrite ?
[y/N] y
>> -async is forwarded to lavfi similarly to -af
>> aresample=min_comp=0.001:min_hard_comp=0.100000.
>> Output #0, mpeg, to '/media/data/jtest/dog-3a_1080i.mpg':
>>    Metadata:
>>      encoder         : Lavf54.28.101
>>      Stream #0:0: Video: mpeg2video, yuv422p, 1920x1080, q=1-3, 50000
kb/s,
>> 90k tbn, 29.97 tbc
>>      Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 224 kb/s
>> Stream mapping:
>>    Stream #0:0 -> #0:0 (rawvideo -> mpeg2video)
>>    Stream #0:1 -> #0:1 (pcm_s16le -> mp2)
>> Press [q] to stop, [?] for help
>> [mpeg2video @ 0x28b6800] rc buffer underflow
>>      Last message repeated 24 times
>> frame=   25 fps=0.0 q=24.8 size=    6190kB time=00:00:00.83
>> bitrate=60789.4kbitsrc buffer underflow
>> [mpeg2video @ 0x28b6800] rc buffer underflow
>>
> Maybe I could ask another way..
> what might be the suggested means to scale raw video , uncompressed d1
720x486 ntsc w pcm audio to 50 Mbps I fram mpg2.
> I am scaling and padding . My audio comes out of sync.
> Likely this is unrelated to the scaling and padding - but maybe not.
> and
> Does anyone have an opinion on buffer setting?

Try .ts or .m2t instead of .mpg


More information about the ffmpeg-user mailing list