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

MPEG-TS stream freezes every several seconds #678

Closed
ddv2005 opened this issue Jul 31, 2015 · 18 comments
Closed

MPEG-TS stream freezes every several seconds #678

ddv2005 opened this issue Jul 31, 2015 · 18 comments

Comments

@ddv2005
Copy link

ddv2005 commented Jul 31, 2015

I have MXIII box that works fine in MediaPlayer on MPEG-TS H264/AAC stream. But exoPlayer freezes every several seconds. You can see it in my log at 00:21:23.188 ..Out PTS: 191000... Next PTS: 191040 should be played at 00:21:23.228 but it freezes before 00:21:23.908 (about 700 ms delay). Why it happen?
08-01 00:21:22.988 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 190120..
08-01 00:21:22.998 29788-31971/? V/AmlogicVideoDecoderAwesome﹕ The stream is avc and have no start code, Add one.
08-01 00:21:23.018 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211876392
08-01 00:21:23.018 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211876392 ok
08-01 00:21:23.048 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 190160..
08-01 00:21:23.048 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211877216
08-01 00:21:23.048 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211877216 ok
08-01 00:21:23.058 29788-31971/? V/AmlogicVideoDecoderAwesome﹕ The stream is avc and have no start code, Add one.
08-01 00:21:23.088 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 190880..
08-01 00:21:23.088 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211965448
08-01 00:21:23.088 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211965448 ok
08-01 00:21:23.098 29788-31971/? V/AmlogicVideoDecoderAwesome﹕ The stream is avc and have no start code, Add one.
08-01 00:21:23.108 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 190920..
08-01 00:21:23.118 29788-31971/? V/AmlogicVideoDecoderAwesome﹕ The stream is avc and have no start code, Add one.
08-01 00:21:23.128 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211965104
08-01 00:21:23.128 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211965104 ok
08-01 00:21:23.168 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 190960..
08-01 00:21:23.168 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211964712
08-01 00:21:23.168 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211964712 ok
08-01 00:21:23.188 29788-31971/? V/AmlogicVideoDecoderAwesome﹕ The stream is avc and have no start code, Add one.
08-01 00:21:23.188 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 191000..
08-01 00:21:23.208 29788-31971/? V/AmlogicVideoDecoderAwesome﹕ The stream is avc and have no start code, Add one.
08-01 00:21:23.888 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211876392
08-01 00:21:23.888 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211876392 ok
08-01 00:21:23.908 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 191040..
08-01 00:21:23.928 29788-31971/? V/AmlogicVideoDecoderAwesome﹕ The stream is avc and have no start code, Add one.
08-01 00:21:23.928 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211877216
08-01 00:21:23.928 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211877216 ok
08-01 00:21:23.968 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 191080..
08-01 00:21:23.968 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211965448
08-01 00:21:23.968 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211965448 ok
08-01 00:21:23.988 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 191120..
08-01 00:21:23.988 29788-31971/? V/AmlogicVideoDecoderAwesome﹕ The stream is avc and have no start code, Add one.
08-01 00:21:24.008 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211965104
08-01 00:21:24.008 31225-31964/tv.stb I/ACodec﹕ video render this buffer -1211965104 ok
08-01 00:21:24.018 29788-31971/? V/AmlogicVideoDecoderAwesome﹕ The stream is avc and have no start code, Add one.
08-01 00:21:24.028 29788-31968/? D/AmlogicVideoDecoderAwesome﹕ Out PTS: 191160..

@bsysop
Copy link

bsysop commented Jul 31, 2015

Some relation with that: #488

@ddv2005
Copy link
Author

ddv2005 commented Jul 31, 2015

Thanks a lot. I have disabled OMX.amlogic.avc.decoder.awesome in MediaCodecUtil.isCodecUsableDecoder and now it works fine.

@bsysop
Copy link

bsysop commented Jul 31, 2015

Can you show how you do it?

When I try use exoplayer, video still black, but I using HLS and DASH!

@ddv2005
Copy link
Author

ddv2005 commented Jul 31, 2015

private static boolean isCodecUsableDecoder(MediaCodecInfo info, String name,
boolean secureDecodersExplicit) {
if (info.isEncoder() || !name.startsWith("OMX.")
|| (!secureDecodersExplicit && name.endsWith(".secure")) || name.startsWith("OMX.amlogic.avc.decoder.awesome")) {
return false;
}

@bsysop
Copy link

bsysop commented Jul 31, 2015

That awesome, let me try 👆

@bsysop
Copy link

bsysop commented Jul 31, 2015

Before screen are black, now have video, but still freezing, video are not 100% smooth!

Do you know your Android Version And or Amlogic Build version?

Thanks.

@bsysop
Copy link

bsysop commented Aug 25, 2015

@ddv2005 Finally can i say software decoder have no quality for this Hardware, please see more in #488

@ojw28
Copy link
Contributor

ojw28 commented Aug 25, 2015

Does it work if you make it so that codecNeedsEndOfStreamWorkaround in MediaCodecTrackRenderer returns true for the video decoder? If so then we should just add the device/decoder combination to that method.

@bsysop
Copy link

bsysop commented Aug 25, 2015

Hi @ojw28, please check #488 just check last message, explain all about OMX.amlogic

@ojw28
Copy link
Contributor

ojw28 commented Aug 25, 2015

That doesn't answer the question, because video shouldn't freeze even if the decoder isn't adaptive. Please give the suggestion above a try.

@bsysop
Copy link

bsysop commented Aug 25, 2015

I see! Then @ddv2005 should reply that, I using same decoder with MPEG-TS and no Freezing =/

@ddv2005 Maybe if you can publish some link/file i can try in my Amlogic (Old one) and check if same problem.

Just disable Omx.Amlogic, i think this not useful in all devices, like mine device, just have Omx.Amlogic and software Omx.Google (Then will be worst with this solution).

My issue was just with MPEG-Dash adaptive (Then in this case video show black screen), but now AmLogic staff solved that for me and they will publish the new firmware for public very soon.

@Avetri
Copy link

Avetri commented Nov 5, 2015

Hi @bsysop !
Have the adaptive video issues already been resolved by Amlogic? Do You have any information?

@goffioul
Copy link
Contributor

goffioul commented Nov 5, 2015

[coming from #926]

@ojw28 I've tried to make codecNeedsEosPropagationWorkaround return true, but that didn't help. The video is still frozen, giving me 1 frame every 5 to 10 seconds.

I've also tried to other suggestion of making isCodecUsableDecoder to return false for OMX.amlogic.avc.decoder.awesome. The video is then not frozen anymore, but the performances are very poor, because of software decoding. This is not an acceptable solution for us.

Any other suggestion or things I can try?

@ojw28
Copy link
Contributor

ojw28 commented Nov 5, 2015

Report the issue to the device manufacturer. There's only so much we can do to make sure we run properly on devices that don't behave correctly.

@bsysop
Copy link

bsysop commented Nov 6, 2015

@Avetri yes, they solved that, in some cases need to upgrade all the last media decoders, but normally just changing /system/etc/media_codecs.xml this works.

I change the avc and hevc for:

<MediaCodec name="OMX.amlogic.avc.decoder.awesome" type="video/avc" >
            <Limit name="size" min="64x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-300000000" />
            <Feature name="adaptive-playback" />
        </MediaCodec>
        <MediaCodec name="OMX.amlogic.hevc.decoder.awesome" type="video/hevc" >
            <Limit name="size" min="64x64" max="1920x1088" />
            <Limit name="alignment" value="2x2" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="1" max="972000" />
            <Limit name="bitrate" range="1-300000000" />
            <Feature name="adaptive-playback" />
        </MediaCodec>

@goffioul
Copy link
Contributor

@ojw28 It appears my video problem only occurs with HLS. The test DASH streams from the demo app plays fine. Does that make sense, if the problem is the AMLogic decoder?

@Avetri
Copy link

Avetri commented Nov 13, 2015

@bsysop Thanks.

Could You look at #953 ?

@ojw28
Copy link
Contributor

ojw28 commented Jun 9, 2016

It's somewhat unclear whether this is/was a device specific issue, or whether it still reproduces on recent versions of ExoPlayer. Closing for now. If this still reproduces on the latest ExoPlayer release, and if you believe it's not a device specific issue, then please file a new issue.

@ojw28 ojw28 closed this as completed Jun 9, 2016
@google google locked and limited conversation to collaborators Jun 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants