PDA

View Full Version : Help to record stream with livestreamer (linux)


piratilla_bcn
01-23-2017, 07:27 AM
Hi,

I used to record via command line this stream:

http://www.rtp.pt/play/direto/rtpafrica

It used to work like these:

livestreamer "hlsvariant://http://rtp-pull-wrtp-live.hls.adaptive.level3.net/liverepeater/smil:rtpafrica.smil/playlist.m3u8" best -o - | ffmpeg -i - /var/tmp/RTPAfrica.mp4

The URL seems to be the same, but when I do it know I receive this from livestreamer:

error: Unable to open URL: http://rtp-pull-wrtp-live.hls.adaptive.level3.net/liverepeater/smil:rtpafrica.smil/playlist.m3u8 (401 Client Error: Unauthorized for url: http://rtp-pull-wrtp-live.hls.adaptive.level3.net/liverepeater/smil:rtpafrica.smil/playlist.m3u8)

Any ideas?

Many thanks in advance! :-)

troller12
01-23-2017, 10:08 AM
Hi,

you need to use a referer paramter to get it work with LS.If you load the site and check the response in the webconsole of your browser then you can see it.

Just use it like this...
livestreamer --http-header "Referer=http://www.rtp.pt/play/direto/rtpafrica" "hlsvariant://http://rtp-pull-wrtp-live.hls.adaptive.level3.net/liverepeater/smil:rtpafrica.smil/playlist.m3u8" best
greetz

piratilla_bcn
01-23-2017, 10:14 AM
Many thanks!! :-)