Meta.Vlc icon indicating copy to clipboard operation
Meta.Vlc copied to clipboard

Multicast UDP performance/stability

Open lasairport opened this issue 8 years ago • 2 comments
trafficstars

Having a problem with multicast UDP video rendering performance/stability. Is there a known issue with this? Both native VLC player and vlc.dotnet don't have an issue with my stream.

I have tried experimenting with the network-caching setting to no avail. Really simple/basic configuration of the stream.

        <Grid.Resources>
            <x:Array Type="{x:Type system:String}" x:Key="VlcOptions">
                <system:String>-I</system:String>
                <system:String>--dummy-quiet</system:String>
                <system:String>--ignore-config</system:String>
                <system:String>--no-video-title</system:String>
                <system:String>--no-sub-autodetect-file</system:String>
                <system:String>--network-caching=500</system:String>
            </x:Array>
        </Grid.Resources>

        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <Wpf:VlcPlayer x:Name="myControl" EndBehavior="Nothing" VlcOption="{StaticResource VlcOptions}" LibVlcPath="..\..\libvlc" Stretch="No
ne"/>

I have also tried passing the url in directly. Format of the url is udp://@239.25.4.30:1246

                Uri uri = null;
                if (!Uri.TryCreate(url, UriKind.Absolute, out uri)) return;

                myControl.LoadMedia(uri);
                myControl.Play();

Anything else I can try? Here's a sample of what I mean by stability. The stream is MPEG2 with MPEG-TS wrapper over UDP multicast.

sample error

lasairport avatar Jun 21 '17 20:06 lasairport

No idea with it...I can give you 'help wanted' tag

devkanro avatar Jun 22 '17 12:06 devkanro

The solution is to enable hardware acceleration. Attention, this must be done after LoadMedia!

VlcPlayer.LoadMedia(streamURL); VlcPlayer.AddOption(":avcodec-hw=dxva2"); VlcPlayer.Play();

wasserwiesel avatar Jul 06 '18 10:07 wasserwiesel