Help to create, find convert this link to m3U

Hello brains….

My goal is to create a channel to watch from this link.

Yep it’s YouTube , but the uniqueness ism it takes real-time telemetry, and audio and outs through a simulation to show it …did I mention the audio is accurate??? Thus a unique webcam channel not just view but sounds …
My knowledge is increasing but I’m currently at if given a web cam I can generally find the m3u source and out that into a source for channel (using window pc and haven’t yet tried the GitHub) aka trying to build skills on pc version before going with more customizable system….

Thanks in advance

hlstube

hlstube acts as a webserver that calls youtube-dl to resolve the m3u and then (at least sometimes) uses ffmpeg to reprocess the output stream.

For your stream, I was able to directly play "youtube-dl -g" resolved stream in channels. The bigger problem that hlstube solves is that the resolved youtube m3u streams have a limited lifetime. You could add the "youtube-dl -g" resolved stream directly into a custom channel and it should work ... for a while. Once the stream expires, you need to repeat the process, whereas worst case with hlstube the channel stops playing, you reslect it, and it starts up again.

Should you choose to experiment with youtube-dl -g, it returns two streams corresponding to the two camera views for that link. Best of luck.

1 Like

To incorporate youtube channels into Channels, there is a fairly simple hack for those with basic scripting knowledge:

Use "youtube-dl -g" to extract the m3u playlist
Write into a Channels compatable m3u list
Trigger Channels to reload the m3u custom channel
Sleep for a couple hours
Restart at step 1

While not nearly as elegant as resolving the m3u on-demand when needed, it can be implemented using the most trivial script running on the channels server. (This is not a fit for those running channels in the prepacked container since it relies on local files.)

With the script below, was able to add both airport cameras as custom channels 8011/8012. Not sure the sleep time is correct. (Some references suggest youtube streams might remain valid for ~6 hours so a longer sleep might be possible.) Always possible google could notice the periodic clockwork requests and block (though I doubt it). Regardless, it is a possible approach for curious folks to experiment with. Best of luck.

#!/bin/bash

nick="airport"
file="$nick.m3u"
temp="/tmp/$nick.tmp";
link="https://www.youtube.com/watch?v=t0GrpAgdBFI"
secs=7200

while [ 1 ]
do
  echo "getting updated $nick links"
  ./youtube-dl -g "$link" >$temp

  echo "writing new playlist"
  echo '#EXTM3U' >$file
  echo '#EXTINF:0 channel-id="air8011" channel-number="8011" tvg-logo="",Airport Camera 1' >>$file
  head -1 $temp >>$file
  echo '#EXTINF:0 channel-id="air8012" channel-number="8012" tvg-logo="",Airport Camera 2' >>$file
  tail -1 $temp >>$file

  curl -XPOST http://localhost:8089/providers/m3u/sources/$nick/refresh
  echo ""
  echo "sleeping for $secs secs"
  sleep $secs
done
1 Like

I managed to get hlstube running in a docker container a few months ago, and that's handling my YouTube livestreams. They work well in Channels. This LAX stream should work just fine too. I'll be trying it soon, thanks for mentioning it!

Wow that’s detailed and more than I expected..
Ok once I decipher the instructions…. :flushed:
I’ll give it a shot…thanks a lot for tips and help!

Having implemented multiple ADS-B software receivers (PI, PI+ARMv6, GPU-CUDA), the visualization definately resonated. A very impressive project and hats off to the developer. hlstube/streamlink and other more complex packages are great solutions, but if looking to learn, simplistic old-school methods are often the best teachers.

ok im starrting to "mess" with your most simple instructions (thank you for that) for me.
now imagine ... 0 coding/scripting experience.... but mcguyver like way of figuring things out....
anyway to simply post the M3U?

from your response ..." You could add the "youtube-dl -g" resolved stream directly into a custom channel and it should worI haven't yet mastered (or really attempted)"...*.

can you show me example.... I I can get it in once to work... I can then better understand the timeout (I get it works for a day then you have to "redo") but the way I learn is let me at least see it once then I can build my knowledge off it..... like the difference between describing how a socket and driver go together then apply to bolt words vs seeing a short video or picture of step one, two,three) then I go ah I see .....

appreciate it....

There are no static links for any useful content (i.e., can be entered once and work without modification for days/weeks)-- there is always a cost. In this case, google needs you to watch this stream via youtube to force-feed you advertising and to collect your data. Remember-- their business is selling your personal information (demographics, habits, financial data, medical data, whatever you expose to them) to whomever is willing to pay. That is how they recoup the cost of their "free" services. That said, they must deliver watchable video else nobody would use youtube.

youtube-dl essentially emulates your watching a youtube video, but in a generic way (limited information leakage). When used with the "-g" option, it provides an M3U reference that is usable outside of youtube for a limited period of time (hours not days). Probably the best starting point. Are you running Linux, Windoze or an embedded device?

If Linux, download youtube-dl (and have python already installed) and then enter:

./youtube-dl -g "https://www.youtube.com/watch?v=t0GrpAgdBFI"

Sample output:

