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.23k stars 10.03k forks source link

no audio in sportbox video #3939

Closed johny1 closed 6 months ago

johny1 commented 10 years ago

Thanks for adding support for sportbox in the update. ( http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/video )

I was able to download a video but there was no audio present in the file. When I open the file with mediainfo, it describes the audio stream as "93.3 kbps, 44.1 KHz, 2 channels, MPEG audio" but there is no actual audio playback in VLC. I also tried avidemux and windows media player.

I could not capture the entire cmd code as it downloaded the file in segments, here was the end.

"frame=123008 fps= 17 q=-1.0 size= 958266kB time=01:22:24.21 bitrate=1587.7kbits frame=123010 fps= 17 q=-1.0 size= 958273kB time=01:22:24.27 bitrate=1587.7kbits frame=123016 fps= 17 q=-1.0 size= 958337kB time=01:22:24.49 bitrate=1587.8kbits frame=123021 fps= 17 q=-1.0 size= 958399kB time=01:22:24.71 bitrate=1587.8kbits frame=123028 fps= 17 q=-1.0 Lsize= 962866kB time=01:22:25.00 bitrate=1595.1kbits/s video:902128kB audio:56320kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.460969%"

I have ffmpeg, ffplay and ffprobe in the youtube-dl folder. Any solution to why there's no audio with the video? Or maybe there's an alternative youtube-dl option that will download the audio separately and then I can mux it with the video? Thanks.

dstftw commented 10 years ago

Works for me. Post an example URL that results in such behavior.

johny1 commented 10 years ago

http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/spbvideo_NI483526_Gonka-2-zaezda-Obyedinenniy-1600-klassi-Turing-La

This is what I tried. After youtube-dl finished downloading it, I was able to open it and see the video play fine. But there was no audio. If you need the video info too, it came out to be 944 mb with 1500kbps bitrate and 24.87 fps. While the video is playing, I also checked Volume Mixer and did not see any sound output.

I will download the same file again and see what happens.

Also, this is the code I used. Please confirm if correct. I have to use an output option, otherwise I get errors since the URL has accented letters.

youtube-dl http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/spbvideo_NI483526_Gonka-2-zaezda-Obyedinenniy-1600-klassi-Turing-La -o %(format)s

And here is the code as it begins downloading the file.

[SportBox] Gonka-2-zaezda-Obyedinenniy-1600-klassi-Turing-La: Downloading webpag e [SportBox] Gonka-2-zaezda-Obyedinenniy-1600-klassi-Turing-La: Downloading player webpage [SportBox] Gonka-2-zaezda-Obyedinenniy-1600-klassi-Turing-La: Downloading webpag e [download] Destination: m3u8-1753 - 1024x576 ffmpeg version N-66809-g20df026 Copyright (c) 2000-2014 the FFmpeg developers built on Oct 11 2014 23:42:02 with gcc 4.9.1 (GCC) configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca -- enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-lib modplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrw b --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinge r --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --en able-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable- libx265 --enable-libxavs --enable-libxvid --enable-zlib libavutil 54. 10.100 / 54. 10.100 libavcodec 56. 4.101 / 56. 4.101 libavformat 56. 9.100 / 56. 9.100 libavdevice 56. 1.100 / 56. 1.100 libavfilter 5. 1.103 / 5. 1.103 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 1.100 / 53. 1.100 Input #0, hls,applehttp, from 'http://sportbox-htvod.cdn.ngenix.net/vod/vod/1463 35_5.mp4/chunklist.m3u8?t=1413308407&h=FrRemOaVI6ZivSnKDt8tew==': Duration: 01:22:25.01, start: 10.000000, bitrate: N/A Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Data: timed_id3 (ID3 / 0x20334449) Stream #0:1: Video: h264 (Baseline) ([27][0][0][0] / 0x001B), yuv420p(tv), 1 024x576 [SAR 1:1 DAR 16:9], 25 fps, 24.92 tbr, 90k tbn, 50 tbc Stream #0:2: Audio: mp3 ([4][0][0][0] / 0x0004), 44100 Hz, stereo, s16p, 96 kb/s Output #0, mp4, to 'm3u8-1753 - 1024x576.part': Metadata: encoder : Lavf56.9.100 Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1024x576 [SAR 1: 1 DAR 16:9], q=2-31, 25 fps, 90k tbn, 90k tbc Stream #0:1: Audio: mp3 (i[0][0][0] / 0x0069), 44100 Hz, stereo, 96 kb/s Stream mapping: Stream #0:1 -> #0:0 (copy) Stream #0:2 -> #0:1 (copy) Press [q] to stop, [?] for help frame= 42 fps=0.0 q=-1.0 size= 192kB time=00:00:01.66 bitrate= 945.5kbits/ frame= 58 fps= 55 q=-1.0 size= 388kB time=00:00:02.30 bitrate=1382.2kbits/ frame= 83 fps= 52 q=-1.0 size= 635kB time=00:00:03.28 bitrate=1582.3kbits/ frame= 99 fps= 41 q=-1.0 size= 771kB time=00:00:03.93 bitrate=1605.4kbits/ frame= 101 fps= 33 q=-1.0 size= 821kB time=00:00:04.04 bitrate=1664.9kbits/ frame= 108 fps= 29 q=-1.0 size= 872kB time=00:00:04.30 bitrate=1659.4kbits/ frame= 118 fps= 28 q=-1.0 size= 965kB time=00:00:04.70 bitrate=1681.6kbits/

