Comments (8)
Check the system log (dmesg) for hardware codec errors.
from c2play.
OK, here are some updates from today:
- Some http streams play fine and some not. The player is doing some PTS adjustment in the beginning and if the video comes up, the stream is being played with audio and video in sync.
- Sometimes when I try to play again an http stream which was working an hour ago, the player is stuck in the initial adjusting PTS phase. This is very strange because nothing is changed on the server side.
- Sometimes (but not always) I get these messages in dmesg when player fails to sync:
[12508.409345@0] discontinue, system=0x17d977 vpts=0x97adf5d0 next_vf->pts = 0x97adeec8
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:
http://do.xakcop.com/c2play/sample1
http://do.xakcop.com/c2play/sample2
So now the problem can be reproduced by simply running c2play sample1
or c2play sample2
.
I am using LibreElec v7.0.0.3c with kernel 3.10:
LibreELEC:~ # lsb_release -ir
LibreELEC (community) - Version: 7.0.3.3c
LibreELEC:~ # uname -a
Linux LibreELEC 3.10.99 #1 SMP PREEMPT Sun Feb 19 12:18:57 CET 2017 armv7l GNU/Linux
I can also provide root access to the box if that would be helpful. Thanks!
from c2play.
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:
$ ffmpeg -i sample1.ts -acodec copy -vcodec copy sample1a.ts
This corrects the container errors and allows playback on S805.
from c2play.
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):
Input file #0 (sample1.ts):
Input stream #0:0 (video): 603 packets read (16472498 bytes);
Input stream #0:1 (audio): 1004 packets read (578304 bytes);
Total: 1607 packets (17050802 bytes) demuxed
Output file #0 (sample1a.ts):
Output stream #0:0 (video): 593 packets muxed (16199090 bytes);
Output stream #0:1 (audio): 1004 packets muxed (578304 bytes);
Total: 1597 packets (16777394 bytes) muxed
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.
from c2play.
Thanks for looking into this. I wonder how Kodi works because it plays these streams on the same hardware and the same kernel.
from c2play.
I spent several hours investigating that same question. The only difference I found was this:
https://github.com/LibreELEC/xbmc/blob/master/xbmc/cores/VideoPlayer/DVDCodecs/Video/AMLCodec.cpp#L970-L1006
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.
from c2play.
Could you please reopen the bug so it become visible to other people? I am also still working on this.
from c2play.
See also here for all the special processing xbmc does:
https://github.com/LibreELEC/xbmc/blob/master/xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.cpp
from c2play.
Related Issues (20)
- MPEG-4 video hang HOT 6
- Sample MP4 file in readme. HOT 3
- Add support for looping. HOT 1
- Gapless looping HOT 2
- MPEG-4 video hang if no audio source HOT 5
- Output delay after start of decoding HOT 1
- egl_render rendering planned ? HOT 3
- volume up/down support ? HOT 3
- Looping a video results in blank screen HOT 2
- Request: load subtitles from file
- ../../src/Media/MediaSourceElement.cpp:163:11: error: 'CODEC_ID_MPEG2VIDEO' was not declared in this scope case CODEC_ID_MPEG2VIDEO: HOT 1
- c2play/src/Media/os_support.h:30:10: fatal error: config.h: No such file or directory HOT 1
- fatal error: alsa/asoundlib.h: No such file or directory HOT 4
- Variable renderContext size HOT 1
- Open and close c2play often HOT 2
- c2play is usable for digital signage?
- .stamp_host_installed failed HOT 1
- While make c2play HOT 1
- how to get frame after decode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from c2play.