google / ExoPlayer

An extensible media player for Android
Apache License 2.0
21.64k stars 6k forks source link

Deinterlacing #2013

Closed luxband closed 7 years ago

luxband commented 7 years ago

Hi, There are several streams with parameters: H264 - MPEG-4 AVC (part 10) (h264) + MPEG Audio layer 1/2 (mpga)) It is clearly seen that does not fulfill deinteleysing. I have not found in exoplayer opportunities to enable deinterlacing. Is that possible?

ojw28 commented 7 years ago

Note: Test stream sent via email. The stream provided works fine for me both on Pixel and running in a Nexus 5X Virtual Device (i.e. emulator). It sounds like a device specific issue that should be reported to Amlogic. Please do this.

luxband commented 7 years ago

I tried to play stream (which was sended via email) on the Nexus Player and Nvidia Shield (both at AndroidTV based at Avdroid 7). The same effect - deinterlacing is not available at this devices also.

You can repeat it at this devices?

ojw28 commented 7 years ago

It's really unclear what this issue is really saying. How are you determining that the device does not "fulfill de-interlacing". Please provide details of exactly what you're seeing, ideally including some photos of any visual artifacts that are visible as a result. Thanks.

luxband commented 7 years ago

This is screenshots of the problem stream(which was sended via email), made on Nexus Player (Android v.7.0): https://drive.google.com/open?id=0B4EsQFgJw0FPbU8zQlFDNE5XOEk https://drive.google.com/open?id=0B4EsQFgJw0FPc3NqQ2s0ME52Qjg

andrewlewis commented 7 years ago

There is no deinterlacing functionality implemented in ExoPlayer itself and it is not feasible for us to implement it in a way that works in general.

Decoders can do arbitrary post-processing and in the past we have seen devices where you can customize what post-processing is applied by setting device-specific MediaFormat keys. You might want to investigate this further if you only need to support certain devices where you have documentation about the decoders, and what MediaFormat keys they will accept. You can override MediaCodecVideoRenderer.configureCodec to customize how the codec is configured.

Since Android L, devices have been able to expose "tunneled" codecs that may apply additional post-processing compared to untunneled decoding, but ExoPlayer does not currently use these. (Tracked by #1688.)

For the specific stream/device combination mentioned in previous comments, do you have any evidence that the device should be able to play it without the artifacts shown? For example, does MediaPlayer play it without artifacts?

goffioul commented 7 years ago

I'm looking for options or suggestions about how to deal with interlaced content in ExoPlayer. The streams I have to deal with are live TV feeds and most of them are interlaced. Transcoding them is not really an option.

At the moment, the streams can play fine in ExoPlayer, but the interlacing artefacts are clearly visible. The device does not have (yet) HW decoders, so it's using Google's software decoder (OMX.google.h264.decoder).