https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1629531997/ei/_VogYaD0M4bvkAOqoJLIAQ/ip/108.59.0.37/id/t0GrpAgdBFI.2/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/rr5---sn-p5qs7nsr.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/5550/mh/6c/mm/44/mn/sn-p5qs7nsr/ms/lva/mv/m/mvi/5/pl/24/dover/11/keepalive/yes/fexp/24001373,24007246/mt/1629510027/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRQIgI5EWEQ_iuHVPbKD1wXXb92i9SGuvAqdKvjA5CB6cXw0CIQDZCmjX42LMvaVbUuP2FsafD3vULtoKEnkXSLZcYG_-dw%3D%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRAIgIkrhSidPu0QPi3-h_i7yc0rN-DZDOvrvVqrwa7EoCKMCICZCBzjf7lewWAfSKUEhLvidfl5CG1yKZFwLFFMvm0F_/playlist/index.m3u8
https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1629532002/ei/AlsgYfrvB4jfkATzmL6IBA/ip/108.59.0.37/id/mfPukIJNML8.2/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/rr3---sn-p5qlsnrr.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/5550/mh/d9/mm/44/mn/sn-p5qlsnrr/ms/lva/mv/m/mvi/3/pl/24/dover/11/keepalive/yes/fexp/24001373,24007246/mt/1629510027/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRQIgDEodN0dcjzRXcIsPZcpvdqOt7qJJzzvZafQLVsXuIHQCIQD39FAb1LW1vC_CauEK-62M8bG5lKiQ-LKBKraCz92wMA%3D%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRAIgJrFC2kRA3nlPtEtAZUh1Mycgyv_EFCY3GlfOHsBPmFQCID-VWJZWPUVZSuO2u0zYkYU837dJBGguT8tLNHrsrJWZ/playlist/index.m3u8

You must create a corresponding M3U file for Channels.

#EXTM3U
#EXTINF:0 channel-id="air8011" channel-number="8011" tvg-logo="",Airport Camera 1
https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1629531997/ei/_VogYaD0M4bvkAOqoJLIAQ/ip/108.59.0.37/id/t0GrpAgdBFI.2/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/rr5---sn-p5qs7nsr.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/5550/mh/6c/mm/44/mn/sn-p5qs7nsr/ms/lva/mv/m/mvi/5/pl/24/dover/11/keepalive/yes/fexp/24001373,24007246/mt/1629510027/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRQIgI5EWEQ_iuHVPbKD1wXXb92i9SGuvAqdKvjA5CB6cXw0CIQDZCmjX42LMvaVbUuP2FsafD3vULtoKEnkXSLZcYG_-dw%3D%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRAIgIkrhSidPu0QPi3-h_i7yc0rN-DZDOvrvVqrwa7EoCKMCICZCBzjf7lewWAfSKUEhLvidfl5CG1yKZFwLFFMvm0F_/playlist/index.m3u8
#EXTINF:0 channel-id="air8012" channel-number="8012" tvg-logo="",Airport Camera 2
https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1629532002/ei/AlsgYfrvB4jfkATzmL6IBA/ip/108.59.0.37/id/mfPukIJNML8.2/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/rr3---sn-p5qlsnrr.googlevideo.com/playlist_duration/30/manifest_duration/30/vprv/1/playlist_type/DVR/initcwndbps/5550/mh/d9/mm/44/mn/sn-p5qlsnrr/ms/lva/mv/m/mvi/3/pl/24/dover/11/keepalive/yes/fexp/24001373,24007246/mt/1629510027/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,sgoap,sgovp,playlist_duration,manifest_duration,vprv,playlist_type/sig/AOq0QJ8wRQIgDEodN0dcjzRXcIsPZcpvdqOt7qJJzzvZafQLVsXuIHQCIQD39FAb1LW1vC_CauEK-62M8bG5lKiQ-LKBKraCz92wMA%3D%3D/lsparams/hls_chunk_host,initcwndbps,mh,mm,mn,ms,mv,mvi,pl/lsig/AG3C_xAwRAIgJrFC2kRA3nlPtEtAZUh1Mycgyv_EFCY3GlfOHsBPmFQCID-VWJZWPUVZSuO2u0zYkYU837dJBGguT8tLNHrsrJWZ/playlist/index.m3u8

From the Channels DRV admin page, you add the above file as a Custom Channel. Nickname=whatever-you-want, steam-format=hls, source=file/path-to-m3u-file, options=default, xmltv=default. At best, you will get six hours of watching before you need to repeat the process. However, it is a good first step prior to attempting any form of automation.

If you are using Windoze, then some variation of the above will probably work, but unable to provide any details. A description of your current setup would be helpful. Best of luck.

1 Like

Thanks
One step closer… still media error but.. it sees two channels just error on playback…

I’ll keep trying …

Very much appreciate generated link and description!

Any specifics of the error you get? What O/S are you using?

The URLs are long and contain lots of symbols. How are you getting those into the M3U playlist? If a manual copy/paste, then make sure you are not getting newlines or otherwise altering them.

Might be worth using the VLC player to test the streams. There are versions for all major OS/platforms. Select "Open Network Stream" from the Media menu. You can copy/paste one of the URLs into the text entry field and verify playback from there. If it fails in VLC, then it will definitely fail in Channels.

I have both streams as custom channels and they continue to work for me so you can make it happen. Stick with it!

Thanks for the encouragement, I have time next few days to “mcguiver “ it… aka tinker with it… hopefully I’ll get to where you are on this.. I think if I have hat channel in channels on Appletv with audio would just be very cool…

Appreciate the responses .. next few days I’ll post quicker responses!