emarsden / dash-mpd-cli

Download media content from a DASH-MPEG or DASH-WebM MPD manifest
https://emarsden.github.io/dash-mpd-cli/
MIT License
293 stars 33 forks source link

i'm prob missing something idk what (error code) #85

Closed BlazeVertex closed 3 weeks ago

BlazeVertex commented 1 month ago

ERROR

PS C:\Users\Mr.Fox> --key 0ef95d2d827734ab8d855aff73c6f7bb:7fd8c3c218261f9fa456f4cfbf2d152c \ At line:1 char:5

+   --key 0ef95d2d827734ab8d855aff73c6f7bb:7fd8c3c218261f9fa456f4cfbf2d ...
+     ~

Missing expression after unary operator '--'. At line:1 char:5

+   --key 0ef95d2d827734ab8d855aff73c6f7bb:7fd8c3c218261f9fa456f4cfbf2d ...
+     ~~~

Unexpected token 'key' in expression or statement.

what i tried

i have two keys i tried to also follow this method:

dash-mpd-cli --key 43215678123412341234123412341237:12341234123412341234123412341237 \
  --key 43215678123412341234123412341236:12341234123412341234123412341236 \
   https://example.com/manifest.mpd -o MyVideo.mp4

with the correct keys one from audio and the other from video without succses these are the keys for audio and video

9fbfc75592a13fff99ece451a81379fe:b47a1508fe53550399e0a059eb531094 0ef95d2d827734ab8d855aff73c6f7bb:7fd8c3c218261f9fa456f4cfbf2d152c

so what is now the correct config i use podman to run it btw

emarsden commented 1 month ago

I'm guessing from the error messages that you are using Microsoft Windows and Powershell. It's not clear exactly what commands you have tried, though. Just entering --key 1234:5678 into the shell as you indicate in your first two examples won't do anything useful. The method you show starting with dash-mpd-cli looks correct, but that's not the right command for using the container image.

Try a command of the form described in the documentation for running with podman, but add your --key arguments where the other arguments (like --xslt-stylesheet) are. If that doesn't work, I can't help you unless you specify the exact commandline that you used.

https://emarsden.github.io/dash-mpd-cli/container.html

BlazeVertex commented 1 month ago

I'm guessing from the error messages that you are using Microsoft Windows and Powershell. It's not clear exactly what commands you have tried, though. Just entering --key 1234:5678 into the shell as you indicate in your first two examples won't do anything useful. The method you show starting with dash-mpd-cli looks correct, but that's not the right command for using the container image.

Try a command of the form described in the documentation for running with podman, but add your --key arguments where the other arguments (like --xslt-stylesheet) are. If that doesn't work, I can't help you unless you specify the exact commandline that you used.

https://emarsden.github.io/dash-mpd-cli/container.html

I have basicaly 7 keys but iknow only thos that i already provided are the one from audio and video.

this was the command:

podman run --rm --tty -v .:/content ghcr.io/emarsden/dash-mpd-cli --key 9fbfc75592a13fff99ece451a81379fe:b47a1508fe53550399e0a059eb531094 \ --key 0ef95d2d827734ab8d855aff73c6f7bb:7fd8c3c218261f9fa456f4cfbf2d152c \ --quality best https://my mpd link/.mpd

iknow something is missing idk what (i dont do the O part)

yes i use windows

emarsden commented 1 month ago

The "\" is for when you type a partial line; you put it at the end of a line to make things easier to read in a script, for example. If you're typing things directly into the terminal you can remove the two "\" characters. Otherwise, that command looks correct.

emarsden commented 1 month ago

Ah, my "\" was eaten. I meant remove the two "\" characters.

BlazeVertex commented 1 month ago

How do i know what key is for the subttitles? or is it just within the mpd and a quick question i'm not that good with all this but how would that look,with my example? To get the subs?

podman run --rm --tty -v .:/content ghcr.io/emarsden/dash-mpd-cli --key 9fbfc75592a13fff99ece451a81379fe:b47a1508fe53550399e0a059eb531094 --key 0ef95d2d827734ab8d855aff73c6f7bb:7fd8c3c218261f9fa456f4cfbf2d152c --quality best https://my mpd link/.mpd

I rather ask here before i open another issue

BTW the \ where indeed the problem

emarsden commented 1 month ago

It depends on your MPD, but most subtitles are not encrypted and do not need a key.

To download subtitles, you'll need to include --write-subs in the commandline (after --quality best for example).

Otherwise, that commandline looks like it should work. Please paste the exact error (add -v to the commandline to get more information) if it doesn't.

