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
132.38k stars 10.04k forks source link

MPD live streams do not work #28032

Closed jimbo2018 closed 3 years ago

jimbo2018 commented 3 years ago

Checklist

Verbose log


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\J>cd..

C:\Documents and Settings>cd..

C:\>youtube-dl -v https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcas
t/dash/nonuk/dash_low/aks/bbc_radio_two.mpd
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://a.files.bbci.co.uk/media/live/manifes
to/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_two.mpd']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.4.4 (CPython) - Windows-XP-5.1.2600-SP3
[debug] exe versions: ffmpeg N-65298-gde41798, ffprobe N-65298-gde41798, rtmpdum
p 2.1d
[debug] Proxy map: {}
[generic] bbc_radio_two: Requesting header
WARNING: Falling back on generic information extractor.
[generic] bbc_radio_two: Downloading webpage
[generic] bbc_radio_two: Extracting information
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug
 . Make sure you are using the latest version; type  youtube-dl -U  to update. B
e sure to call youtube-dl with the --verbose flag and include its complete outpu
t.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1
r1\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1
r1\build\youtube_dl\extractor\common.py", line 532, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1
r1\build\youtube_dl\extractor\generic.py", line 2409, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1
r1\build\youtube_dl\extractor\common.py", line 1359, in _sort_formats
youtube_dl.utils.ExtractorError: No video formats found; please report this issu
e on https://yt-dl.org/bug . Make sure you are using the latest version; type  y
outube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and
include its complete output.

```Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\J>cd..

C:\Documents and Settings>cd..

C:\>youtube-dl -v https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcas
t/dash/nonuk/dash_low/aks/bbc_radio_two.mpd
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://a.files.bbci.co.uk/media/live/manifes
to/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_two.mpd']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.4.4 (CPython) - Windows-XP-5.1.2600-SP3
[debug] exe versions: ffmpeg N-65298-gde41798, ffprobe N-65298-gde41798, rtmpdum
p 2.1d
[debug] Proxy map: {}
[generic] bbc_radio_two: Requesting header
WARNING: Falling back on generic information extractor.
[generic] bbc_radio_two: Downloading webpage
[generic] bbc_radio_two: Extracting information
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug
 . Make sure you are using the latest version; type  youtube-dl -U  to update. B
e sure to call youtube-dl with the --verbose flag and include its complete outpu
t.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1
r1\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1
r1\build\youtube_dl\extractor\common.py", line 532, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1
r1\build\youtube_dl\extractor\generic.py", line 2409, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpksi3o1
r1\build\youtube_dl\extractor\common.py", line 1359, in _sort_formats
youtube_dl.utils.ExtractorError: No video formats found; please report this issu
e on https://yt-dl.org/bug . Make sure you are using the latest version; type  y
outube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and
include its complete output.

C:\>youtube-dl -v https://a.files.bbci.co.uk/media/live/manifesto/audio/simulcas
t/dash/nonuk/dash_low/aks/bbc_radio_two.mpdMicrosoft Windows XP [Version 5.1.260
0]
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://a.files.bbci.co.uk/media/live/manifes
to/audio/simulcast/dash/nonuk/dash_low/aks/bbc_radio_two.mpdMicrosoft', 'Windows
', 'XP', '[Version', '5.1.2600]']

## Description

<!--BBC live dash mpd stream not working. 
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

This live stream does not work because it is looking for a video format. This is audio only. Can you enable this program to copy live audio streams please?  It works with a program URL which has a start and finish but not a continuous stream.
Thanks.
Vangelis66 commented 3 years ago

Yet another duplicate of https://github.com/ytdl-org/youtube-dl/issues/21302, by the same person... :angry: :-1: Both probably duplicates of still open https://github.com/ytdl-org/youtube-dl/issues/10787 (Support live streams in MPEG DASH) :wink: ...

@jimbo2018 :

Please, stop creating any additional duplicate issues on this... "Your" bbc_radio_two_live MPD isn't just special because it contains only audio segments (as you seem to suggest), youtube-dl does not (still) support Dynamic (live) MPEG-DASH manifests (MPD=Media Presentation Description), [generic]'s support is limited to Static ones (i.e. On-Demand streams).
I'm not saying it's impossible to implement via pure Python code, but I suspect it presents special challenges for the devs, given that the feature is still missing...

FWIW, youtube-dl's [hlsnative] only supports On-Demand HLS playlists (M3U8), Live HLS streams are being delegated to FFmpeg... Perhaps something similar could be done for Dynamic MPDs, because, since a few years ago, FFmpeg itself has implemented MPD support for both Dynamic+Static MPDs :+1: ; the support is enabled if you build it with --enable-libxml2 (so that the XML parser is built), because MPDs are in fact a subset of XML files... I must confess that MPD support in FFmpeg isn't yet fully ripe (especially where it comes to selecting the best quality variant by default), but most streams should download OK - of course, cenc (DRM) MPEG-DASH streams are unattainable...

As for recording the BBC Radio 2 Live (international) stream (over MPEG-DASH), a) it's rather unfortunate you (@jimbo2018) are still on Windows XP SP3, because there exists another widely known CLI Python application (specialising in Live streams) that does currently support dynamic MPDs, but that one demands at least py3.6, so that means Vista SP2 upwards... b) You can get yourself a fairly recent XP-compatible 32-bit build of FFmpeg with the DASH demuxer turned on (the one you're using is VERY old for the task... ) and then issue:

ffmpeg -v 32 -stats -re -i "http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/ak/bbc_radio_two.mpd" -vn -map 0:1 -c:a copy -movflags faststart "BBCr2live_dash_96k.m4a"

NB: Press q when you wish to stop the recording; -map 0:1 is needed to record the best variant (96kbps HE-AAC), because the worst variant (48kbps HE-AAC) is chosen by default... (:angry: :-1: )

ffmpeg version N-100546-g2c6f532-Reino Copyright (c) 2000-2021 the FFmpeg develo
pers
  built with gcc 10.2.0 (GCC)
  configuration: --arch=x86 --target-os=mingw32 --prefix=/cygdrive/m/ffmpeg-wind
ows-build-helpers-master/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i
686/i686-w64-mingw32 --cross-prefix=/cygdrive/m/ffmpeg-windows-build-helpers-mas
ter/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-ming
w32- --extra-cflags='-march=pentium3 -mtune=athlon-xp -O2 -mfpmath=sse -msse' --
pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino --enable
-gpl --enable-gray --enable-version3 --disable-debug --disable-doc --disable-htm
lpages --disable-manpages --disable-mediafoundation --disable-podpages --disable
-txtpages --disable-w32threads --enable-avisynth --enable-frei0r --enable-filter
=frei0r --enable-gmp --enable-libaom --enable-libass --enable-libfdk-aac --enabl
e-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --ena
ble-libgme --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-lib
soxr --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-lib
xvid --enable-libzimg --enable-mbedtls
  libavutil      56. 63.100 / 56. 63.100
  libavcodec     58.115.102 / 58.115.102
  libavformat    58. 65.100 / 58. 65.100
  libavdevice    58. 11.103 / 58. 11.103
  libavfilter     7. 95.100 /  7. 95.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
Input #0, dash, from 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simul
cast/dash/nonuk/dash_low/ak/bbc_radio_two.mpd':
  Duration: N/A, start: 1612143308.800000, bitrate: N/A
  Program 0
    Stream #0:0(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp (default)
    Metadata:
      variant_bitrate : 48000
      id              : audio=48000
    Stream #0:1(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp (default)
    Metadata:
      variant_bitrate : 96000
      id              : audio=96000
Output #0, ipod, to 'BBCr2live_dash_96k.m4a':
  Metadata:
    encoder         : Lavf58.65.100
    Stream #0:0(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp (default)
    Metadata:
      variant_bitrate : 96000
      id              : audio=96000
Stream mapping:
  Stream #0:1 -> #0:0 (copy)
Press [q] to stop, [?] for help
[dash @ 0037be00] No longer receiving stream_index 0/A
[ipod @ 06899fc0] Starting second pass: moving the moov atom to the beginning of
 the file
size=    1079kB time=00:01:31.26 bitrate=  96.9kbits/s speed=   1x
video:0kB audio:1070kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.855490%

(I recorded just a 90s sample... ) Happy recordings... :smiley:

jimbo2018 commented 3 years ago

Thank you for that description. I also have Windows 7 on another machine, so will sort it on there. Thank you for the reply.

I do apologise as I was not aware that had already been answered hence I asked again.

Sorry for any inconvenience and thank you for the useful information.

Regards

James

On 01 February 2021 at 01:51 Vangelis66 notifications@github.com wrote:

Yet another duplicate of #21302 https://github.com/ytdl-org/youtube-dl/issues/21302 , by the same person... 😠 πŸ‘Ž
Both probably duplicates of still open #10787 https://github.com/ytdl-org/youtube-dl/issues/10787 (Support live streams in MPEG DASH) πŸ˜‰ ...

@jimbo2018 https://github.com/jimbo2018 :

Please, stop creating any additional duplicate issues on this...
"Your" bbc_radio_two_live MPD isn't just special because it contains only audio segments (as you seem to suggest),
youtube-dl does not (still) support Dynamic (live) MPEG-DASH manifests (MPD=Media Presentation Description), [generic]'s support is limited to Static ones (i.e. On-Demand streams).
I'm not saying it's impossible to implement via pure Python code, but I suspect it presents special challenges for the devs, given that the feature is still missing...

FWIW, youtube-dl's [hlsnative] only supports On-Demand HLS playlists (M3U8), Live HLS streams are being delegated to FFmpeg... Perhaps something similar could be done for Dynamic MPDs, because, since a few years ago, FFmpeg itself has implemented MPD support for both Dynamic+Static MPDs πŸ‘ ; the support is enabled if you build it with --enable-libxml2 (so that the XML parser is built), because MPDs are in fact a subset of XML files...
I must confess that MPD support in FFmpeg isn't yet fully ripe (especially where it comes to selecting the best quality variant by default), but most streams should download OK - of course, cenc (DRM) MPEG-DASH streams are unattainable...

As for recording the BBC Radio 2 Live (international) stream (over MPEG-DASH),
a) it's rather unfortunate you (@jimbo2018 https://github.com/jimbo2018 ) are still on Windows XP SP3, because there exists another widely known CLI Python application (specialising in Live streams) that does currently support dynamic MPDs, but that one demands at least py3.6, so that means Vista SP2 upwards...
b) You can get yourself a fairly recent XP-compatible 32-bit build of FFmpeg with the DASH demuxer turned on (the one you're using is VERY old for the task... ) and then issue:

ffmpeg -v 32 -stats -re -i "http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/dash/nonuk/dash_low/ak/bbc_radio_two.mpd" -vn -map 0:1 -c:a copy -movflags faststart "BBCr2live_dash_96k.m4a"

NB: Press q when you wish to stop the recording;
-map 0:1 is needed to record the best variant (96kbps HE-AAC), because the worst variant (48kbps HE-AAC) is chosen by default... ( 😠 πŸ‘Ž )

ffmpeg version N-100546-g2c6f532-Reino Copyright (c) 2000-2021 the FFmpeg develo

pers

  built with gcc 10.2.0 (GCC)

  configuration: --arch=x86 --target-os=mingw32 --prefix=/cygdrive/m/ffmpeg-wind

ows-build-helpers-master/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i

686/i686-w64-mingw32 --cross-prefix=/cygdrive/m/ffmpeg-windows-build-helpers-mas

ter/ffmpeg_local_builds/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-ming

w32- --extra-cflags='-march=pentium3 -mtune=athlon-xp -O2 -mfpmath=sse -msse' --

pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino --enable

-gpl --enable-gray --enable-version3 --disable-debug --disable-doc --disable-htm

lpages --disable-manpages --disable-mediafoundation --disable-podpages --disable

-txtpages --disable-w32threads --enable-avisynth --enable-frei0r --enable-filter

=frei0r --enable-gmp --enable-libaom --enable-libass --enable-libfdk-aac --enabl

e-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --ena

ble-libgme --enable-libmp3lame --enable-libopenmpt --enable-libopus --enable-lib

soxr --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx

--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-lib

xvid --enable-libzimg --enable-mbedtls

  libavutil      56. 63.100 / 56. 63.100

  libavcodec     58.115.102 / 58.115.102

  libavformat    58. 65.100 / 58. 65.100

  libavdevice    58. 11.103 / 58. 11.103

  libavfilter     7. 95.100 /  7. 95.100

  libswscale      5.  8.100 /  5.  8.100

  libswresample   3.  8.100 /  3.  8.100

  libpostproc    55.  8.100 / 55.  8.100

Input #0, dash, from 'http://a.files.bbci.co.uk/media/live/manifesto/audio/simul

cast/dash/nonuk/dash_low/ak/bbc_radio_two.mpd':

  Duration: N/A, start: 1612143308.800000, bitrate: N/A

  Program 0

    Stream #0:0(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo,

fltp (default)

    Metadata:

      variant_bitrate : 48000

      id              : audio=48000

    Stream #0:1(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo,

fltp (default)

    Metadata:

      variant_bitrate : 96000

      id              : audio=96000

Output #0, ipod, to 'BBCr2live_dash_96k.m4a':

  Metadata:

    encoder         : Lavf58.65.100

    Stream #0:0(en): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 48000 Hz, stereo,

fltp (default)

    Metadata:

      variant_bitrate : 96000

      id              : audio=96000

Stream mapping:

  Stream #0:1 -> #0:0 (copy)

Press [q] to stop, [?] for help

[dash @ 0037be00] No longer receiving stream_index 0/A

[ipod @ 06899fc0] Starting second pass: moving the moov atom to the beginning of

 the file

size=    1079kB time=00:01:31.26 bitrate=  96.9kbits/s speed=   1x

video:0kB audio:1070kB subtitle:0kB other streams:0kB global headers:0kB muxing

overhead: 0.855490%

(I recorded just a 90s sample... ) Happy recordings... πŸ˜ƒ

β€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/ytdl-org/youtube-dl/issues/28032#issuecomment-770511113 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIE2IZ3ETXXWUGA2OU6TQSTS4YCIVANCNFSM4W3TSRWA .