question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PSSH box is missing after ffmpeg encryption

See original GitHub issue

I was able to reproduce your results with ffmpeg 4.1.3. I tried re-encoding audio & video, I tried audio-only, I tried video-only, and I tried with flags to output fragmented mp4.

I got it to work with Shaka Packager for encryption, and playing back through a DASH manifest:

packager \
  input=SampleVideo_1280x720_1mb.mp4,stream=video,output=video.mp4 \
  input=SampleVideo_1280x720_1mb.mp4,stream=audio,output=audio.mp4 \
  --enable_raw_key_encryption \
  --keys key_id=a7e61c373e219033c21091fa607bf3b8:key=76a6c65c5ea762046bd749a2e632ccbb \
  --clear_lead 0 \
  --mpd_output dash.mpd

This plays through DASH & MediaSource w/ ClearKey for decryption, but if I try to play back one of the individual files (video.mp4 or audio.mp4) with src=, playback seems to fail. I’m not sure why yet. When this fails, video.mediaKeys is null, so I think that Shaka’s DrmEngine doesn’t set up ClearKey with src= for some reason. It could be a lack of PSSH box in the mp4s.

_Originally posted by @joeyparrish in https://github.com/google/shaka-player/issues/2139#issuecomment-529566212_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
joeyparrishcommented, Feb 11, 2021

Okay, thanks for confirming. In the future, please file exoplayer issues here instead: https://github.com/google/exoplayer

0reactions
Dunacommented, Feb 8, 2021

I am trying to play on exoplayer. And it seems it is a confirmed issue. Pssh box is ignored.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PSSH box is missing after ffmpeg encryption #3129 - GitHub
How to add the pssh box to the ffmpeg command line? it seems the mp4 output encrypted file does not contain pssh box....
Read more >
PSSH box missing when generating encrypted files using ...
I am trying to play from local storage an encrypted video using ExoPlayer. The command used to encrypt the video using FFMPEG is...
Read more >
8815 (pssh boxes are ignored when present before trak box)
I would like to extract "Encryption initialization data" from a mp4 container, but the ffmpeg does not parse pssh boxes if they are...
Read more >
Get Pssh Key of MPD Files - VideoHelp Forum
Hello , can any one help me with any guide to know how to get pssh key of mpd files encrypted with webdevine...
Read more >
mp4dash - Bento4
The <widevine-header> argument can be either: (1) the character '#' followed by a Widevine header encoded in Base64 (either a complete PSSH box...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found