[FFmpeg-user] IMX50 NTSC framesize differs to the SMPTE 356M-2001 Standard - why?
Christoph Gerstbauer
christophgerstbauer at gmail.com
Mon Jun 8 16:19:09 CEST 2015
Am 02.06.2015 um 08:19 schrieb tim nicholson:
> On 01/06/15 19:53, Michael Niedermayer wrote:
>> On Mon, Jun 01, 2015 at 04:43:12PM +0200, Christoph Gerstbauer wrote:
>>> Hello
>>>
>>> I am testing the standard "conformness" of ffmpegs IMX50 (Mpeg2
>>> I-frame, MXF) encoder.
>>>
>>> I mentioned via ffprobe or via encoding that ffmpeg does encode a
>>> NTSC framesize of: "208542".
>>> But the SMPTE Standard 356M-2001 specifies this vlaue with "208541".
>>> For PAL there is no problem, both framesizes are "250000".
>>>
>>> So at the encoding params I have to set the following:
>>>
>>> -bufsize 2000000 (set ratecontrol buffer size (in bits))
>>> SMPTE for PAL: max coded frame size = 250,000 BYTES = 2000000 bits
>>> SMPTE for NTSC: max codec frame size = 208,541 BYTES = 1668328 bits
>>> -rc_init_occupancy 2000000 (number of bits which should be loaded
>>> into the rc buffer before decoding starts)
>>> SMPTE for PAL: max coded frame size = 250,000 BYTES = 2000000 bits
>>> SMPTE for NTSC: max codec frame size = 208,541 BYTES = 1668328 bits
>>>
>>> But at the NTSC encoding I get get there errors:
>>>
>>> C:\Users\gersti>ffmpegnew -i "C:\Users\gersti\D-10_NTSC.mxf" -map
>>> 0:v -map 0:a -c:v mpeg2video -r 30000/1001 -pix_fmt yuv422p -aspect
>>> 4:3 -minr
>>> ate 50000k -maxrate 50000k -b:v 50000k -g 1 -flags
>> yes, this happens because 50mbit/sec is not correct
>> a max framesize of 208541 results in a bit rate of max
>> 49.999840 mbit/sec, IIUC thats what the spec means by 50mbit/sec
> The spec actually says "Up to 50Mb/s" and "Up to 208541" that being the
> highest value that comes out below the the 50Mb/s. So I tend to agree
> with Michael.
>
>> check yourself: 208541 * 8 * 30000/1001
>>
>>
>> [...]
>>
>>
Hello Michael, hello Tim!
I have still a little problem with IMX40 with NTSC:
I need to set the paketsize (framesize) at IMX40 NTSC to 166833bits.
For that I need a bitrate of: 39999920
FFmpeg fails because this bitrate is not allowed for IMX40. For IMX50
the bitrate "49999840" is allowed.
Is it possible to implement this bitrate (39999920) to the allowed
bitrate values at the IMX40 NTSC encoding?
Command Line output:
C:\Users\gersti>ffmpegnew -i C:\NTSC_IMX50.mxf -map 0:v -map 0:a -c:v
mpeg2video -s 720x512 -r 30000/1001 -pix_
fmt yuv422p -aspect 4:3 -minrate 39999920 -maxrate 39999920 -b:v
39999920 -g 1 -flags +ildct+ilme+low_delay -intra_vlc 1
-non_linear_quant 1 -ps 1 -qmin 1 -qmax 5 -top 1 -dc 10 -bufsize 1334667
-rc_init_occupancy 1334667 -rc_max_vbv_use 1 -rc_min_vbv_use 1 -c:a
pcm_s16le -ar 48000 -ac 8 -f mxf_d10 -timecode 12:34:56;11 C:\NTSC_IMX40.mxf
ffmpeg version N-72734-g5cf84e5 Copyright (c) 2000-2015 the FFmpeg
developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libdcadec
--enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
--enable-libmodplug --enable-libmfx --enable-libmp3lame
--enable-libopencore-amrnb --enablelibopencore-amrwb
--enable-libopenjpeg --enable-libopus --enable-librtmp
--enable-libschroedinger --enable-libsoxr --enable-libspeex
--enable-libtheora --enable-libtwolame --enable-libvidstab
--enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma
--enable-decklink --enable-zlib
libavutil 54. 27.100 / 54. 27.100
libavcodec 56. 41.100 / 56. 41.100
libavformat 56. 35.101 / 56. 35.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 16.101 / 5. 16.101
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.100 / 1. 2.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.1 : 7.1
Input #0, mxf, from 'C:\NTSC_IMX50.mxf':
Metadata:
uid : adab4424-2f25-4dc7-92ff-29bd000c0000
generation_uid : adab4424-2f25-4dc7-92ff-29bd000c0001
company_name : FFmpeg
product_name : OP1a Muxer
product_version : 56.35.101
product_uid : adab4424-2f25-4dc7-92ff-29bd000c0002
modification_date: 0000-01-01 00:00:00
material_package_umid:
0x060A2B340101010501010D0013E488BB5294713438E488BB005294713438E400
timecode : 12:34:56;11
Duration: 00:03:28.41, start: 0.000000, bitrate: 62605 kb/s
Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv), 720x512 [SAR
128:135 DAR 4:3], 50000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
Metadata:
file_package_umid:
0x060A2B340101010501010D0013E488BB5294713438E488BB005294713438E401
Stream #0:1: Audio: pcm_s16le, 48000 Hz, 8 channels, s16, 6144 kb/s
Metadata:
file_package_umid:
0x060A2B340101010501010D0013E488BB5294713438E488BB005294713438E401
[mxf_d10 @ 0000000004d858c0] error MXF D-10 only support 30/40/50 mbit/s
Output #0, mxf_d10, to 'C:\NTSC_IMX40.mxf':
Metadata:
uid : adab4424-2f25-4dc7-92ff-29bd000c0000
generation_uid : adab4424-2f25-4dc7-92ff-29bd000c0001
company_name : FFmpeg
product_name : OP1a Muxer
product_version : 56.35.101
product_uid : adab4424-2f25-4dc7-92ff-29bd000c0002
modification_date: 0000-01-01 00:00:00
material_package_umid:
0x060A2B340101010501010D0013E488BB5294713438E488BB005294713438E400
timecode : 12:34:56;11
encoder : Lavf56.35.101
Stream #0:0: Video: mpeg2video, yuv422p, 720x512 [SAR 128:135 DAR
4:3], q=1-5, 39999 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc
Metadata:
file_package_umid:
0x060A2B340101010501010D0013E488BB5294713438E488BB005294713438E401
encoder : Lavc56.41.100 mpeg2video
Stream #0:1: Audio: pcm_s16le, 48000 Hz, 7.1, s16, 6144 kb/s
Metadata:
file_package_umid:
0x060A2B340101010501010D0013E488BB5294713438E488BB005294713438E401
encoder : Lavc56.41.100 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg2video (native))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native))
Could not write header for output file #0 (incorrect codec parameters
?): Error number -1 occurred
Best Regards
Christoph
More information about the ffmpeg-user
mailing list