Skip to content

Sekoree/FFmpegView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a ffmpeg.autogen binding library, for wpf and avalonia.

Avalonia

in Avalonia,To enable extension should be present in your Program.cs file:

AppBuilder.Configure<App>()
        .UsePlatformDetect()
        .UseFFmpeg()
        .LogToTrace();

then use the FFmpegView in axaml or charp code, and you need handle audio stream here.

WPF

in Wpf,To enable extension should be present in your App.xaml.cs file:

    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);
        BassCore.Initialize();
        Core.Instance.Initialize();
    }

then use the FFmpegView in xaml,and you should set audio handle after InitializeComponent like:

    public MainWindow()
    {
        InitializeComponent();
        playerView.SetAudioHandler(new NAudioStreamDecoder());
    }

HTTP HEADER

for http protocol header setting,just coding like

    playerView.Play(url,headers);
    playerView.SetHeader(headers);

Audio

for Audio Handle,you can use FFmpegView.Bass or FFmpegView.NAudio Bass:

    var playerView = this.FindControl<FFmpegView>("playerView");
    playerView.SetAudioHandler(new BassAudioStreamDecoder());
    playerView.Play("http://vfx.mtime.cn/Video/2019/02/04/mp4/190204084208765161.mp4");

NAudio:

        playerView.SetAudioHandler(new NAudioStreamDecoder());

MEDIA

you can use the MediaItem class the define the resources info,coding like

    var mediaItem = new MediaItem(url);
    playerView.Play(mediaItem);

About

Copy of https://github.com/dove-team/FFmpegView with optimizitions to test things

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published