Closed michalSolarz closed 4 years ago
What I'd recommend is (what you're already aware 🤓 ) to follow along the ffmpeg's dash demuxer source code and try to see where you would add the code and then patch it and build it (or even try to submit it to FFmpeg)
I really don't know if the scenario where you just offer the buffer io (avio) and try to proxy the manifest and decrypt the segments is easier. =/
Hmm, thats the way I would like to follow but I don't know how to use my newly created demuxer code. How could I force ffmpeg to use it? Because for now the only way of overriding something I've found was using custom read_data function. Am I missing something? What is a recommended way of using custom demuxer implementation?
I'm under the impression that if you override the current implementation and build/compile ffmpeg from scratch it'll work.
I think if you plan to add a new demuxer you can inspire yourself by looking in patches how people added (in this case a codec but it looks similar I suppose) or grep with git the addition of a new demuxer.
Here's the addition of dav1d (av1 codec) https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/beaa350e24167f4ff31275a6114693f5ce7cd409 so you might help you
Hi, I've managed to find some nice example of dash player in libdash sources and now I'm following it and reimplementing my own player so I probably won't add it directly in ffmpeg but add decryption after buffering chunk. But thanks for help :)
@madphysicist that's awesome, if you can just share it on github so more people might learn as you did.
@leandromoreira I'm assuming you meant @michalSolarz.
@leandromoreira here is a libdash repository: https://github.com/bitmovin/libdash and one day I'll probably create a PR
Hi there @leandromoreira, That tutorial is really impressive, but I've got some question. I'm generally new in C/C++ and using ffmpeg as a library. I want to try to open DASH with following code
The biggest problem with opening it is that: DASH init segment and data segments are encrypted with AES-256. Default DASH demuxer implementation is not able do decode segments on fly so I'm aware that I probably need to rewrite it, but I've no idea how to properly begin reading that stream because now I'm receiving a segfault at readData function. Have you got any idea how could I begin reading from that stream? I've got a key for decrypting that stream.