Skip to content
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

Player get stuck with particular h264 stream #1967

Closed
vitekn opened this issue Oct 19, 2016 · 1 comment
Closed

Player get stuck with particular h264 stream #1967

vitekn opened this issue Oct 19, 2016 · 1 comment

Comments

@vitekn
Copy link
Contributor

vitekn commented Oct 19, 2016

I am trying to play multicast stream encoded with h264.The player versions are 2.0.1 - 2.0.3. The only message from player is STATE_BUFFERING and nothing else happens. I recorded this stream to file and checked it again streaming with ffmpeg -re -i file2.ts -c copy -f mpegts udp://235.10.20.6:1234, but the result is the same. If I transcode this stream like ffmpeg -re -i file2.ts -c:v h264 -f mpegts udp://235.10.20.6:1234 it plays fine.

I have tried it on 2 android stb Vermax HD100 and MXQ.

recorded file: https://drive.google.com/file/d/0B94UQVn8v02YcXlnSEZST3ctem8/view?usp=sharing
bugreport https://drive.google.com/file/d/0B94UQVn8v02YbnRQRG9ZSHRQV1k/view?usp=sharing

Handler mainHandler = new Handler();

TrackSelector trackSelector = new DefaultTrackSelector(mainHandler);
LoadControl loadControl = new DefaultLoadControl();
pl = ExoPlayerFactory.newSimpleInstance(ctx, trackSelector, loadControl);
DataSource.Factory udsf = new UdpDataSource.Factory(){
@Override
public DataSource createDataSource() {
return new UdpDataSource(null, 1500);
}}
videoSource = new ExtractorMediaSource(uri, udsf, TsExtractor.FACTORY, null,null)
pl.setPlayWhenReady(false);
pl.prepare(_videoSource);

@andrewlewis
Copy link
Collaborator

The recorded stream appears to have no IDR frames. Try setting FLAG_ALLOW_NON_IDR_KEYFRAMES to treat non-IDR I frames as synchronization samples. This makes the video play on my test device.

See also #1894 and #1660 which are similar.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants