ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

4k video

Open kuailedeadai opened this issue 6 years ago • 4 comments

Hello, please tell me, when vpx decodes 4k video, it takes more than 100ms to decode a frame of video data. This will cause the audio and video synchronization module to discard the decoded video frames all the time. What are the optimization suggestions for this one? Looking forward to your answer, thank you

kuailedeadai avatar Sep 02 '20 13:09 kuailedeadai

Can you please give us more info on your setup:

  • apart from resolution, what is the bitrate of the video?
  • what device is this happening on?
  • when you say vpx, do you mean you are using ExoPlayer's vp9 extension or are you using ExoPlayer with the Android platform decoders only?

In principle, you might need to switch to a lower resolution and/or bitrate, but let's start by clarifying the above.

christosts avatar Sep 02 '20 15:09 christosts

Hello: This is the video file details: image Occurs on the Android 10 model configuration, this phone performs well vpx refers to exoplayer's vpx extension program, which uses soft decoding

How do I switch to a lower resolution and/or bit rate?

thanks

kuailedeadai avatar Sep 03 '20 01:09 kuailedeadai

Hello: This is the video file details: image Occurs on the Android 10 model configuration, this phone performs well vpx refers to exoplayer's vpx extension program, which uses soft decoding

How do I switch to a lower resolution and/or bit rate?

thanks

did did u get that file decrypted please tell me how

Mavrick102 avatar Sep 03 '20 08:09 Mavrick102

So, the file is 4K encoded at 16.6Mb/s and you are using the software decoder. I can see how that can stretch the device's CPU.

I can think of different ideas:

  1. Did you try without ExoPlayer's vp9 extension? Your device should be able to play VP9 directly. That may offer improved decoding performance. Note however, that different devices may have different decoders, so you might run to device-specific issues in case you plan to install the app on multiple device types.
  2. You can try to lower the video bitrate and/or the resolution. That is, you may try to produce a video at 4K resolution at 8Mb/s (this is just random number, you can experiment more), or reduce the resolution assuming that it will also reduce the bitrate. To do that, you need to re-encode the video. Whether that's easy or not depends on how your application/service is setup. For example, do you have access to the encoding process? Of course, lowering the resolution and/or the bitrate might have impact on the visible video on screen, so it's up to you to decide what's best for your users. If you are not targeting TVs but targeting handheld devices, I'd say that a 1080p video will not look much worse compared to a 4K one (that's a personal opinion).

christosts avatar Sep 03 '20 11:09 christosts