-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
h264 decoder: bad images #255
Comments
I can see the issue. I've submitted a bug report to codecs team. |
Perfect, thanks. |
Is there any comment from the codec team yet? |
It has been looked at, but no solution yet.
|
Just a short update: We tested this with our new MMAL VLC plugins at it behaves exactly the same as it does with omx. |
Could you maybe also explain what DK and VEGA are? Not that we could help with it, but just for us to understand what you were testing with. |
DK is development kit - basically a VideoCore IV chip on a test board. VEGA is commercial software for analysing video streams (http://www.interrasystems.com/analyzers.php). The fact VEGA produces similar corrupt output as we do really suggests the stream is bad, rather than a bug in our code. However if it's possible to play this stream better (as VLC does), then we'd like to do that (without breaking other compliant streams). |
Ok. How does VEGA behave with the no-issue.ts? As this is exactly the same bitstream just starting after the initial discontinuity. |
Any news here? |
Any updates? Do you need further testing snippets? |
One more update: We do see this issue with TV channels of the Astra HD+ platform (primary source for german television HD channels) as well. It seems it is some encoder setting which is quite commonly used, which triggers this issue. |
@popcornmix
What command was used to remux here? I just tried the same, simply doing a ffmpeg -i rpi-issue.ts -acodec copy -vcodec copy rpi-issue.mp4 The generated file shows the exact same distortions on the Pi which the original ts-file did. Are you sure you only remuxed and not reencoded the stream? Did you actually try to play your remuxed file on the Pi or only on the DK? |
Can you try this test build? Some info from bug report:
|
We just did some first testings and for all our test-snippets it works fine! Thanks a lot! |
Should be an official update soon (probably tonight) with this fix in. |
kernel: config: enable CONFIG_VIDEO_STK1160_COMMON See: Hexxeh/rpi-firmware#47 firmware: vdec3: h264: Improve results on some corrupt streams. See: #255 firmware: Update to HW cursor handling. Now supports overscan and arbitrary framebuffer sizes in GPU so X driver does not need to worry about it See: http://www.raspberrypi.org/forums/viewtopic.php?f=38&t=69926 userland: RaspiVid: Fix file splitting code. See: raspberrypi/userland#168
kernel: config: enable CONFIG_VIDEO_STK1160_COMMON See: #47 firmware: vdec3: h264: Improve results on some corrupt streams. See: raspberrypi/firmware#255 firmware: Update to HW cursor handling. Now supports overscan and arbitrary framebuffer sizes in GPU so X driver does not need to worry about it See: http://www.raspberrypi.org/forums/viewtopic.php?f=38&t=69926 userland: RaspiVid: Fix file splitting code. See: raspberrypi/userland#168
rpi-update should have the fix. Please confirm it works and close when happy. |
Looks good. Thanks. |
kernel: config: enable CONFIG_VIDEO_STK1160_COMMON See: Hexxeh/rpi-firmware#47 firmware: vdec3: h264: Improve results on some corrupt streams. See: raspberrypi#255 firmware: Update to HW cursor handling. Now supports overscan and arbitrary framebuffer sizes in GPU so X driver does not need to worry about it See: http://www.raspberrypi.org/forums/viewtopic.php?f=38&t=69926 userland: RaspiVid: Fix file splitting code. See: raspberrypi/userland#168
We spotted an issue with the h264 decoder where it periodically creates bad images after an initial distortion occured. We have two sample files:
http://jusst.de/files/rpi-issue.ts
http://jusst.de/files/rpi-no-issue.ts
Both files are actually part of the same source files. The difference is that
rpi-no-issue.ts
is beginning a 100MB later than rpi-issue.ts does.If you play
rpi-no-issue.ts
withomxplayer -d rpi-no-issue.ts
it play smoothly. If you playrpi-issue.ts
withomxplayer -d rpi-issue.ts
you see the first distorted image after 28 seconds. After that you periodically see distorted images, which are decoded absolutely fine in therpi-no-issue.ts
.We can reproduce the same with our VLC tree, so we can be quite sure that it is no demuxing issue.
So for further analysis we compared with playback on host vlc. With
rpi-issue.ts
there is a discontinuity and decoder error after 28 seconds, which matches the first distortion on the rpi[h264 @ 0x7f3848de3080] cabac decode of qscale diff failed at 27 45 [h264 @ 0x7f3848de3080] error while decoding MB 27 45, bytestream (41444) [h264 @ 0x7f3848d743a0] reference picture missing during reorder [h264 @ 0x7f3848d743a0] reference picture missing during reorder [h264 @ 0x7f3848d743a0] Missing reference picture, default is 66900 [h264 @ 0x7f3848d743a0] Missing reference picture, default is 66900 [h264 @ 0x7f3848de3080] reference picture missing during reorder [h264 @ 0x7f3848de3080] Missing reference picture, default is 66901 [h264 @ 0x7f3848de3080] mmco: unref short failure [h264 @ 0x7f3848de3080] mmco: unref short failure
With VLC on the host the file continous to plays smoothly afterwards, while on the Raspberry this is the starting point of periodic image distortions with an inverval of 40s.
If you play
rpi-no-issue.ts
on the rpi it does not show the periodic distortions on the same images which were distorted in therpi-issues.ts
. The difference is just the missing discontinuity at the start of the file.We see this behavior on several german HD television channels, so it is not specific to this single sample.
The text was updated successfully, but these errors were encountered: