简体   繁体   English

如何从 stream mpd 文件编译音频和视频?

[英]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.我已经下载了带有 stream.mpd 文件的 DRM 保护内容音频和视频文件。 The audio and video files are encrypted using a key that can be found in stream.mpd file.音频和视频文件使用 stream.mpd 文件中的密钥加密。 So, how can I decrypt it and compile audio and video files and make a running mp4 file?那么,我怎样才能解密它并编译音频和视频文件并制作一个可以运行的 mp4 文件呢?

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 ).首先快速检查一下 - 如果视频和/或音频受标准 DRM 保护,则将密钥包含在 mpd 文件中是不正常的,所以我猜您正在使用 Clearkey 保护( 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假设是这种情况,您可以将这些段连接成一个 mp4 文件 - 请参阅示例以及有关 windows 系统限制的一些讨论: https://stackoverflow.com/a/27017348/334402

You can use ffmpeg to decrypt - eg:您可以使用 ffmpeg 解密 - 例如:

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

( https://ffmpeg.org/ffmpeg-formats.html#Options-1 ) 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.如果这是一个问题,您的客户端可能允许您为整个视频使用特定的比特率而不是切换 select。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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