# FFME **Repository Path**: arnojin_arno/ffme ## Basic Information - **Project Name**: FFME - **Description**: FFME: The Advanced WPF MediaElement Alternative. Fork From https://github.com/unosquare/ffmediaelement.git - **Primary Language**: C# - **License**: MS-PL - **Default Branch**: arnojin - **Homepage**: https://github.com/unosquare/ffmediaelement.git - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-02-27 - **Last Updated**: 2024-05-29 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # FFME: The Advanced WPF MediaElement Alternative. ## 项目说明 基于 [FFmpeg](https://gitee.com/mirrors/ffmpeg), [FFmpeg.AutoGen](https://github.com/Ruslan-B/FFmpeg.AutoGen) 使用 C# [.NET 5](https://docs.microsoft.com/en-us/dotnet/core/dotnet-five) WPF 开发的媒体播放器,内建库可以替代 [MediaElement 类](https://docs.microsoft.com/zh-cn/dotnet/api/system.windows.controls.mediaelement?view=net-5.0) 项目 Fork From GitHub [FFMediaelEment](https://github.com/unosquare/ffmediaelement.git) 通过VS2019使用该库参见:[Quick Usage Guide for WPF Apps](README.md) 参考文章:[FFmpeg](https://gitee.com/arnojin_arno/article#ffmpeg) ## 修改记录 * 2021-02-27 增加项目说明文件 ## 备注 1. Initializes the input context to start read operations. ffmpeg.av_find_input_format() 1. Create the input format context, and open the input based on the provided format options. ffmpeg.av_dict_set(), ffmpeg.av_dict_get(), ffmpeg.av_dict_free(), ffmpeg.av_dict_count() 1. Create the input context ffmpeg.avformat_alloc_context() 1. Open the input and pass the private options dictionary ffmpeg.avformat_open_input() 1. This function will cause global side data to be injected in the next packet of each stream as well as after any subsequent seek. ffmpeg.av_format_inject_global_side_data() 1. This is useful for file formats with no headers such as MPEG. This function also computes the real frame-rate in case of MPEG-2 repeat frame mode. ffmpeg.avformat_find_stream_info() 1. [Initializes a new instance of the CodecContext.](https://github.com/FFmpeg/FFmpeg/blob/master/fftools/ffplay.c#L2559) ffmpeg.avcodec_alloc_context3() 1. Set default codec context options from probed stream ffmpeg.avcodec_copy_context(), ffmpeg.avcodec_parameters_to_context() 1. We set the packet timebase in the same timebase as the stream as opposed to the typical AV_TIME_BASE ffmpeg.av_d2q(); 1. Find the default decoder codec from the stream and set it. ffmpeg.avcodec_find_decoder() 11. If set, change the codec to the forced codec. ffmpeg.avcodec_find_decoder_by_name() 12. Check we have a valid codec to open and process the stream. ffmpeg.avcodec_free_context() 13. Open the CodecContext. This requires exclusive FFmpeg access ffmpeg.avcodec_open2()