How to Upload an M3u File to Youtube

Contents

Updated on 2021-11-xi

I love the tech conferences that share the recordings of the sessions without hiding behind the registration or a pay wall. Luckily the trend to share the knowledge with a customs openly is growing, yet you lot nevertheless tin detect a nice talk hidden backside the in a higher place mentioned walls.

Sometimes an easy registration is all it takes, but then, how practise you watch it offline? For example, I practice love to catch upwards with with the recent trends and experiences while being on a aeroplane, meaning that I just cant afford to exist hooked up to the Internet.

If a talk is published on the YouTube, you are good to go and download it with any web service that pops up in the google search past the term "Youtube download". But what practise we practice when the video is hosted somewhere in the CDN and is served every bit a dynamic playlist of *.ts files?

Hither I share with yous an easy way to download the videos from an m3u/m3u8 playlist.

The dynamic playlist format - M3U/M3U8 - is a way to tell the browser how to download the pieces of the video that will contain the whole recording. So the download procedure is actually as easy as:

  1. Get the m3u8 link
  2. Download every file from that playlist and glue them into a single video.

At present the first office is easy, you go to the page where a vide player is rendered and search for the m3u8 file using the developers tools console of your browser.

m3u8

Make certain to go the master playlist asking url and copy it in your clipboard.

In the master playlist body you can meet the different versions of the playlists, typically they differ with the quality settings. Consider the following m3u8 file contents:

                                          1                                            2                                            three                                            4                                            5                                            6                                                            
                                          #EXTM3U                      #EXT-X-VERSION:4                      #EXT-X-STREAM-INF:PROGRAM-ID=0,BANDWIDTH=180400,CODECS="mp4a.forty.two,avc1.4d001e",RESOLUTION=720x294,Sound="audio-0",CLOSED-CAPTIONS=NONE                      https://manifest.prod.boltdns.net/...                      #EXT-10-STREAM-INF:Plan-ID=0,BANDWIDTH=335500,CODECS="mp4a.40.2,avc1.4d001f",RESOLUTION=1200x490,AUDIO="audio-one",Closed-CAPTIONS=NONE                      https://manifest.prod.boltdns.net/...                                      

The beginning cropped link is for the playlist with 720x294 resolution, whereas the second one is a HQ version with "1200x490" stream. If you encounter that for some reason yous are downloading the depression quality stream, extract the HQ stream URL and utilise information technology instead of the chief playlist URL.

The title of this mail service says "… with no special software", however nosotros will utilise the VLC player here which I deliberately categorize as a software that anybody can become on every platform, and then its not a special software.

What you need to do next is to cull File -> Open up Network dialog and paste the URL of the m3u8 playlist from the prev. step. At present you can either play it in the VLC right away, or check the Stream Output checkbox and click Settings.

m3u

This will open a new dialog where you can choose:

  • the path to a resulting video file
  • the video container format
  • and, optionally, the sound/video codecs if yous desire to do transcoding

settings

Click Ok and the files will start to download and encode in your resulting video container by the path you specified. This is not a particularly fast process, so just wait till the progress bar reaches its terminate and savor the video!

The VLC-way is good for a one-time quick download, but if you take a listing of playlists y'all want to download, then youtube-dl python tool is simply unmatched. Judging by the name, the tool was adult for youtube downloads originally but outgrew it quickly enough to exist a swiss knife for online video downloads.

Yous can utilize a container image or install it as a python packet or as a pre-compiled binary, so the installation is really a cakewalk and won't accept long. Additionally, the tool brings an endless amount of features:

  • automatically find playlist URL past itch the HTML page (no need to manually look for m3u8 URL)
  • cli interface to scriptify bulk downloads
  • extensive encoding support via ffmpeg and aconv
  • filtering and sorting for videos in the playlists (if the playlist has more than one vide, i.e. Youtube playlist)
  • and many more.

For example, to download a video that you lot would ordinarily watch at http://example.com/vid/test a single CLI command is all it takes:

                                          ane                                            two                                                            
                                          # proper name the output file test.<container_format>                      youtube-dl -o                      'exam.%(ext)s'                      --merge-output-format mkv http://example.com/vid/test                                      

and the residual is handled by the marvelous youtube-dl:

                                                                  1                                                                    2                                                                    three                                                                    iv                                                                    5                                                                    6                                                                    7                                                                    8                                                                    9                                            ten                                            11                                            12                                            xiii                                            xiv                                            fifteen                                            16                                                            
                    [download] Downloading playlist: Search query [Search] Downloading search JSON folio ane [Search] Downloading search JSON page 2 [Search] Downloading search JSON page three [Search] playlist Search query: Downloading 75 videos [download] Downloading video 1 of 75 [author:new] 6047188571001: Downloading webpage [author:new] 6047188571001: Downloading JSON metadata [author:new] 6047188571001: Downloading m3u8 information [author:new] 6047188571001: Downloading m3u8 information [author:new] 6047188571001: Downloading MPD manifest [author:new] 6047188571001: Downloading MPD manifest [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 245 [download] Destination: test.fhls-430-1.mp4 [download]  69.0% of ~81.31MiB at 577.84KiB/s ETA 01:57                                      

Sometimes, though, yous can't just specify the URL of a page where the player is unremarkably loaded in your browser, due to the cookies presented in your browser and who knows what black magic this frontenders invented while nosotros were not watching.
Then you still need to manually fetch the m3u8 link and feed it to the youtube-dl. The residue stays the aforementioned, the tool will handle the download/encoding procedure in the most effective and pleasant way.

Note, you as well might need to download the ffmpeg for youtube-dl to merge the different streams in a single container. Anyhow, youtube-dl volition tell you lot if its the example for you lot.

Leveraging containers is my preferred manner of working with tools, since all the pesky deps are packaged neatly inside, for youtube-dl yous tin can employ mikenye/youtube-dl image, which will make using youtube-dl a breeze:

                                          i                                            2                                            three                                            4                                            5                                            half dozen                                            vii                                            viii                                                            
                    alias                      yt-dl=                      'docker run \                                                                    --rm -i \                                                                    -east PGID=$(id -g) \                                                                    -e PUID=$(id -u) \                                                                    -v "$(pwd)":/workdir:rw \                                                                    mikenye/youtube-dl'                      ❯ yt-dl -o                      'test.%(ext)s'                      --merge-output-format mkv http://instance.com/vid/exam.m3u8                                      

doanefeliked1955.blogspot.com

Source: https://netdevops.me/2019/how-to-download-an-m3u/m3u8-playlist-stream-without-a-special-software/

0 Response to "How to Upload an M3u File to Youtube"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel