linkswien / demotape

Constantly monitor Wien.gv.at for new livestreams of Bezirksvertretungssitzungen and download everything you can get.
0 stars 1 forks source link

Update script for new urls from the websites #1

Open noahsmindfuck opened 3 weeks ago

noahsmindfuck commented 3 weeks ago

The url's have changed. Apparently the url from the script 'url': 'https://stream.wien.gv.at/live/ngrp:bv' + district_str_lz + '.stream_all/playlist.m3u8' is not valid anymore or at least not for all streams (needs to be tested).

one example link looks like this: src="https://z4atvie10swse101.rtccdn.com/pidbv/smil:pidbv_1060.smil/playlist.m3u8"

also, one was able to view the stream here so maybe that is another valid source: https://pidbv.justlive.tv/player.php?stream=bv1060

TODO:

Possible help:

fleimgruber commented 2 weeks ago

I tested the URL https://z4atvie10swse101.rtccdn.com/pidbv/smil:pidbv_1060.smil/playlist.m3u8 with ffmpeg (which is what youtube-dl would call eventually, IIUC):

ffmpeg -protocol_whitelist file,http,https,tcp,tls -allowed_extensions ALL -i https://z4atvie10swse101.rtccdn.com/pidbv/smil:pidbv_1060.smil/playlist.m3u8 -bsf:a aac_adtstoasc -c copy out.mp4

which gives 404s indicating that these are not available after the live stream ended, same as in https://pidbv.justlive.tv/player.php?stream=bv1060.

I will keep the ffmpeg command handy as a quick way to test "segments" as soon as they are supposed to be live.

fleimgruber commented 2 weeks ago

I am able to reproduce the behavior in https://github.com/linkswien/demotape/issues/1#issuecomment-2169499895 using https://pidbv.justlive.tv/player.php?stream=bv1020, see also https://github.com/fleimgruber/demotape/commit/726660b8d592244f319985cabc8ec6e09710fa3e.

Moving forward, I would wait for the next Bezirksvertretungssitzung Leopoldstadt on 25th of June 2024 at 5 pm and test manually as well as automated.

@noahsmindfuck I think with "use the next dates of the bv sessions to capture the possible live stream urls" we would be able to know when to check the justlive URLs directly and we might get away without any regexp'ing on streams.

fleimgruber commented 2 weeks ago

It turns out ffmpeg can't directly work with the https://pidbv.justlive.tv/player.php?stream=bv1020 URLs, but maybe youtube-dl handles m3u8 parsing directly. If not, I prepared a regexp here: https://github.com/fleimgruber/demotape/commit/d42bd72d300921f9817396371204eaacb791500c.