ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.42k stars 9.96k forks source link

Pluto TV on demand support #25626

Open tyuhas opened 4 years ago

tyuhas commented 4 years ago

Checklist

Example URLs

Still poking around so not positive how much of that playlist URL is actually necessary.

Description

Currently youtube-dl is doing with Pluto TV on demand streams very similar to issue #15748 in that the in-stream ads mess up (choppy transitions around the ad insertion point, out of sync audio etc.) the final video.

Unlike the #15748 issue, I haven't found anything in the master.m3u8 that stands-out as an ad.

master-m3u8.txt

I do notice while capturing the output that ad insertion happens like this:

[hls,applehttp @ 0xa4f760] Opening 'crypto+https://siloh-l3.plutotv.net/c6009f_p luto/clip/5df29776642e4b9328052d27_Engineering_Connections_Burj_al_Arab_S3E5/720 p/20191212_113935/hls/0-516520/hls_2400-00102.ts' for reading frame=15300 fps=187 q=-1.0 size= 151588kB time=00:08:29.99 bitrate=2434.9kbits/ [hls,applehttp @ 0xa4f760] Opening 'crypto+https://siloh-l3.plutotv.net/c6009f_p luto/clip/5df29776642e4b9328052d27_Engineering_Connections_Burj_al_Arab_S3E5/720 p/20191212_113935/hls/0-516520/hls_2400-00103.ts' for reading frame=15450 fps=187 q=-1.0 size= 153040kB time=00:08:35.00 bitrate=2434.3kbits/ [hls,applehttp @ 0xa4f760] Opening 'https://siloh-l3.plutotv.net/248093_59_ad/cr eative/5ec5d94718e30b000b944683_ad/720p/20200520_182839/hls/hls_2400_keyfile_0.k ey' for reading [hls,applehttp @ 0xa4f760] Opening 'crypto+https://siloh-l3.plutotv.net/248093_5 9_ad/creative/5ec5d94718e30b000b944683_ad/720p/20200520_182839/hls/hls_2400-0000 0.ts' for reading frame=15497 fps=185 q=-1.0 size= 153592kB time=00:08:36.50 bitrate=2436.1kbits/ [mp4 @ 0xdc1920] Non-monotonous DTS in output stream 0:0; previous: 46482000, cu rrent: -6000; changing to 46482001. This may result in incorrect timestamps in t he output file.

All of the in-stream ads seem to have a URL that contains "_ad" and "creative" while the fragment file seems so far to be ending with -00000.ts (crypto+https://siloh-l3.plutotv.net/**248093_5 9_ad/creative/5ec5d94718e30b000b944683_ad/720p/20200520_182839/hls/hls_2400-0000 0.ts**)

youtube-dlout_ec.txt

Thanks!

SeppSpenderRind commented 4 years ago

Since the Pluto TV web interface is now available in Germany, too, I would also be interested in that issue. Thank you!

Example link: https://pluto.tv/on-demand/series/teenage-mutant-ninja-turtles-de/season/1/episode/der-aufstieg-der-turtles-teil-1-2011-1-1

kevinoconnor7 commented 3 years ago

Hmm yeah the ads are tricky. I created a local patch to skip over the ads by just dropping fragments that contain _ad/creative/ in the URL. It's unlikely going to be mergeable in this state though given where this code is being injected.

ICEknigh7 commented 3 years ago

The service has arrived to Spain now and currently gives an "Unsupported URL" error, here's an example link: https://pluto.tv/on-demand/series/smonka-es/season/1/episode/smonka-126-2005-1-126

Playlist file: https://stitcher-ipv4.pluto.tv/stitch/hls/episode/5f475541b9a18c001a4bcd69/3063648/playlist.m3u8?terminate=false&embedPartner=&serverSideAds=true&paln=&includeExtendedEvents=false&architecture=&deviceId=1d90279f-d258-45ff-b96d-dcc66342b08a&deviceVersion=89.0.4389.114&appVersion=5.16.0-d477896b413cece569cca008ddae951d02cadc9e&deviceType=web&deviceMake=Chrome%2BMobile&sid=a3243b62-9c6e-11eb-930b-0242ac110002&advertisingId=&deviceLat=43.3549&deviceLon=-5.8529&deviceDNT=0&deviceModel=web&userId=&appName=web

Episode list: https://pluto.tv/on-demand/series/smonka-es/

Leatherface75 commented 3 years ago

Same with Live TV links

heroku-miraheze commented 3 years ago

27621