What happened?
Decryption error with path and filename containing spaces.
Exception: Decryption returned a non-zero exit code
I checked the version of shaka-packager, it's latest. (see https://github.com/Puyodead1/udemy-downloader/issues/116)
I tried with mp4decrypt:
sudo cp ./mp4decrypt /usr/bin
sudo chmod 755 /usr/bin/mp4decrypt
mp4decrypt --show-progress --key bdd****************************4c3:758f************************cdd'/home/rickey/Github/udemy-downloader/out_dir/powershell-core-les-fondamentaux/01 - Introduction to PowerShell/005 Discovering the PowerShell console .encrypted.mp4' '/home/rickey/Github/udemy-downloader/out_dir/powershell-core-les-fondamentaux/01 - Introduction to PowerShell/005 Discovering the PowerShell console.mp4'
It works without audio.
So I thought shaka was buggy, I tried manually:
sudo cp ./shaka-packager /usr/bin
sudo chmod 755 /usr/bin/shaka-packager
shaka-packager --enable_raw_key_decryption --keys key_id=bdd*************************4c3:key=758**********************cdd in="/home/rickey/Github/udemy-downloader-feat-selenium/out_dir/powershell-core-les-fondamentaux/01 - Introduction to PowerShell/005 Discovering the powershell console .encrypted.mp4",stream=video,output=test.mp4
[0816/070349:ERROR:packager_main.cc(551)] Packager Error: 5 (FILE_FAILURE): Could not open file for reading /home/rickey/Github/udemy-downloader-feat-selenium/out_dir/powershell - core-the-fundamentals/01 - Introduction to PowerShell/005 Getting to Know PowerShell console.encrypted.mp4
I downloaded selenium branch, same bug.
After doing some research, I noticed that users weren't using spaces in their paths or filenames.
See https://github.com/shaka-project/shaka-packager/issues/334 and https://github.com/shaka-project/shaka-packager/issues/962
cd "/home/rickey/Github/udemy-downloader-feat-selenium/out_dir/powershell-core-les-fondamentaux/01 - Introduction to PowerShell/"
cp "01 - Introduction to PowerShell/005 Discovering PowerShell console.encrypted.mp4" test.encrypted.mp4
shaka-packager --enable_raw_key_decryption --keys key_id=bdd*************************4c3:key=758**********************dd in=test.encrypted.mp4,stream=0,output=test.mp4
It worked.
Of course, I tested many syntaxes like these:
shaka-packager input="blablablabla", stream=0
shaka-packager input="blabla blabla",stream=0
shaka-packager=blabla blabla, stream=video
shaka-packager 'input=blabla blabla,stream=video'
shaka-packager 'input=blabla blabla, stream=video'
shaka-packager 'input="blabla blabla",stream=0'
shaka-packager 'in="blabla blabla",stream=0'
To join audios and videos :
shaka-packager --enable_raw_key_decryption --keys key_id=bdd*************************4c3:key=758**********************dd in=test.encrypted.mp4,stream=video,output=test.mp4
shaka-packager --enable_raw_key_decryption --keys key_id=bdd*************************4c3:key=758**********************dd in=test.encrypted.m4a,stream=audio,output=test.m4a
ffmpeg -i test.mp4 -i test.m4a -acodec copy -vcodec copy merged.mp4
Same error on Windows 10 (in VM), but i don't know why, shaka work correctly with or without spaces.
Expected Result
a new script to decrypt and merge (manually ?) the "*.encryted.mp4" and "*.encryted.m4a" ?
Branch
master/main
What operating systems are you seeing the problem on?
Linux/Unix
Relevant log output
[10:26:47] [udemy-downloader] [handle_segments:1344] INFO: > Lecture Tracks Downloaded
[10:26:47] [udemy-downloader] [handle_segments:1353] INFO: KID for video file is: BDD***************************************4C3
[10:26:47] [udemy-downloader] [handle_segments:1360] INFO: KID for audio file is: BDD***************************************4C3
[10:26:47] [udemy-downloader] [handle_segments:1366] INFO: > Decrypting video, this might take a minute...
[0815/222647:ERROR:packager_main.cc(551)] Packaging Error: 5 (FILE_FAILURE): Cannot open file for reading 005 Découverte de la console PowerShell.encrypted.mp4
[10:26:47] [udemy-downloader] [handle_segments:1389] ERROR: [-] Error:
Traceback (most recent call last):
File "/home/rickey/Github/udemy-downloader-feat-selenium/main.py", line 1367, in handle_segments
ret_code = decrypt(video_kid, video_filepath_enc, video_filepath_dec)
File "/home/rickey/Github/udemy-downloader-feat-selenium/main.py", line 1304, in decrypt
raise Exception("Decryption returned a non-zero exit code")
Exception: Decryption returned a non-zero exit code
Other information
No response
bug