pychromecast icon indicating copy to clipboard operation
pychromecast copied to clipboard

Playing Reddit HLS or Dash videos back

Open christianselig opened this issue 5 years ago • 3 comments

I can't for the life of me figure out how to playback Reddit videos with pychromecast. They're available either as HLS or DASH. Here's one of each https://v.redd.it/3hyw7hwoajn21/HLSPlaylist.m3u8 (HLS) and https://v.redd.it/3hyw7hwoajn21/DASHPlaylist.mpd (DASH).

If I try mc.play_media('https://v.redd.it/3hyw7hwoajn21/HLSPlaylist.m3u8', 'video/m3u8'), no luck. If I try mc.play_media('https://v.redd.it/3hyw7hwoajn21/DASHPlaylist.mpd', 'application/dash+xml') also no luck. I've also tried the content type application/x-mpegURL to no avail.

How would I accomplish this?

christianselig avatar Mar 22 '19 17:03 christianselig

application/vnd.apple.mpegurl is the right content type of HLS.

balloob avatar Mar 22 '19 18:03 balloob

@balloob Tried that unfortunately.

mc.play_media('https://v.redd.it/3hyw7hwoajn21/HLSPlaylist.m3u8', 'application/vnd.apple.mpegurl')

Still does not play.

christianselig avatar Mar 22 '19 19:03 christianselig

@balloob I see it's possible with the DASH URL to separate the video and audio streams (https://v.redd.it/3hyw7hwoajn21/DASH_720 and https://v.redd.it/3hyw7hwoajn21/audio respectively).

Is there a way then to play the video with a separate audio track?

christianselig avatar Mar 22 '19 20:03 christianselig