Android: problems with deinterlacing

This forum is about all development around libVLC.
dikranh
New Cone
New Cone
Posts: 8
Joined: 20 Nov 2017 18:03

Re: Android: problems with deinterlacing

Postby dikranh » 02 Dec 2017 09:21

I modified my encoder string by adding:
venc=x264{interlaced
into the x264 params...

Now, the desktop deinterlaces properly when I use "automatic".

However, Android still does not deinterlace when using:

Code: Select all

final ArrayList<String> options = new ArrayList<>(); options.add("--video-filter=deinterlace"); options.add("--deinterlace=-1"); options.add("--deinterlace-mode=blend"); options.add("-vvv"); mLibVLC = new LibVLC(this, options);


The part of the log you referred to in the earlier post is still the same:
D/VLC: [0000007284952110/57af] core scale: looking for video converter module matching "any": 14 candidates
D/VLC: [0000007284952110/57af] yuvp scale: YUVP to YUVA converter
D/VLC: [0000007284952110/57af] core scale: using video converter module "yuvp"
D/VLC: [000000726bb5f090/57af] core video output: Deinterlacing available
D/VLC: [000000726bb5f090/57af] core video output: deinterlace -1, mode blend, is_needed 0
D/VLC: [000000726681a950/57af] core window: looking for vout window module matching "any": 1 candidates
D/VLC: [000000726681a950/57af] android_audiotrack window: InitJNIFields success

dikranh
New Cone
New Cone
Posts: 8
Joined: 20 Nov 2017 18:03

Re: Android: problems with deinterlacing

Postby dikranh » 04 Dec 2017 09:23

I was able to get the amlogic 64bit device to deinterlace by setting the following on the media object:

Code: Select all

media.setHWDecoderEnabled(false, false);
Does this mean my only option on this device is to use software decoding?

Thanks

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Android: problems with deinterlacing

Postby Jean-Baptiste Kempf » 04 Dec 2017 13:19

I told you to remove things, and give logs, not add more...
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

dikranh
New Cone
New Cone
Posts: 8
Joined: 20 Nov 2017 18:03

Re: Android: problems with deinterlacing

Postby dikranh » 04 Dec 2017 22:26

You told me to do the following:
Sorry, but can you do logs without the forced options you have put?

Because so far, we see is_needed=0
Then, you mentioned I have to fix the stream so that it is detected on the desktop.

I asked if this is the change you wanted:

Code: Select all

options.add("--deinterlace=-1");
And posted my changes to the backend stream so that it is correctly detected on the desktop. I did not get an answer, so I proceeded to disable the hardware decoding to see if it makes a difference.

My goal is to make this work. What exactly do you want me to pass to libvlc initialization?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Android: problems with deinterlacing

Postby Jean-Baptiste Kempf » 05 Dec 2017 01:06

Share your sample.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

salvatron
New Cone
New Cone
Posts: 1
Joined: 10 Dec 2018 13:15

Re: Android: problems with deinterlacing

Postby salvatron » 10 Dec 2018 13:31

Hi, I have the same problem.

I'm developing an APP on Android to watch udp streams in TV Box (udp://@239.100.0.1:1234).

But deinterlacing does not have any effect:

Code: Select all

final ArrayList<String> args = new ArrayList<>(); args.add("--deinterlace=1"); args.add("--deinterlace-mode=bob"); args.add("--sout-deinterlace-mode=bob"); args.add("--video-filter=deinterlace"); mLibVLC = new LibVLC(this, args);
I try, with -1 and 1, but nothing.

I try with Amlogic S912 and Rockchip 3329 and both show this error in logcat:

12-10 13:29:36.169 20135-20258/example.app E/VLC: [da776d30/4f22] libvlc video output: Failed to create video filter 'deinterlace'
12-10 13:29:36.169 20135-20258/example.app E/VLC: [da776d30/4f22] libvlc video output: Failed to add filter 'deinterlace'


All TV Box have AMlogic or Rockckip CPU (excep Nvidia Shield), and I suspect that Libvlc does not support these processors.

Anyone know anything about this?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Android: problems with deinterlacing

Postby Jean-Baptiste Kempf » 20 Jan 2019 22:55

Check the logs before.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

rmorgade
New Cone
New Cone
Posts: 1
Joined: 19 Oct 2019 00:26

Re: Android: problems with deinterlacing

Postby rmorgade » 19 Oct 2019 00:30

Good evening!

Any follow-up on this topic as I am facing the same issue. I have developed an app which uses latest libVLC library and using S912 board (khadas Kvim2) I am able to HW decode but but deinterlace.

Any hint would be great, I am facing the same issue described here and I am seeing all the time:
libvlc video output: Failed to create video filter 'deinterlace'
libvlc video output: Failed to add filter 'deinterlace'

Thanks in advance

LRTNZ
New Cone
New Cone
Posts: 5
Joined: 24 Jan 2020 15:28

Re: Android: problems with deinterlacing

Postby LRTNZ » 25 Jan 2020 04:43

@rmorgade, did you end up finding a solution to this problem? I have been trying to solve it myself, with no luck.

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: Android: problems with deinterlacing

Postby unidan » 30 Dec 2020 17:25

Hi,

HW decoding (mediacodec) with Android prevents deinterlacing because you cannot extract the raw planes, it's already deinterlaced (in an arbitrary way, hence the difference between devices) and converted to packed RGB when it goes to the android Surface.

LRTNZ
New Cone
New Cone
Posts: 5
Joined: 24 Jan 2020 15:28

Re: Android: problems with deinterlacing

Postby LRTNZ » 31 Dec 2020 01:49

Hi,

HW decoding (mediacodec) with Android prevents deinterlacing because you cannot extract the raw planes, it's already deinterlaced (in an arbitrary way, hence the difference between devices) and converted to packed RGB when it goes to the android Surface.
That's odd, as I can playback a multicast stream in the official Android VLC app, and it will identify as being interlaced, and deinterlace it. Yet when using libVLC, even when the logging is shown that the flag to deinterlace has been set, no matter what I do it always shows the media as not needing to be deinterlaced, regardless of what I do. This is all on the same device as well. I reported this as a bug early on in this year here: https://code.videolan.org/videolan/vlc- ... ssues/1184

unidan
Developer
Developer
Posts: 1493
Joined: 25 Mar 2018 01:00

Re: Android: problems with deinterlacing

Postby unidan » 03 Feb 2021 09:06

LRTNZ: do you have logs on both case? If it's decoded with HW decoding off, then deinterlacer will trigger but there are no way to interact with interlacing and mediacodec.

VLC android uses libvlc so anything done there can be done in your application.

LRTNZ
New Cone
New Cone
Posts: 5
Joined: 24 Jan 2020 15:28

Re: Android: problems with deinterlacing

Postby LRTNZ » 03 Feb 2021 09:09

LRTNZ: do you have logs on both case? If it's decoded with HW decoding off, then deinterlacer will trigger but there are no way to interact with interlacing and mediacodec.

VLC android uses libvlc so anything done there can be done in your application.
In the link to my bug report, you will find all of those files.

Having moved onto using exoplayer instead for the project, I do not anymore have an urgent need for this issue to be resolved. I provided a minimum working example, and media files to be able to show this bug in action, but have not received any responses about that in the months since I provided that information/code.

LRTNZ
New Cone
New Cone
Posts: 5
Joined: 24 Jan 2020 15:28

Re: Android: problems with deinterlacing

Postby LRTNZ » 03 Feb 2021 09:13

I am also aware about VLC android using libVLC - which is why I am confused that deinterlacing was not working for me 🤔


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 20 guests