BlazeVertex commented 4 weeks ago

With the keys within the comandline and the write subs also tried with only the mpd alone

PS C:\Users\Mr.Fox> podman run --rm --tty -v .:/content ghcr.io/emarsden/dash-mpd-cli --muxer-preference mkv:mkvmerge --quality best --write-subs https://mylink.mpd -o file.srt

or

C:\Users\Mr.Fox> podman run --rm --tty -v .:/content ghcr.io/emarsden/dash-mpd-cli --muxer-preference mkv:mkvmerge --key 31e69f7874f7334d84ee2fb921fd305b:a76b9b3bde5a773f4ab2ce5215006148 --key f97792222bc83cbea98d7aa38f208acc:a511545c0e5b816c776aa2006301fa12 --key ba52c00c1b4f4294a4e0e87b7b7985b1:453c1d6f6192a95cfde8715bf1fae5ae --key 5dfc821baba4350db455f3a7b996e460:c80599a2c75de87e5fe2ff6869efb096 --key b4aa2ce59fa43f758249db318d78ccfe:21be03aec51f4e66c38477f2c79c0508 --key 6be26c8778c03afb9520e53f1d226c45:574551edaf755f9483fd82a01a61e2b7 --key 4508ffdfb8fc3d6287699fb16d2ff9bd:2f4d2a6b65e3f9ca37f8036390bf1c76 --quality best --write-subs https://mylink.mpd -o file.mkv

[2m] [#################################################>] Muxing audio and video06:59:43 INFO Muxer preference for mkv is ["mkvmerge"] 06:59:43 INFO Trying muxer mkvmerge 07:00:24 INFO Muxing with mkvmerge subprocess succeeded 07:00:24 INFO MP4Box stderr: IsoMedia import dashmpd-subs8PX4FUR.sub - track ID 1 - media type "subt:stpp" Importing ISO File: |=============== | (76/100) 07:00:24 INFO Merged subtitles with MP4 container

It depends on your MPD, but most subtitles are not encrypted and do not need a key.

To download subtitles, you'll need to include --write-subs in the commandline (after --quality best for example).

Otherwise, that commandline looks like it should work. Please paste the exact error (add -v to the commandline to get more information) if it doesn't.

Jup what do i do wrong?

emarsden commented 4 weeks ago

The first command is not going to work; it's asking to save audio/video content in a file with an extension corresponding to subtitles.

The second command looks OK, and from the parts you quoted it looks like it worked OK. It included the subtitles as a track in file.mkv, and they should hopefully be playable with a good player (try VLC for example). Why do you say something went wrong?

BlazeVertex commented 4 weeks ago

The first command is not going to work; it's asking to save audio/video content in a file with an extension corresponding to subtitles.

The second command looks OK, and from the parts you quoted it looks like it worked OK. It included the subtitles as a track in file.mkv, and they should hopefully be playable with a good player (try VLC for example). Why do you say something went wrong?

I will not be on my main computer this weekend i will test it later again. I got it to work yes and also playable on vlc but could only view 1min of the video then when i skipped along a bit further it din't play everything. It seems like the file din't want to play until the end i will further test the second command with something else and report back?

BlazeVertex commented 3 weeks ago

second command does not work bcs my file is only (final mkv) same error

[2m] [#################################################>] Muxing audio and video06:59:43 INFO Muxer preference for mkv is ["mkvmerge"] 06:59:43 INFO Trying muxer mkvmerge 07:00:24 INFO Muxing with mkvmerge subprocess succeeded 07:00:24 INFO MP4Box stderr: IsoMedia import dashmpd-subs8PX4FUR.sub - track ID 1 - media type "subt:stpp" Importing ISO File: |=============== | (76/100) 07:00:24 INFO Merged subtitles with MP4 container image 164kb big

emarsden commented 3 weeks ago

OK, mkvmerge is reporting success in muxing (merging audio + video streams) but it seems the muxing is not really working.

You might try using ffmpeg to mux, by adding to your commandline --muxer-preference mkv:ffmpeg.

If that doesn't work you can send me the mpd URL (by email if it's private) and I can take a look at what's going wrong.

BlazeVertex commented 3 weeks ago

OK, mkvmerge is reporting success in muxing (merging audio + video streams) but it seems the muxing is not really working.

You might try using ffmpeg to mux, by adding to your commandline --muxer-preference mkv:ffmpeg.

If that doesn't work you can send me the mpd URL (by email if it's private) and I can take a look at what's going wrong.

where can i send the email to? you din't mention the email address

emarsden commented 3 weeks ago

Email: eric.marsden@risk-engineering.org