microsoft / microsoft/FFmpegInterop

Working on a fork to integrate all changes

Open
#219 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
1.4k
Forks
319
PR merge metrics
No merged PRs in 30d

Description

I got a bit bored lately. There is so much work done here lately, so many fixes and improvements, but it is not possible to test it all together because it is all scatterd throughout various branches, nothing is merged. To solve #217, a bigger refactoring is neccessary (at least in my opinion), but it's not possible (or advisable) to do this with so many open big PRs. And I did not want to wait. So I just went ahead and started working on my own fork (https://github.com/lukasf/FFmpegInterop). I done the refactoring there, I improved various things along the way. I merged (or re-implemented) almost all open PRs. I have done some initial testing, things look good so far. Some of the files that did not work before now work fine.

These are some of the things I improved, in addition to the PRs:

  • clean, separate processing loops for compressed and uncompressed sample providers
  • improved handling of AVPackets and AVFrames (no unneccessary alloc/dealloc, no copy to stack)
  • correct end-of-stream handling to get about a dozen missing frames out of the decoder
  • zero-copy for many uncompressed audio streams
  • support for 3 different audio output formats
  • smart audio format preselection to avoid resampler where possible
  • multi threaded audio decoding
  • gapless audio handling (maybe more work is needed)
  • skip unneccessary first seek on file open
  • report stream size to ffmpeg (important one for broken files!)
  • improved video output format handling (prefer NV12 for most cases)
  • chroma location handling
  • introduced FFmpegConfig class to avoid parameter hell and allow more customizations

Maybe it is a good idea to work on this fork, instead of making even more branches? We can test all the changes there. When we have a good and stable state, and when @khouzam is back from hibernation, we could merge everything back into the official repo.

The next big thing I would like to do is multi audio streams (which again requires bigger rework of the whole thing).

I would invite anyone who likes the idea, to join my fork and test with their files. Who is interested? @mcosmin222 @reego-fr ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the FFmpegInterop fork linked in the issue and the open pull requests it says were merged or re-implemented. Compare the fork's refactoring and media-processing changes with the official repository. Done would require agreement on a stable integrated direction and a path to merge the work back into the official repository.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
audio-video-rtc
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.