Page 1 of 2

Green Line libvlc Android

Posted: 07 Jun 2016 10:32
by pecana
Hello, i'm using the libvlc for Android to play video, but if the hardware acceleration is activated a greenline appear at the bottom of the video.
Is there a way to solve the issue?

Thank you

Re: Green Line libvlc Android

Posted: 08 Jun 2016 08:52
by pecana
No one? :-(

Re: Green Line libvlc Android

Posted: 08 Jun 2016 20:35
by Jean-Baptiste Kempf
Is it an interlaced video? Does it look like https://trac.videolan.org/vlc/ticket/16908#comment:10 ?

Re: Green Line libvlc Android

Posted: 09 Jun 2016 10:29
by pecana
Hello , how could i know it? it's a streaming video in .TS format.
If this is the case how can I deactivate / axtivate the interlacing by libvlc options?

Thank you

Re: Green Line libvlc Android

Posted: 09 Jun 2016 11:55
by pecana
I tryed in verbose and i get this:
D/VLC: [5dfffc38/0] core libvlc: VLC media player - 3.0.0-git Vetinari
D/VLC: [5dfffc38/0] core libvlc: Copyright © 1996-2016 the VideoLAN team
D/VLC: [5dfffc38/0] core libvlc: revision 2.2.0-git-7754-gd273581
D/VLC: [635787c8/5dc9] core video output: deinterlace 0, mode blend, is_needed 0
D/VLC: [635787c8/5dcc] core video output: Detected interlaced video
D/VLC: [635787c8/5dcc] core video output: deinterlace 0, mode blend, is_needed 1

If it can help, it seems to appears on videos which have a non standard format. For example i see the green bar on video where the resolution is seen by the vlclib as 1280x728 or 1280x736 instead of 1280x720, how could this be possibile ?

Re: Green Line libvlc Android

Posted: 10 Jun 2016 09:48
by pecana
Alone Again :-(

Re: Green Line libvlc Android

Posted: 17 Jun 2016 14:47
by pecana
Hello?
Is that a bug?

Will it be fixed?

Re: Green Line libvlc Android

Posted: 23 Jun 2016 11:48
by renatas
managed to fix problem changing deinterlace method (blend was default). I am using

Code: Select all

--sout-deinterlace-mode=yadif
but worked with discard and yadif2x too.

Re: Green Line libvlc Android

Posted: 23 Jun 2016 13:23
by pecana
managed to fix problem changing deinterlace method (blend was default). I am using

Code: Select all

--sout-deinterlace-mode=yadif
but worked with discard and yadif2x too.
hello, thank you!

I will check it today, it happen only on the Android TV instead on the tablet and phone it works well :-)

Re: Green Line libvlc Android

Posted: 23 Jun 2016 14:44
by pecana
managed to fix problem changing deinterlace method (blend was default). I am using

Code: Select all

--sout-deinterlace-mode=yadif
but worked with discard and yadif2x too.
Did you set others parameters?
It seems to have no effect at all looking at the debug log:

06-23 14:41:56.800 6591-21891 D/VLC: [68310960/5583] core video output: Deinterlacing available
06-23 14:41:56.800 6591-21891 D/VLC: [68310960/5583] core video output: deinterlace 0, mode blend, is_needed 0
06-23 14:41:57.405 6591-21895 D/VLC: [68310960/5587] core video output: deinterlace 0, mode blend, is_needed 1

Thank you

Re: Green Line libvlc Android

Posted: 23 Jun 2016 16:58
by pecana
Got it , I had to add also

--video-filter=deinterlace

Now I will try on the TV

Re: Green Line libvlc Android

Posted: 24 Jun 2016 08:53
by pecana
No luck :-(

The green bar is still present if the hardware acceleration is active :-(

Re: Green Line libvlc Android

Posted: 27 Jun 2016 10:16
by renatas
These options helped me. I don't really know if "--deinterlace=-1" is needed (0 (Off), -1 (Automatic), 1 (On)).

Code: Select all

--video-filter=deinterlace --deinterlace=-1 --sout-deinterlace-mode=yadif
Had frame rate drops when using "yadif" on slower device (Samsung Tab 3 10.1 GT-P5200). But

Code: Select all

--sout-deinterlace-mode=bob
solved it.
I have to do some more testing. Will post results if I find anything useful.

Re: Green Line libvlc Android

Posted: 27 Jun 2016 12:50
by ssbmaccom
My experience with deinterlaceds is mixed - but this is simply due to the methods used for it.
BoB is usually quite fine, but typography is not steady - which annoys me.
Linear is a bit better (it is BoB with linear interpolation).
Yadif is really quite good, but requires a really fast device. For my App (on tvOS) Yadif is fine for SD-Video (576i), but with 1080i I get lots of drop frames. At the end, I gave the user the choice to select the deinterlacer, if they are not happy with the default of using blend.

Re: Green Line libvlc Android

Posted: 27 Jun 2016 22:37
by pecana
These options helped me. I don't really know if "--deinterlace=-1" is needed (0 (Off), -1 (Automatic), 1 (On)).

Code: Select all

--video-filter=deinterlace --deinterlace=-1 --sout-deinterlace-mode=yadif
Had frame rate drops when using "yadif" on slower device (Samsung Tab 3 10.1 GT-P5200). But

Code: Select all

--sout-deinterlace-mode=bob
solved it.
I have to do some more testing. Will post results if I find anything useful.
Hello, Thank you for the suggestion, i will vive it a try :-)

Re: Green Line libvlc Android

Posted: 28 Jun 2016 13:22
by pecana
The parameters are the same I use but the greenline remains :-(

Re: Green Line libvlc Android

Posted: 03 Jul 2016 11:59
by Jean-Baptiste Kempf
Try to avoid hw acceleration.

Re: Green Line libvlc Android

Posted: 04 Jul 2016 08:35
by pecana
Try to avoid hw acceleration.
Also by setting it as automatic will give the same result and, by the way, I don't think deactivating the HW acceleration is a fix...
In some devices disabling the HW acceleration wil make the video unplayable, the video become really slow and cause many block, otherwise with the HW acceleration active run smootly but with a green bar.
It seems to happen on video where the format is out of standard (1280x736)
Any real suggestion or fix?

Re: Green Line libvlc Android

Posted: 04 Jul 2016 18:20
by Jean-Baptiste Kempf
Sure, but does it remove the green bar?

Re: Green Line libvlc Android

Posted: 05 Jul 2016 14:34
by pecana
Sure, but does it remove the green bar?
Yes but it make the player useless because you cannot watch it at 3 FPS.
In other device setting the acceleration to decoding works, in other devices where the HW acceleration set to full work well the decoding will cause the greenline bar. What is this bug caused by?

Thank you

Re: Green Line libvlc Android

Posted: 06 Jul 2016 22:39
by Jean-Baptiste Kempf
MediaCodec implementation.

Re: Green Line libvlc Android

Posted: 07 Jul 2016 13:14
by pecana
MediaCodec implementation.
Leaving the acceleration disabled and adding this options:

options.add("--no-skip-frames");
options.add("--no-drop-late-frames");
options.add("--avcodec-skip-frame");
options.add("0");
options.add("--avcodec-skip-idct");
options.add("0");

make the player working correctly and without green bar.
Otherwise setting acceleration to automatic, full or encoding cause the greenline (but not on all the stream)

Re: Green Line libvlc Android

Posted: 30 Aug 2016 11:44
by pecana
Making some more test i noticed that the greenline appears where the video size is strange:

D/VLC: [62395858/738] core video output: Deinterlacing available
D/VLC: [62395858/738] core video output: deinterlace 0, mode blend, is_needed 0
D/VLC: [62395858/73c] core video output: Opening vout display wrapper
D/VLC: [62395858/73c] core video output: original format sz 1280x736, of (0,0), vsz 1280x728, 4cc ANOP, sar 1:1, msk r0x0 g0x0 b0x0
D/VLC: [62395858/73c] core video output: Detected interlaced video
D/VLC: [62395858/73c] core video output: deinterlace 0, mode blend, is_needed 1
D/VLC: [62395858/72b] core video output: destroying useless vout

Otherwise the greenline does not appears if the formati is different

D/VLC: [664c9c28/187a] core video output: Deinterlacing available
D/VLC: [664c9c28/187a] core video output: deinterlace 0, mode blend, is_needed 0
D/VLC: [664c9c28/187e] core video output: Opening vout display wrapper
D/VLC: [664c9c28/187e] core video output: original format sz 1280x720, of (0,0), vsz 1280x720, 4cc ANOP, sar 1:1, msk r0x0 g0x0 b0x0
D/VLC: [664c9c28/187e] core video output: Detected interlaced video
D/VLC: [664c9c28/187e] core video output: deinterlace 0, mode blend, is_needed 1

Is a libvlc issue or a video issue?

Re: Green Line libvlc Android

Posted: 06 Sep 2016 11:56
by pecana
Hello???

Re: Green Line libvlc Android

Posted: 23 Sep 2016 14:54
by Jean-Baptiste Kempf
This is fixed.