chrippa / livestreamer

Command-line utility that extracts streams from various services and pipes them into a video player of choice. No longer maintained, use streamlink or youtube-dl instead.
http://livestreamer.io/
BSD 2-Clause "Simplified" License
3.88k stars 583 forks source link

[error] Failed to create decryptor: Unable to open URL: #1144

Open ralyodio opened 8 years ago

ralyodio commented 8 years ago

Not sure why this isn't working. I'm passing cookie and proper user agent. It works fine in ffmpeg.

  livestreamer \
    -l debug \
    --http-header 'Cookie=${cookie}' \
    --http-header 'User-Agent=iPhone' \
    "hls://${input}" \
    best \
    -o video.ts

My suspicion is the headers aren't being passed along to the secondary request for the key.

[stream.hls][error] Failed to create decryptor: Unable to open URL: https://example/m3u8/v1/generateKey?channel=mychan&kid=/some.key (400 Client Error: Bad Request for url: https://example/m3u8/v1/generateKey?channel=mychan&kid=/some.key)
ghost commented 8 years ago

My suspicion is the headers aren't being passed along to the secondary request for the key.

I don't think so. Headers are passed correctly (also for HLS key requests). I have tested this successfully some time ago.

ralyodio commented 8 years ago

would it help if we did a skype session? I'm happy to show you what i'm doing, but due to expiration I can't paste the url/cookies here as it will expired.

ghost commented 8 years ago

To quickly check what's going on, you can use tools like Wireshark. Monitoring your network traffic while Livestreamer is running, will certainly point you in the right direction.

I don't know what's going on in your case, but if the key file inside the playlist points to wrong URL, Livestreamer won't be able to request the key properly (#1097). In this case we would need a command line option to pass a valid URL to the key file.