jaimeMF commented 10 years ago

I can reproduce the problem with the test url http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/spbvideo_NI483529_Gonka-2-zaezd-Obyedinenniy-2000-klassi-Turing-i-S and http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/spbvideo_NI483530_Ceremoniya-nagrazhdeniya-pobediteley-sezona-2014 (since they take too much to download I haven't tried with other videos). I get some error messages when inspecting the files with ffprobe (notice the [mp3 @ 0x7f9e5c80da00] Header missing message):

$ ffprobe -i 'Гонка 2  заезд ««Объединенный 2000» - классы Туринг и Супер-продакшн-80822.mp4'
ffprobe version 2.4.2 Copyright (c) 2007-2014 the FFmpeg developers
  built on Oct  7 2014 14:57:04 with Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.4.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-openssl
  libavutil      54.  7.100 / 54.  7.100
  libavcodec     56.  1.100 / 56.  1.100
  libavformat    56.  4.101 / 56.  4.101
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  1.100 /  5.  1.100
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100
[mp3 @ 0x7f9e5c80da00] Header missing
    Last message repeated 5 times
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9e5c010e00] decoding for stream 1 failed
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f9e5c010e00] Could not find codec parameters for stream 1 (Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, 2 channels, s16p, 93 kb/s): unspecified frame size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Гонка 2  заезд ««Объединенный 2000» - классы Туринг и Супер-продакшн-80822.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.4.101
  Duration: 01:20:45.70, start: 0.000000, bitrate: 1601 kb/s
    Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv), 1024x576 [SAR 1:1 DAR 16:9], 1500 kb/s, 24.98 fps, 25 tbr, 90k tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, 2 channels, s16p, 93 kb/s (default)
    Metadata:
      handler_name    : SoundHandler

It could be a problem with ffmpeg because if I download the manifest and then the first segment, I can watch the video with the sound. I'll try with libav.

johny1 commented 10 years ago

I had the same no audio result when I redownloaded the file. jamieMF thanks for the additional info.

johny1 commented 9 years ago

jamieMF, can you please explain what steps you used to get the video with sound?

"if I download the manifest and then the first segment, I can watch the video with the sound"

thanks.

jaimeMF commented 9 years ago

