pocarist / ffmbc

Automatically exported from code.google.com/p/ffmbc
0 stars 0 forks source link

Error: "could not get mpeg2 profile and level" when muxing mxf #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to transcode some AVC-Intra content and for some content it fails 
with the error: "could not get mpeg2 profile and level".

The problem described here seems to match my situation: 
http://ffmpeg.org/pipermail/ffmpeg-devel/2009-November/077308.html

I applied the patch described and it seemed to solve the problem.
I also added some debugging and found that the level was being set to 4 and the 
profile was being set to 6 for my source file.

I then tried setting profile to 8 on the command line which also solved the 
problem (against the un-patched code).

Ideally I'd rather not set the profile on the command line as I don't know when 
it should be explicitly set and when not.

Any chance of getting that change (or a variation thereof) applied to FFmbc 
please?

Source file: https://www.dropbox.com/s/ly7xe7gecy3jj73/AVCi-720p-25-1frame.mov

Command line: ffmbc -i AVCi-720p-25-1frame.mov -vcodec mpeg2video -pix_fmt 
yuv420p -timecode 00:00:00:00 -r 25 -b 6000k -maxrate 6000k -bufsize 5097k 
-acodec pcm_s16le -ab 96k -ar 48000 -ac 1 -vf scale=1280:720 -f mxf -y 
PA-1030-AVCi-720p-25-1frame.mxf -acodec pcm_s16le -ab 96k -ar 48000 -ac 1 
-newaudio -acodec pcm_s16le -ab 96k -ar 48000 -ac 1 -newaudio -acodec pcm_s16le 
-ab 96k -ar 48000 -ac 1 -newaudio

Original issue reported on code.google.com by boncey@gmail.com on 6 Dec 2011 at 2:22

GoogleCodeExporter commented 9 years ago
I've done some more investigating and found out that the patch described in the 
bug report doesn't work correctly for us.

The assets it produces cause Premiere Pro CS5 (our target application) to crash 
- I guess it can't handle high profile proxies.
So I've modified our patch to return "main" profile instead of "high".

The patch now looks like this:
--- FFmbc-0.7-rc4/libavformat/mxfenc.c  2011-10-28 04:12:29.000000000 +0100
+++ FFmbc-0.7-rc4-dmi-high-profile/libavformat/mxfenc.c 2011-12-07 
10:55:56.000000000 +0000
@@ -1348,9 +1348,10 @@
 static const UID *mxf_get_mpeg2_codec_ul(AVCodecContext *avctx)
 {
     int long_gop = avctx->gop_size > 1 || avctx->has_b_frames;

     if (avctx->profile == 4) { // Main
-        if (avctx->level == 8) // Main
+        if (avctx->level == 8 || avctx->level == 6) // Main
             return &mxf_mpeg2_codec_uls[0+long_gop];
         else if (avctx->level == 4) // High
             return &mxf_mpeg2_codec_uls[4+long_gop];

Does that still make sense?

Original comment by boncey@gmail.com on 7 Dec 2011 at 11:50

GoogleCodeExporter commented 9 years ago
This is wrong, your file is H-14 level and the UL is not this one. I'll fix 
that in next release.

Original comment by baptiste...@gmail.com on 7 Dec 2011 at 8:35

GoogleCodeExporter commented 9 years ago

Original comment by baptiste...@gmail.com on 7 Dec 2011 at 8:35

GoogleCodeExporter commented 9 years ago
Should be fixed in rc5

Original comment by baptiste...@gmail.com on 12 Jan 2012 at 5:49

GoogleCodeExporter commented 9 years ago

Original comment by baptiste...@gmail.com on 12 Jan 2012 at 5:50