Discussion:
[FFmpeg-user] Problems decoding h264 from Blu-ray
wtfux
2012-09-05 15:54:16 UTC
Permalink
Hello,
I have trouble decoding the H.264/AVC stream of an unprotected Blu-ray
(m2ts container) with ffmpeg (on Windows). I tried the zeranoe's
Windows build and my own. Both fail to decode the stream *at different
positions* with errors like these:

cabac decode of qscale diff failed at 62 61
[h264 @ 0000000003985840] error while decoding MB 62 61, bytestream (59232)
[h264 @ 0000000003985840] concealing 827 DC, 827 AC, 827 MV errors in I frame

[h264 @ 0000000003985840] left block unavailable for requested intra
mode at 0 60
[h264 @ 0000000003985840] error while decoding MB 0 60, bytestream (78993)
[h264 @ 0000000003985840] concealing 1009 DC, 1009 AC, 1009 MV errors in I frame

top block unavailable for requested intra mode at 97 16
[h264 @ 0000000003985840] error while decoding MB 97 16, bytestream (202101)
[h264 @ 0000000003985840] concealing 2112 DC, 2112 AC, 2112 MV errors in I frame

These errors result in blocky image errors in the output file.

Command line: ffmpeg.exe -i 00000.m2ts -report -loglevel verbose
-codec:v libx264 -preset:v veryslow -profile:v high10 -tune:v
animation -level:v 5.1 -refs:v 16 -subq:v 11 -me_range:v 24 -bf:v 16
-trellis:v 2 -x264opts
"rc_lookahead=160:psy-rd=0.4,0.15:aq-mode=2:aq-strength=0.6"
-chromaoffset:v -3 -crf:v 15 -codec:a libfdk_aac -b:a 200k -sn
-threads 4 asa-10.mkv

m2ts info: http://pastie.org/4668776

Full ffmpeg log (canceled after errors occurred): Warning: large (3MB)
https://dl.dropbox.com/u/17527004/ffmpeg-20120905-152133.log

The video plays fine in VLC player and MPC (using codec: ffdshow
libavcodec h264) and the decoding errors appear at different positions
so I think the input video should be fine.

Does anyone have an idea why the decoding fails and how to fix it?

Thanks!
Carl Eugen Hoyos
2012-09-06 09:06:57 UTC
Permalink
Post by wtfux
I have trouble decoding the H.264/AVC stream of an unprotected Blu-ray
Please provide a sample.

Please never point to external resources for more information about
your report, always post all necessary information on this list.

(I do not remember a report where mediainfo helped.)

Carl Eugen
wtfux
2012-09-06 18:52:33 UTC
Permalink
Post by Carl Eugen Hoyos
Please provide a sample.
Well I tried. Those errors occur randomly while decoding the video
(nothing to do with the encoder, they also happen when I decode to
rawvideo and discard the output). I tried to cut a scene (without
re-encoding of course) and upload it but even a scene where decoding
failed multiple times is fine when it is decoded alone. It seems that
the errors only happen after decoding about 5 minutes of the video.
Sometimes there are hundreds of decoding errors and sometimes only 1
in the 30 minute video. I didn't manage to decode it without errors,
though. Uploading a longer piece is not possible as it's from a 1080p
Blu-ray and a minute already hundreds of megabytes.

Tried with zeranoe's and my own build of 64bit FFmpeg using latest git.

The weird thing is that there are *no such errors* when decoding using
zeranoe's or mine *32bit* build of FFmpeg. I just found this out.
Using 32bit this is the only error in the whole 30minute clip and the
Post by Carl Eugen Hoyos
number of reference frames (0+3) exceeds max (2; probably corrupt input), discarding one
Maybe it's my PC, I already had failing RAM in the past or it could be
a CPU feature that's causing this and that is not available in the
32bit build. I don't have another PC to test it.
32bit is fine but the process is running out of memory (only 2GB on
32bit) because I need more memory to encode using my x264 settings so
I'd prefer to use a 64bit build.

Any idea what I could try?
Post by Carl Eugen Hoyos
Please never point to external resources for more information about
your report, always post all necessary information on this list.
Sorry for that but it was a 3MB large log that couldn't be pasted into the mail.
Post by Carl Eugen Hoyos
(I do not remember a report where mediainfo helped.)
Okay, I thought it could be helpful to know that the stream has a
bitrate of 34.3 Mbps and other stuff that is noted there.


Thanks for your time.

Continue reading on narkive:
Loading...