The problem is the -bsf:a aac_adtstoasc optiion. This options is needed for other m3u8 manifest (for example for http://rutube.ru/video/3eac3b4561676c17df9132a9a1e62e3e/).

@johny1 if you want to download the video, run (assuming you use bash): ffmpeg -y -i $(youtube-dl 'http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/spbvideo_NI483529_Gonka-2-zaezd-Obyedinenniy-2000-klassi-Turing-i-S' -g) -f mp4 -c copy OUTPUT_FILENAME.mp4

yan12125 commented 8 years ago

Similar to #5591. Libav reports errors:

$ youtube-dl -v 'http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/spbvideo_NI483529_Gonka-2-zaezd-Obyedinenniy-2000-klassi-Turing-i-S' --prefer-avconv
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', 'http://news.sportbox.ru/Vidy_sporta/Avtosport/Rossijskij/spbvideo_NI483529_Gonka-2-zaezd-Obyedinenniy-2000-klassi-Turing-i-S', '--prefer-avconv']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.04.13
[debug] Git HEAD: f74197a
[debug] Python version 3.5.1 - Linux-4.5.0-1-ARCH-x86_64-with-arch-Arch-Linux
[debug] exe versions: avconv v12_dev0-2591-gd12b5b2, avprobe v12_dev0-2591-gd12b5b2, ffmpeg 3.0.1, ffprobe 3.0.1, rtmpdump 2.4
[debug] Proxy map: {}
[SportBox] Gonka-2-zaezd-Obyedinenniy-2000-klassi-Turing-i-S: Downloading webpage
[SportBoxEmbed] 80822: Downloading webpage
[SportBoxEmbed] 80822: Downloading m3u8 information
[debug] Invoking downloader on 'http://sportbox-htvod.cdn.ngenix.net/vod/vod/146331_3.mp4/chunklist.m3u8?t=1460791998&h=tbh897hwWzD2Wg7XspTA4A=='
[download] Destination: Гонка 2  заезд ««Объединенный 2000» - классы Туринг и Супер-продакшн-80822.mp4
[debug] avconv command line: avconv -y -headers 'Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/44.0 (Chrome)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
' -i 'http://sportbox-htvod.cdn.ngenix.net/vod/vod/146331_3.mp4/chunklist.m3u8?t=1460791998&h=tbh897hwWzD2Wg7XspTA4A==' -c copy -f mp4 -bsf:a aac_adtstoasc 'file:Гонка 2  заезд ««Объединенный 2000» - классы Туринг и Супер-продакшн-80822.mp4.part'
avconv version v12_dev0-2591-gd12b5b2, Copyright (c) 2000-2016 the Libav developers
  built on Apr  8 2016 12:16:19 with gcc 5.3.0 (GCC)
[mpegts @ 0x2ceb280] Continuity check failed for pid 0 expected 1 got 0
[mpegts @ 0x2ceb280] Continuity check failed for pid 4095 expected 1 got 0
[mpegts @ 0x2ceb280] max_analyze_duration 5000000 reached
[mpegts @ 0x2ceb280] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, hls,applehttp, from 'http://sportbox-htvod.cdn.ngenix.net/vod/vod/146331_3.mp4/chunklist.m3u8?t=1460791998&h=tbh897hwWzD2Wg7XspTA4A==':
  Duration: 01:20:45.69, start: 0.000000, bitrate: N/A
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Baseline) [[27][0][0][0] / 0x001B]
      yuv420p, tv, 1024x576 [PAR 1:1 DAR 16:9]
      25 fps, 90k tbn
    Stream #0:1: Audio: mp3 [[4][0][0][0] / 0x0004]
      44100 Hz, 2 channels, s16p, 96 kb/s
[AVBSFContext @ 0x3785ee0] Codec 'mp3' (86017) is not supported by the bitstream filter 'aac_adtstoasc'. Supported codecs are: aac (86018) 
Error initializing bistream filter: aac_adtstoasc
Output #0, mp4, to 'file:Гонка 2  заезд ««Объединенный 2000» - классы Туринг и Супер-продакшн-80822.mp4.part':
    Stream #0:0: Video: h264
      yuv420p, 1024x576 [PAR 1:1 DAR 16:9], q=2-31, PAR 1:1 DAR 16:9
      90k tbn
    Stream #0:1: Audio: mp3
      44100 Hz, 2 channels, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Du

ERROR: ffmpeg exited with code 1
  File "<string>", line 23, in <module>
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/__init__.py", line 419, in main
    _real_main(argv)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/__init__.py", line 409, in _real_main
    retcode = ydl.download(all_urls)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 1730, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 682, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 752, in process_ie_result
    new_result, download=download, extra_info=extra_info)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 727, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 1376, in process_video_result
    self.process_info(new_info)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 1638, in process_info
    success = dl(filename, info_dict)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 1580, in dl
    return fd.download(name, info)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/downloader/common.py", line 350, in download
    return self.real_download(filename, info_dict)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/downloader/external.py", line 42, in real_download
    self.get_basename(), retval))
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/downloader/common.py", line 161, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 545, in report_error
    self.trouble(error_message, tb)
  File "/home/yen/Executables/Multimedia/youtube-dl/youtube_dl/YoutubeDL.py", line 507, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

I guess ffmpeg should not do the wrong action silently.

dirkf commented 6 months ago

Now: linked videos at video.matchtv.ru are gone; sportbox.ru URLs have to be /vdl/player/...; stale.