ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Live H.264 encoding not playing back with ExoPlayer 2.0.4

Open sapanda opened this issue 10 years ago • 5 comments

Our live streams aren't playing with ExoPlayer 2.0.4. They play fine in 1.5.7. I've attached a sample chunk that doesn't play in ExoPlayer 2. Unfortunately we didn't see anything out of the ordinary in the logs.

Streams are encoded and packaged into HLS using Ateme Titan encoders.

LiveChunk.ts.zip

sapanda avatar Oct 31 '16 20:10 sapanda

We noticed an issue around the earlier video - we had GOP size at 60K and fps at 25. Changing the GOP to be a multiple (50K) resolved that issue.

However, we're now trying with a completely different encoder & this time HEVC 4K. Same issue - Everything plays fine in 1.5.7, but only audio plays back in 2.0.4.

LiveChunk_2.ts.zip

Device in question is a Samsung Galaxy S7. But we've had this issue with the Google Pixel as well.

sapanda avatar Nov 14 '16 18:11 sapanda

Have you seen #1967 ? For me, the first chunk doesn't play in any of exoplayer versions, unless I set FLAG_ALLOW_NON_IDR_KEYFRAMES.

The second one does not play on Nexus 5X(any exopayer version), but I think it's related to decoding capabilities.

I wonder if you are setting the FLAG_ALLOW_NON_IDR_KEYFRAMES flag for version 1.5.7 but not for 2.0.4. Please check if that's the case. If not, let me know and I will explore further.

AquilesCanta avatar Nov 14 '16 19:11 AquilesCanta

How do I check if FLAG_ALLOW_NON_IDR_KEYFRAMES is set in 1.5.7? I don't see that flag when doing a global search on 1.5.7. Definitely not set in 2.0.4 though.

sapanda avatar Nov 15 '16 17:11 sapanda

OK I just verified, in 1.5.7 we do set H264Reader.sampleIsKeyframe to true in H264Reader.endNalUnit(). I presume that's the equivalent of FLAG_ALLOW_NON_IDR_KEYFRAMES and would explain the issues around the first chunk.

For the 2nd chunk, the issue still persists though - and trackInfo.hasOnlyUnplayableTracks(C.TRACK_TYPE_VIDEO) returns false. So probably something on the decoder side.

sapanda avatar Nov 16 '16 00:11 sapanda

Closing due to inactivity.

ojw28 avatar Jan 13 '17 18:01 ojw28