[FFmpeg-user] IMX50 NTSC framesize differs to the SMPTE 356M-2001 Standard - why?
Christoph Gerstbauer
christophgerstbauer at gmail.com
Mon Jun 1 16:43:12 CEST 2015
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 +ildct+ilme+low_delay
-intra_vlc 1 -non_linear_quant 1 -ps 1 -qmin 1 -qmax 3 -top 1 -dc 10
-bufsize 1668328 -rc_init_occupancy 1668328 -rc_max_vbv_us
e 1 -rc_min_vbv_use 1 -c:a pcm_s16le -ar 48000 -f mxf_d10 -timecode
12:34:56;11 "C:\Users\gersti\D-10_NTSC_test.mxf"
ffmpeg version N-71727-g46778ab 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-libblu
ray --enable-libbs2b --enable-libcaca --enable-libdcadec
--enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --ena
ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Guessed Channel Layout for Input Stream #0.1 : 7.1
Input #0, mxf, from 'C:\Users\gersti\D-10_NTSC.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.31.100
product_uid : adab4424-2f25-4dc7-92ff-29bd000c0002
modification_date: 0000-01-01 00:00:00
material_package_umid:
0x060A2B340101010501010D0013B730C15294713452B730C1005294713452B700
timecode : 12:34:56;11
Duration: 00:00:05.01, start: 0.000000, bitrate: 62603 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:
0x060A2B340101010501010D0013B730C15294713452B730C1005294713452B701
Stream #0:1: Audio: pcm_s16le, 48000 Hz, 8 channels, s16, 6144 kb/s
Metadata:
file_package_umid:
0x060A2B340101010501010D0013B730C15294713452B730C1005294713452B701
File 'C:\Users\gersti\D-10_NTSC_test.mxf' already exists. Overwrite ?
[y/N] y
[mpeg2video @ 00000000058f2680] VBV buffer too small for bitrate
Output #0, mxf_d10, to 'C:\Users\gersti\D-10_NTSC_test.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.31.100
product_uid : adab4424-2f25-4dc7-92ff-29bd000c0002
modification_date: 0000-01-01 00:00:00
material_package_umid:
0x060A2B340101010501010D0013B730C15294713452B730C1005294713452B700
timecode : 12:34:56;11
Stream #0:0: Video: mpeg2video, none, q=2-31, 128 kb/s, SAR 128:135
DAR 0:0, 29.97 fps
Metadata:
file_package_umid:
0x060A2B340101010501010D0013B730C15294713452B730C1005294713452B701
encoder : Lavc56.35.101 mpeg2video
Stream #0:1: Audio: pcm_s16le, 0 channels
Metadata:
file_package_umid:
0x060A2B340101010501010D0013B730C15294713452B730C1005294713452B701
encoder : Lavc56.35.101 pcm_s16le
Stream mapping:
Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg2video (native))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native))
Error while opening encoder for output stream #0:0 - maybe incorrect
parameters such as bit_rate, rate, width or height
After this error I set the framesize to: 208542
--> -bufsize 1668336 -rc_init_occupancy 1668336
using these options, the encoding works without a problem.
But this is not standard conform, is it?
Is there a way to force the encoding with "208541"?
Best Regards
Christoph Gerstbauer
More information about the ffmpeg-user
mailing list