Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] support for npo.nl adaptive video-streams: #3639

Closed
Reino17 opened this issue Aug 31, 2014 · 2 comments
Closed

[Request] support for npo.nl adaptive video-streams: #3639

Reino17 opened this issue Aug 31, 2014 · 2 comments

Comments

@Reino17
Copy link

@Reino17 Reino17 commented Aug 31, 2014

Current situation:

youtube-dl.exe -F http://www.npo.nl/nos-journaal/28-08-2014/POW_00722860
[npo.nl] POW_00722860: Downloading JSON metadata
[npo.nl] POW_00722860: Downloading token
[npo.nl] POW_00722860: Downloading JSON metadata
[npo.nl] POW_00722860: Downloading stream info
[info] Available formats for POW_00722860:
format code extension resolution  note
0           mp4       unknown

youtube-dl.exe -g http://www.npo.nl/nos-journaal/28-08-2014/POW_00722860
http://content10c2b.omroep.nl/urishieldv2/l27m139189197250ca410053ffa159000000.5dc27dde4560d
498b071c05b9c38def1/ceresodi/h264/1/nos/rest/2014/POW_00722860/std.20140828.m4v?odiredirectu
rl=%2Fvideo%2Fida%2Fh264_std%2F4ed57cc990af7e0ef3e605ad5213315c%2F53ffa158%2FPOW_00722860%2F
1%3Ftype%3Djsonp%26callback%3D%3F%26type%3Djson

-The part of the url (progressive video-stream) after m4v? is useless for the enduser. I can remove it with a batch-script, but is it possible for youtube-dl to discard it in the first place?

Requested situation:

youtube-dl.exe -F http://www.npo.nl/nos-journaal/28-08-2014/POW_00722860
...
format code extension resolution  note
hls0        flv       288x162     hls (worst)
hls1        flv       416x234     hls
hls2        flv       544x306     hls
hls3        flv       608x342     hls
pg0         mp4       640x360     (best)

youtube-dl.exe -g http://www.npo.nl/nos-journaal/28-08-2014/POW_00722860
http://content10c2b.omroep.nl/urishieldv2/l27m139189197250ca410053ffa159000000.5dc27dde4560d
498b071c05b9c38def1/ceresodi/h264/1/nos/rest/2014/POW_00722860/std.20140828.m4v

youtube-dl.exe -f hls3 -g http://www.npo.nl/nos-journaal/28-08-2014/POW_00722860
http://l24m6389ad0b090053ffa6f0000000.89dec5f6219ec252.adaptive-e10c2a.npostreaming.nl/lmshi
eldv2/3/nos/rest/2014/POW_00722860/POW_00722860.ism/POW_00722860-audio_eng%3D128000-video%3D
1000000.m3u8

-Practical format code, easy to use in batch-scripts.
I can't seem to find any info in the JSON (http://e.omroep.nl/metadata/aflevering/POW_00722860), but the following url (found with Firefox's webconsole) shows the following video-streams:
http://l24m6389ad0b090053ffa6f0000000.89dec5f6219ec252.adaptive-e10c2a.npostreaming.nl/lmshieldv2/3/nos/rest/2014/POW_00722860/POW_00722860.ism/POW_00722860.m3u8
(Important note: these urls could be temporary urls! I don't know if that might cause any difficulty.)

#EXTM3U
#EXT-X-VERSION:1
## Created with Unified Streaming Platform(version=1.5.7)
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=280900,CODECS="mp4a.40.2,avc1.66.30",RESOLUTION=288x162
POW_00722860-audio_eng%3D65000-video%3D200000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=665680,CODECS="mp4a.40.2,avc1.66.30",RESOLUTION=416x234
POW_00722860-audio_eng%3D128000-video%3D500000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=877680,CODECS="mp4a.40.2,avc1.66.30",RESOLUTION=544x306
POW_00722860-audio_eng%3D128000-video%3D700000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1195680,CODECS="mp4a.40.2,avc1.66.30",RESOLUTION=608x342
POW_00722860-audio_eng%3D128000-video%3D1000000.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=135680,CODECS="mp4a.40.2"
POW_00722860-audio_eng%3D128000.m3u8

-The part of the url (progressive video-stream) trimmed after m4v?, for the youtube-dl.exe -g-command.
-The youtube-dl.exe -f <format>-command above produces an url to a non-encrypted hls-stream/playlist, which can be opened/processed by Media Player Classic / ffmpeg. Url extended with -audio_eng%3D128000-video%3D1000000 as found in POW_00722860.m3u8.

@Reino17
Copy link
Author

@Reino17 Reino17 commented Sep 20, 2014

Today I've noticed that in the meantime some changes have been made:

youtube-dl.exe -F http://www.npo.nl/nos-journaal/28-08-2014/POW_00722860
[npo.nl] POW_00722860: Downloading JSON metadata
[npo.nl] POW_00722860: Downloading token
[npo.nl] POW_00722860: Downloading adaptive JSON
[npo.nl] POW_00722860: Downloading adaptive stream JSON
[npo.nl] POW_00722860: Downloading webpage
[npo.nl] POW_00722860: Downloading h264_bb JSON
[npo.nl] POW_00722860: Downloading h264_bb stream JSON
[npo.nl] POW_00722860: Downloading h264_sb JSON
[npo.nl] POW_00722860: Downloading h264_sb stream JSON
[npo.nl] POW_00722860: Downloading h264_std JSON
[npo.nl] POW_00722860: Downloading h264_std stream JSON
[info] Available formats for POW_00722860:
format code extension resolution  note
m3u8-meta   m3u8      multiple    Quality selection URL  (worst)
m3u8-135    m3u8      unknown      135k , mp4a
m3u8-280    m3u8      288x162      280k , mp4a, avc1
m3u8-665    m3u8      416x234      665k , mp4a, avc1
m3u8-877    m3u8      544x306      877k , mp4a, avc1
m3u8-1195   m3u8      608x342     1195k , mp4a, avc1
h264_sb     m4v       unknown
h264_bb     m4v       unknown
h264_std    m4v       unknown     (best)
  • h264_xxx format code for the progressive streams; practical and easy to use in batch-scripts.
    This however can't be said for the adaptive streams. Though slightly, the bitrate varies and thus the format code for every other broadcast. Why append the bitrate in the format code in the first place? And it's "HTTP Live Streaming" after all, so why not just name it hls-meta, hls0, hls1, hls2, hls3, hls4 and hls5?
  • Why include m3u8-meta at all? youtube-dl.exe -f m3u8-meta <npo-url> by default combines the best video-stream and the worst audio-stream:
ffmpeg version ...
Stream mapping:
  Stream #0:7 -> #0:0 (copy)
  Stream #0:0 -> #0:1 (copy)

Which should be:

  Stream #0:7 -> #0:0 (copy)
  Stream #0:6 -> #0:1 (copy)
  • m3u8-meta prints the full url:
youtube-dl.exe -f m3u8-meta -g http://www.npo.nl/nos-journaal/28-08-2014/POW_00722860
http://l24m7c9652f63900541dd21c000000.18c5c65e540f60a6.adaptive-e50c1a.npostreaming.nl/lmshi
eldv2/3/nos/rest/2014/POW_00722860/POW_00722860.ism/POW_00722860.m3u8

...but the imo more important m3u8-xxxx formats do not and only print the filename:

youtube-dl.exe -f m3u8-1195 -g http://www.npo.nl/nos-journaal/28-08-2014/POW_00722860
POW_00722860-audio_eng%3D128000-video%3D1000000.m3u8

Why not?

@Reino17
Copy link
Author

@Reino17 Reino17 commented Nov 22, 2014

Fixed by c9ea760 and 944a3de.

Note to self: for the m3u8 format extraction, see issuecomment-62554918.

@Reino17 Reino17 closed this Nov 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.