Opened 10 years ago

Last modified 10 years ago

#3887 new defect

ffmpeg cant multiplex IMX video essence (m2v) with correct vbv into mov or mxf

Reported by: Michael Orton Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
How to reproduce:

% ffmpeg -i <file>  -vcodec mpeg2video -pix_fmt yuv422p -b:v 30000k -maxrate 30000k -minrate 30000k -g 1 -flags +ildct+low_delay -dc 10 -intra_vlc 1 -non_linear_quant 1 -qmin 1 -qmax 8 -q:v 1 -ps 1 -top 1 -aspect 16:9 -bufsize 9437184 -rc_init_occupancy 9437184 -rc_buf_aggressivity 0.25 -an <intermediate.m2v>

ffmpeg -i <intermediate.m2v> -i stereo.wav -vcodec copy -r 25 -acodec copy -vtag mx3p <final.mov>
ffmpeg -i <intermediate.m2v> -i stereo.wav -vcodec copy -r 25 -acodec copy -d10_channelcount 4 -f mxf_d10 <final.mxf>

mov file shows complete green field (like video error). mxf file shows "[mxf_d10 @ 04714260] cannot fill d-10 video packet" errors during mpxing, and final video has many video errors.

vbv = 9437184 is correct value for MPEG2 422P@ML, and e.g. Telestream encoder will correctly generate mxf at least with this vbv.

Apple's own IMX.mov encoding shows vbv 1835008, which is actually MPEG2 MP@ML vbv, meant for max bitrate of 15Mbit/sec

Maximum vbv before error appears to be 1200000 for IMX30 and 2000000 for IMX50, assuming -rc_init_occupancy is set to same value.

ffmpeg version git 1aa153d
built on … Aug 23rd 2014

Thanks you very much for looking at this.

Change History (4)

comment:1 by Carl Eugen Hoyos, 10 years ago

Does it work if you don't use an intermediate file?

comment:2 by Michael Orton, 10 years ago

No, the symptoms are exactly the same: .mov file is multiplexed without any reported error at the command line (but mov is still green), and the mxf still reports [mxf_d10 @ 046b0060] cannot fill d-10 video packet - file produced has many errors.

I've tried this with previous versions of ffmpeg, going back to v0.5, and seems to be a longstanding issue.

Have typical input file, and output files if needed.

Last edited 10 years ago by Michael Orton (previous) (diff)

comment:3 by Carl Eugen Hoyos, 10 years ago

To make this a valid ticket, please provide a ffmpeg command line that allows to reproduce the issue (I suggest a command line that does encoding) together with the complete, uncut console output. Please don't forget to test current FFmpeg git head.

comment:4 by Michael Orton, 10 years ago

Below:
ffmpeg-1aa153d.exe -i input.mxf -vcodec mpeg2video -pix_fmt yuv422p -b:v 30000k -maxrate 30000k -minrate 30000k -g 1 -flags +ildct+low_delay -dc 10 -intra_vlc 1 -non_linear_quant 1 -qmin 1 -qmax 8 -q:v 1 -ps 1 -top 1 -aspect 16:9 -bufsize 9437184 -rc_init_occupancy 9437184 -rc_buf_aggressivity 0.25 -r 25 -acodec copy -d10_channelcount 4 -f mxf_d10 -y output.mxf
ffmpeg version N-65860-g1aa153d Copyright (c) 2000-2014 the FFmpeg developers

built on Aug 24 2014 00:08:13 with gcc 4.8.3 (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-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-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-decklink --enable-zlib

libavutil 54. 7.100 / 54. 7.100
libavcodec 56. 0.101 / 56. 0.101
libavformat 56. 2.100 / 56. 2.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.103 / 5. 0.103
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100

Guessed Channel Layout for Input Stream #0.1 : mono
Guessed Channel Layout for Input Stream #0.2 : mono
Guessed Channel Layout for Input Stream #0.3 : mono
Guessed Channel Layout for Input Stream #0.4 : mono
Input #0, mxf, from 'input.mxf':

Metadata:

uid : 0004475a-2b5c-41a4-a8ec-c4a430343a49
generation_uid : 0000475a-2b5c-41a4-a8ec-c4a430343a49
company_name : Hamburg Pro Audio GmbH
product_name : MXF4mac GC Export FCP
product_version : 1.3
product_uid : 00000000-0000-0000-0000-000000000000
modification_date: 2014-08-05 09:17:49
timecode : 01:11:33:01

Duration: 00:00:20.00, start: 0.000000, bitrate: 53355 kb/s

Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv), 720x608 [SAR 608:405 DAR 16:9], max. 50000

kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc

Stream #0:1: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
Stream #0:2: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
Stream #0:3: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
Stream #0:4: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s

Output #0, mxf_d10, to 'output.mxf':

Metadata:

uid : 0004475a-2b5c-41a4-a8ec-c4a430343a49
generation_uid : 0000475a-2b5c-41a4-a8ec-c4a430343a49
company_name : Hamburg Pro Audio GmbH
product_name : MXF4mac GC Export FCP
product_version : 1.3
product_uid : 00000000-0000-0000-0000-000000000000
modification_date: 2014-08-05 09:17:49
timecode : 01:11:33:01
encoder : Lavf56.2.100
Stream #0:0: Video: mpeg2video, yuv422p, 720x608 [SAR 608:405 DAR 16:9], q=1-8, 30000 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:

encoder : Lavc56.0.101 mpeg2video

Stream #0:1: Audio: pcm_s16le, 48000 Hz, mono, 768 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg2video (native))
Stream #0:1 -> #0:1 (copy)

Press [q] to stop, ? for help
[mxf_d10 @ 027fa3e0] cannot fill d-10 video packet

Last message repeated 6 times

[mxf_d10 @ 027fa3e0] cannot fill d-10 video packet00:02.88 bitrate=42638.3kbits/s

Last message repeated 9 times

[mxf_d10 @ 027fa3e0] cannot fill d-10 video packet00:09.36 bitrate=43233.8kbits/s

Last message repeated 10 times

[mxf_d10 @ 027fa3e0] cannot fill d-10 video packet00:12.60 bitrate=43101.6kbits/s

Last message repeated 19 times

frame= 500 fps=165 q=1.0 Lsize= 105350kB time=00:00:20.00 bitrate=43151.4kbits/s
video:73242kB audio:1875kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 40.247589%

Last edited 10 years ago by Michael Orton (previous) (diff)
Note: See TracTickets for help on using tickets.