-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Encryption of H265 fails with Failed to read slice header #627
Comments
Can you share your input files with us? You may email it to shaka-packager-issues@google.com if it cannot be shared publicly. |
The files were sent via email. Let me know if you have any issues receiving them. |
@johnpletka Received. Thanks. Will take a look soon. |
Hi there. I have the exact same issue here.... using an h265 generated video from aws media convert. |
@johnpletka @markitodelacruz It is the same problem as #621, but for H265, i.e. the parameter sets, e.g. SPS, PPS, are not present in the header (sample description box). A fixed will be pushed soon. Please follow the update on #621. |
@kqyang thanks for the update. Quick question... is this issue related to this specific Shaka packager version only? is there any other version where this process works that we could use in the meantime? |
@markitodelacruz It is a new problem. I have just pushed the fix this morning. Let us know if it does not work for you. |
thank you @kqyang |
@markitodelacruz You can build it yourself. See building instructions here: https://google.github.io/shaka-packager/html/build_instructions.html. You may also be able to find it in our build bots: https://travis-ci.org/google/shaka-packager, https://ci.appveyor.com/project/shaka/shaka-packager. If you don't mind waiting, we should have a new release this month. |
I can confirm that this is fixed for my H265 AWS transcode. Thanks for the quick response! |
@johnpletka Thanks for the verification! @markitodelacruz You may also use Docker: https://google.github.io/shaka-packager/html/docker_instructions.html if you don't want to build it by yourself. |
thank you @kqyang |
@markitodelacruz Glad to hear that! Enjoy. |
System info
Operating System: Linux Mint 18.1 Serena
Shaka Packager Version: v2.3.0-5bf8ad5-release (also master branch from 20190726)
Issue and steps to reproduce the problem
Packager Command:
$PACKAGER
in="$VIDEO_FILE,stream=video,init_segment=encrypted_content/video_init.mp4,segment_template=encrypted_content/video$Number$.m4s"
in="$AUDIO_FILE,stream=audio,init_segment=encrypted_content/audio_init.mp4,segment_template=encrypted_content/audio$Number$.m4s"
--enable_widevine_encryption
--key_server_url "$PROD_KEY_URL"
--content_id "$CONTENT_ID"
--signer "$PROVIDER"
--aes_signing_key "$PROD_SIGNING_KEY"
--aes_signing_iv "$PROD_SIGNING_IV"
--generate_static_mpd
--segment_duration '30'
--mpd_output encrypted_content/h265.mpd
Extra steps to reproduce the problem?
If I leave off the encryption parameters from the packager command (i.e. just segment and make an mpd_output), then it works fine.
The source file is being produced by AWS Media Convert with the following settings:
"VideoDescription": {
"Width": 2048,
"ScalingBehavior": "DEFAULT",
"Height": 858,
"TimecodeInsertion": "DISABLED",
"AntiAlias": "ENABLED",
"Sharpness": 50,
"CodecSettings": {
"Codec": "H_265",
"H265Settings": {
"InterlaceMode": "PROGRESSIVE",
"NumberReferenceFrames": 2,
"GopClosedCadence": 1,
"AlternateTransferFunctionSei": "DISABLED",
"GopSize": 48,
"Slices": 1,
"GopBReference": "DISABLED",
"SlowPal": "DISABLED",
"SpatialAdaptiveQuantization": "ENABLED",
"TemporalAdaptiveQuantization": "ENABLED",
"FlickerAdaptiveQuantization": "DISABLED",
"Bitrate": 16000000,
"FramerateControl": "INITIALIZE_FROM_SOURCE",
"RateControlMode": "CBR",
"CodecProfile": "MAIN_MAIN",
"Tiles": "ENABLED",
"Telecine": "NONE",
"MinIInterval": 0,
"AdaptiveQuantization": "HIGH",
"CodecLevel": "AUTO",
"SceneChangeDetect": "ENABLED",
"QualityTuningLevel": "SINGLE_PASS_HQ",
"FramerateConversionAlgorithm": "DUPLICATE_DROP",
"UnregisteredSeiTimecode": "DISABLED",
"GopSizeUnits": "FRAMES",
"ParControl": "INITIALIZE_FROM_SOURCE",
"NumberBFramesBetweenReferenceFrames": 2,
"TemporalIds": "DISABLED",
"SampleAdaptiveOffsetFilterMode": "ADAPTIVE",
"WriteMp4PackagingType": "HEV1",
"DynamicSubGop": "STATIC"
}
},
"AfdSignaling": "NONE",
"DropFrameTimecode": "ENABLED",
"RespondToAfd": "NONE",
"ColorMetadata": "INSERT"
},
"NameModifier": "_video"
}
What is the expected result?
It creates a encrypted_content directory with a h265.mpd file, video_init.mp4, audio_init.mp4 and the video chunked into 30 second segments and encrypted
What happens instead?
~/bin/package_encrypt_latest.sh charlie ANFC_video_120s.mp4 ANFC_audio_120s.mp4
CONTENT_NAME = charlie ID = 636861726c6965
VIDEO_FILE = ANFC_video_120s.mp4
AUDIO_FILE = ANFC_audio_120s.mp4
PROD_KEY_URL = https://license.widevine.com/cenc/getcontentkey/nagramycinema
[0726/140626:INFO:demuxer.cc(88)] Demuxer::Run() on file 'ANFC_audio_120s.mp4'.
[0726/140626:INFO:demuxer.cc(160)] Initialize Demuxer for file 'ANFC_audio_120s.mp4'.
[0726/140626:INFO:demuxer.cc(88)] Demuxer::Run() on file 'ANFC_video_120s.mp4'.
[0726/140626:INFO:demuxer.cc(160)] Initialize Demuxer for file 'ANFC_video_120s.mp4'.
[0726/140626:WARNING:track_run_iterator.cc(699)] Seeing non-zero composition offset 3750. An EditList is probably missing.
[0726/140626:WARNING:track_run_iterator.cc(703)] Adjusting timestamps by -3750. Please file a bug to https://github.com/google/shaka-packager/issues if you do not think it is right or if you are seeing any problems.
[0726/140626:ERROR:subsample_generator.cc(319)] Failed to read slice header.
[0726/140626:ERROR:demuxer.cc(327)] Failed to process sample 256 9 (ENCRYPTION_FAILURE): Failed to read slice header.
[0726/140626:ERROR:mp4_media_parser.cc(793)] Failed to process the sample.
[0726/140626:ERROR:packager_main.cc(530)] Packaging Error: 8 (PARSER_FAILURE): Cannot parse media file ANFC_video_120s.mp4
The text was updated successfully, but these errors were encountered: