-
Notifications
You must be signed in to change notification settings - Fork 72
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
[S805] Video and audio are out of sync when playing http stream #26
Comments
Check the system log (dmesg) for hardware codec errors. |
OK, here are some updates from today:
The full dmesg log is available here: http://do.xakcop.com/c2play/dmesg.log I also recorded two samples from http streams for which the sync fails: So now the problem can be reproduced by simply running
I can also provide root access to the box if that would be helpful. Thanks! |
I tested the streams provided and the issue originates in the container: MPEG-TS. This container format is currently unsupported by c2play since its payload is allowed to be damaged. The handling of damaged streams is highly dependent on the patch level of the kernel and codec firmware in use. For example, the media plays without issue on S905 with kernel 3.14 but not on S805 with kernel 3.10. A possible workaround is to "sanitize" the TS stream before its sent to c2play. I tested this with ffmpeg: This corrects the container errors and allows playback on S805. |
I could not find a method to detect/drop bad info. The AV_PKT_FLAG_CORRUPT flag is never set. Ffmpeg itself is able to filter out the bad data (-logoption verbose on above command):
Its possible that future S805 kernel updates (vendor/mainstream) could correct the issue. In the interim, the solution is likely to pipe the TS through ffmpeg and have it output to a FIFO that c2play then reads from. |
Thanks for looking into this. I wonder how Kodi works because it plays these streams on the same hardware and the same kernel. |
I spent several hours investigating that same question. The only difference I found was this: I added the same header feeding to c2play and it made no difference. This leads me to conclude one of two things. Either software decoding of MPEG2 is being used or there is some method they use to detect bad TS frames just as FFMPEG does. I encourage others to fork c2play and experiment. |
Could you please reopen the bug so it become visible to other people? I am also still working on this. |
See also here for all the special processing xbmc does: |
First of all, great work!
I have an MXQ box with S805 and I have managed to successfully build and run the player on it. It plays video files without any problems. However, when I try to play an http stream, I get a lot of these messages:
and no video is played. I have tried to comment line 84 (
codecPTR->SetCurrentPts
) in AmlVideoSink.h but then audio and video are out of sync (~1sec.). Could you give me any pointers how to fix this? This is the full log:https://pastebin.com/9SJCu1AL
Thanks!
The text was updated successfully, but these errors were encountered: