microsoft / microsoft/FFmpegInterop

Issue with ts files and two uncompressed audio issues solved

Open
#24 1 comment 0 reactions 1 assignee View on GitHub

@timotiusmargo is already working on this.

Since Sep 29, 2015.

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

Description

Hi,

I encountered some issues while testing various files and hopefully I was able to figure out what was wrong. One of my fixes actually changes the signature of a method. That's why I don't submit a pull request right away, there are many ways this issue can be solved but I took the easy one.

Sample files can be found here: http://1drv.ms/1fmUZxd
1-Files having an audio stream whose bit depth is not 16 bits won't play correctly. The wav file I provide is 8 bits. The fix is provided by this commit: https://github.com/reego-fr/FFmpegInterop/commit/3d0a3d5a605aa5a6cde093602d4fcd706b57283e
It is worth mentioning that my desktop is actually able to play audio at 32 bits per samples while my phone is limited to 16 bits only. I don't know if it's possible to retrieve this capability at runtime to deliver the best quality and give the phone hardware/software a chance to support 32 bits in the future but for now it does the job.

2-Some audio streams may not render correctly when decoded by ffmpeg depending on the number of samples per frame. I encountered the issue on dvd_pcm streams. Two of the files I provide exhibit this issue on their pcm stream : the dts sparks vob and vts_04_04 vob. I fixed it in this commit: https://github.com/reego-fr/FFmpegInterop/commit/fb41be9ddab80d4e55da370ff7d177e04ca04431

3-Some files may start at a timestamp greater than 0 but Media Foundation most probably expects samples to be delivered within the start (0) and media duration range. Even though it shows as quite tolerant regarding sample timestamps, the issue becomes critical when it comes to seeking in the media's range.
The sample files to reproduce the issue are the vts_04_04 vob file I provide, and any other vts_xx_02+.vob, as well as ts files but I can't share one of these yet.
The fix I chose is in this commit: https://github.com/reego-fr/FFmpegInterop/commit/a21b3f231153761d74299efddb72145daa694f98

Please let me know what you think about it and if you want me to submit pull requests.

Kind regards

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.