简体   繁体   中英

How to compile audio and videos from a stream mpd file?

I have downloaded a DRM protected content audio and video files with a stream.mpd file. The audio and video files are encrypted using a key that can be found in stream.mpd file. So, how can I decrypt it and compile audio and video files and make a running mp4 file?

Just a quick check first - if the video and/or audio is protected by a standard DRM it would not be normal for the key to be included in the mpd file, so I am guessing you are using Clearkey protection ( https://github.com/Dash-Industry-Forum/ClearKey-Content-Protection ).

Assuming this is the case you can concatenate the segments into an mp4 file - see example and also some discussion on limitation on windows systems here: https://stackoverflow.com/a/27017348/334402

You can use ffmpeg to decrypt - eg:

ffmpeg -decryption_key {key} -I {input-file} {output-file}

( https://ffmpeg.org/ffmpeg-formats.html#Options-1 )

One thing to also be aware of is that most dash videos will have multi bit rate renditions and your client will download whatever bitrate is appropriate for the device and network conditions at any point during the streaming. For this reason you may have a mix of bit rates/resolutions and hence quality in the final video. If this is an issue your client may allow you to select a particular bitrate for the entire video instead of switching.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM