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.4k stars 9.96k forks source link

france.tv section France O videos download without sound #17147

Closed boulderob closed 5 years ago

boulderob commented 6 years ago

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.08.04. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

Before submitting an issue make sure you have:

What is the purpose of your issue?


Description of your issue, suggested solution and other information

when i watch the link, https://www.france.tv/580531-meurtres-en-martinique.html, online it works fine with perfect sound. However, when i download it with youtube-dl, the video downloads fine but during playback there is no sound!?

i download lots of video from france.tv and usually it usually is rock solid. however lately, when i download any videos from the section on their site called "France Ö", https://www.france.tv/france-o/, which is where the specific video i cited above is from, they all download without any sound. so i think it's generally only a problem with this section of the france.tv site.

one thing to note is that when i normally download successfully with youtube-dl and it works fine, including from the non-"France O" section of france.tv, youtube-dl normally gives me a "spinner wheel" with a text-based progress report on the status line that updates in real time. with the video listed above and any video you download from the France Ö section of france.tv that is failing to download sound, youtube-dl spits out a lot of extra real-time streaming download info that scrolls on the screen. this leads me to believe it's not handling the download as it normally should or maybe it doesn't recognize the stream that France O is returning so perhaps there's a bit of fix up code that needs to be inserted to "reign it in"?.

oddly enough, youtube-dl reports none of the available video download formats have any sound (ie video only) for this video! that probably explains my no sound problem. but why am i able to stream teh same video live on the site and hear the sound? is it possible that

# youtube-dl -F https://www.france.tv/580531-meurtres-en-martinique.html
[FranceTVSite] 580531-meurtres-en-martinique: Downloading webpage
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading video JSON
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading geo restriction info
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading signed hls_v5_os manifest URL
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading m3u8 information
[info] Available formats for 1e468b60-7882-4bbd-98e0-56bd6d1ffd03:
format code                             extension  resolution note
hls_v5_os-audio-aacl-64-Audio_Français  mp4        audio only [qtz] 
hls_v5_os-191                           mp4        256x144     191k , avc1.42C01E, 25.0fps, video only
hls_v5_os-321                           mp4        320x180     321k , avc1.42C01E, 25.0fps, video only
hls_v5_os-609                           mp4        512x288     609k , avc1.42C01E, 25.0fps, video only
hls_v5_os-880                           mp4        704x396     880k , avc1.4D401F, 25.0fps, video only
hls_v5_os-1554                          mp4        1024x576   1554k , avc1.4D401F, 25.0fps, video only (best)

note that if i try to download the audio file directly listed in the youtube-dl -F output above, it errors out with ERROR: requested format not available!?

# youtube-dl   -f hls_v5_os-audio-aacl-64-Audio_Français https://www.france.tv/580531-meurtres-en-martinique.html
[FranceTVSite] 580531-meurtres-en-martinique: Downloading webpage
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading video JSON
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading geo restriction info
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading signed hls_v5_os manifest URL
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading m3u8 information
ERROR: requested format not available

here's the rest of my command line output for reference. you can see some of the streaming output i described above (i snipped the output at the end). also note the "WARNING: hlsnative has detected features it does not support, extraction will be delegated to ffmpeg.." warning about six lines after firing the download off!

any help greatly appreciated. thx

 # youtube-dl   -f hls_v5_os-321 https://www.france.tv/580531-meurtres-en-martinique.html
[FranceTVSite] 580531-meurtres-en-martinique: Downloading webpage
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading video JSON
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading geo restriction info
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading signed hls_v5_os manifest URL
[FranceTV] 1e468b60-7882-4bbd-98e0-56bd6d1ffd03: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
WARNING: hlsnative has detected features it does not support, extraction will be delegated to ffmpeg
[download] Destination: Meurtres en Martinique-1e468b60-7882-4bbd-98e0-56bd6d1ffd03.mp4
ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libavresample   3.  7.  0 /  3.  7.  0
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[hls,applehttp @ 0x7f905d002e00] Opening 'https://cloudreplayfrancetv.akamaized.net/keys/crypt.key' for reading
[hls,applehttp @ 0x7f905d002e00] Opening 'crypto+https://cloudreplayfrancetv.akamaized.net/0bdac59e8f5b5/181551307_france-domtom_TA.ism/ZXhwPTE1MzMzNTU0Njl+YWNsPSUyZjBiZGFjNTllOGY1YjUlMmYxODE1NTEzMDdfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9ZTgyOTM3Zjk5ZjhmMGZiMGNiMDFkMGFkNjQxMjM4MmMxMmVkZjY2MzA5ZjgwZDUwZjgyYTE3OTM4ZWIyN2VmYw==/181551307_france-domtom_TA-video=240000-1.ts' for reading
Input #0, hls,applehttp, from 'https://cloudreplayfrancetv.akamaized.net/0bdac59e8f5b5/181551307_france-domtom_TA.ism/ZXhwPTE1MzMzNTU0Njl+YWNsPSUyZjBiZGFjNTllOGY1YjUlMmYxODE1NTEzMDdfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9ZTgyOTM3Zjk5ZjhmMGZiMGNiMDFkMGFkNjQxMjM4MmMxMmVkZjY2MzA5ZjgwZDUwZjgyYTE3OTM4ZWIyN2VmYw==/181551307_france-domtom_TA-video=240000.m3u8':
  Duration: 01:35:49.40, start: 10.000000, bitrate: 0 kb/s
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Constrained Baseline) ([27][0][0][0] / 0x001B), yuv420p, 320x180 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Metadata:
      variant_bitrate : 0
Output #0, mp4, to 'file:Meurtres en Martinique-1e468b60-7882-4bbd-98e0-56bd6d1ffd03.mp4.part':
  Metadata:
    encoder         : Lavf57.83.100
    Stream #0:0: Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 320x180 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 90k tbc
    Metadata:
      variant_bitrate : 0
Stream mapping:
<snip>
NiesmialyGosc commented 6 years ago

I've encountered exactly the same issue & hope this could be fixed ASAP. Thanks

NiesmialyGosc commented 6 years ago

I just notice you've forgot to add the debug information by using the --verbose parameter (see this thread, where it states "If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows: Add the -v flag to your command line you run youtube-dl with (youtube-dl -v ), copy the whole output and insert it here. It should look similar to one below"), and as a result the team might not be able to provide further assistance.

lamiricore commented 5 years ago

Same issue for me :

youtube-dl -v https://www.france.tv/france-o/riding-zone/riding-zone-saison-12/940303-episode-23.html [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'-v', u'https://www.france.tv/france-o/riding-zone/riding-zone-saison-12/940303-episode-23.html'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2019.03.18 [debug] Python version 2.7.13 (CPython) - Linux-4.14.78-4-osmc-armv7l-with-debian-9.7 [debug] exe versions: avconv present, avprobe present, ffmpeg present, ffprobe present [debug] Proxy map: {} [FranceTVSite] 940303-episode-23: Downloading webpage [FranceTV] ae2b5e5b-e27e-4ef7-97bb-129c105c52d1: Downloading video JSON [FranceTV] ae2b5e5b-e27e-4ef7-97bb-129c105c52d1: Downloading geo restriction info [FranceTV] ae2b5e5b-e27e-4ef7-97bb-129c105c52d1: Downloading signed hls_v5_os manifest URL [FranceTV] ae2b5e5b-e27e-4ef7-97bb-129c105c52d1: Downloading m3u8 information [debug] Default format spec: bestvideo+bestaudio/best [debug] Invoking downloader on u'https://cloudreplayfrancetv.akamaized.net/d74eb66570ac5/201878464_france-domtom_TA.ism/ZXhwPTE1NTQxNTEzNzN+YWNsPSUyZmQ3NGViNjY1NzBhYzUlMmYyMDE4Nzg0NjRfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9OGQ0NjhkZDlkZjgyZjZlMGM0MTA0ZTQ3NWFhZTEzYjI1ZWM4MzU3ZjIyMDQ2YzJkOTIxM2MyZjk0ZDJlNThkOA==/201878464_france-domtom_TA-video=1404000.m3u8' [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 163 [download] Destination: Riding Zone - Episode 23-ae2b5e5b-e27e-4ef7-97bb-129c105c52d1.fhls_v5_os-1554.mp4 [download] 100% of 279.52MiB in 09:21 [debug] Invoking downloader on u'https://cloudreplayfrancetv.akamaized.net/d74eb66570ac5/201878464_france-domtom_TA.ism/ZXhwPTE1NTQxNTEzNzN+YWNsPSUyZmQ3NGViNjY1NzBhYzUlMmYyMDE4Nzg0NjRfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9OGQ0NjhkZDlkZjgyZjZlMGM0MTA0ZTQ3NWFhZTEzYjI1ZWM4MzU3ZjIyMDQ2YzJkOTIxM2MyZjk0ZDJlNThkOA==/201878464_france-domtom_TA-audio_fre=64000.m3u8' [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 163 [download] Destination: Riding Zone - Episode 23-ae2b5e5b-e27e-4ef7-97bb-129c105c52d1.fhls_v5_os-audio-aacl-64-Audio_Français.mp4 [download] 100% of 14.82MiB in 01:17 [ffmpeg] Merging formats into "Riding Zone - Episode 23-ae2b5e5b-e27e-4ef7-97bb-129c105c52d1.mp4" [debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Riding Zone - Episode 23-ae2b5e5b-e27e-4ef7-97bb-129c105c52d1.fhls_v5_os-1554.mp4' -i 'file:Riding Zone - Episode 23-ae2b5e5b-e27e-4ef7-97bb-129c105c52d1.fhls_v5_os-audio-aacl-64-Audio_Français.mp4' -c copy -map '0:v:0' -map '1:a:0' 'file:Riding Zone - Episode 23-ae2b5e5b-e27e-4ef7-97bb-129c105c52d1.temp.mp4' ERROR: Traceback (most recent call last): File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2052, in post_process files_to_delete, info = pp.run(info) File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 512, in run self.run_ffmpeg_multiple_files(info['__files_to_merge'], temp_filename, args) File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 235, in run_ffmpeg_multiple_files raise FFmpegPostProcessorError(msg) FFmpegPostProcessorError

the ffmpeg postprocess can't merge the audio and video file. When i look at the audio file it has not the same lenght as the video file and there is no sound after 9 seconds

PhantomCorsican commented 4 years ago

I confirm that I reproduce the bug on the last version

$ youtube-dl --version
2019.12.25
$ ffmpeg -version
ffmpeg version 3.4.6-0ubuntu0.18.04.1
$ youtube-dl -F https://www.france.tv/france-3/scooby-doo/1105165-la-vengeance-du-monstre-des-marais.html
[FranceTVSite] 1105165-la-vengeance-du-monstre-des-marais: Downloading webpage
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading video JSON
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading geo restriction info
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading signed hls_v5_os manifest URL
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading m3u8 information
[info] Available formats for ec3d4f0b-05e3-4aea-8d83-d97e732633f4:
format code                             extension  resolution note
**hls_v5_os-audio-aacl-64-Audio_Français  mp4        audio only [fr]** 
hls_v5_os-191                           mp4        384x216     191k , avc1.42C01E, 25.0fps, video only
hls_v5_os-321                           mp4        640x360     321k , avc1.4D401F, 25.0fps, video only
hls_v5_os-609                           mp4        960x540     609k , avc1.4D401F, 25.0fps, video only
hls_v5_os-880                           mp4        1280x720    880k , avc1.64001F, 25.0fps, video only (best)
$ /usr/bin/youtube-dl https://www.france.tv/france-3/scooby-doo/1105165-la-vengeance-du-monstre-des-marais.html
[FranceTVSite] 1105165-la-vengeance-du-monstre-des-marais: Downloading webpage
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading video JSON
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading geo restriction info
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading signed hls_v5_os manifest URL
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading m3u8 information
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 130
[download] Destination: Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.fhls_v5_os-880.mp4
[download] 100% of 311.43MiB in 00:54
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 130
[download] Destination: Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.fhls_v5_os-audio-aacl-64-Audio_Français.mp4
[download] 100% of 15.19MiB in 00:08
[ffmpeg] Merging formats into "Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.mp4"
Deleting original file Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.fhls_v5_os-880.mp4 (pass -k to keep)
Deleting original file Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.fhls_v5_os-audio-aacl-64-Audio_Français.mp4 (pass -k to keep)

The downloaded video file is 25 minutes long but the sound is interrupted after 11 seconds

$ /usr/bin/youtube-dl -vx https://www.france.tv/france-3/scooby-doo/1105165-la-vengeance-du-monstre-des-marais.html
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-vx', u'https://www.france.tv/france-3/scooby-doo/1105165-la-vengeance-du-monstre-des-marais.html']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.12.25
[debug] Python version 2.7.17 (CPython) - Linux-5.0.0-37-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[FranceTVSite] 1105165-la-vengeance-du-monstre-des-marais: Downloading webpage
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading video JSON
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading geo restriction info
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading signed hls_v5_os manifest URL
[FranceTV] ec3d4f0b-05e3-4aea-8d83-d97e732633f4: Downloading m3u8 information
[debug] Invoking downloader on u'https://cloudreplayfrancetv.akamaized.net/6892bf24d00e5/220690601_france-domtom_TA.ism/ZXhwPTE1Nzc1NTE4NDV+YWNsPSUyZjY4OTJiZjI0ZDAwZTUlMmYyMjA2OTA2MDFfZnJhbmNlLWRvbXRvbV9UQS5pc20qfmhtYWM9ZjliZDAwNTQ5MGQ2MDhjZTc1OTA2ZDIxYTczYzlmZGI3MmNhMzY2YmY1ZjAyYzdiODE0YjdjYWIxMGVkZDU1ZA==/220690601_france-domtom_TA-audio_fre=64000.m3u8'
[download] Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.mp4 has already been downloaded
[download] 100% of 301.37MiB
[debug] ffmpeg command line: ffprobe -show_streams 'file:Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.mp4'
[ffmpeg] Fixing malformed AAC bitstream in "Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.mp4' -c copy -f mp4 '-bsf:a' aac_adtstoasc 'file:Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.temp.mp4'
[debug] ffmpeg command line: ffprobe -show_streams 'file:Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.mp4'
[ffmpeg] Destination: Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.m4a
[debug] ffmpeg command line: ffmpeg -y -loglevel 'repeat+info' -i 'file:Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.mp4' -vn -acodec copy '-bsf:a' aac_adtstoasc 'file:Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.m4a'
Deleting original file Scooby-Doo - La vengeance du monstre des marais-ec3d4f0b-05e3-4aea-8d83-d97e732633f4.mp4 (pass -k to keep)

The downloaded sound file is only 11 seconds long, it should be 25 minutes long as in the original replay video

eric-saintetienne commented 4 years ago

Same problem with the latest version of youtube-dl: 2019.12.25

This ticket needs to be re-opened.

I use videos from this page: https://www.france.tv/france-2/tout-le-monde-veut-prendre-sa-place/replay-videos

eric-saintetienne commented 4 years ago

The problem is with ffmpeg which is unable to process the AAC stream. The stream is not broken because it can be played by all browsers (!) and when extracted (using the -k option of youtube-dl) some audio players can play the extracted audio stream properly (Rhythmbox can play and seek anywhere in the file but vlc and mpv can't for some reason)

So a workaround is to download the streams independently (using the -k option) and encode them using mkvtoolnix's merger:

mkvmerge -o output.mkv video-input-file.mp4 audio-input-file.mp4

For some reason mkvmerge is able to copy the AAC audio stream as is whereas ffmpeg interprets the ausio stream anyway, finds an error and bails out (even with the -c:a copy option!)

Note: I haven't tried with avconv.

PhantomCorsican commented 4 years ago

Many thanks @ericsaintetienne ! I confirm that the following commands solve my problem : youtube-dl -k <url> mkvmerge -o output.mkv video-input-file.mp4 audio-input-file.mp4 At the end, the MKV file is readable in VLC...

eric-saintetienne commented 4 years ago

Well, it doesn't solve the problem as much as it works around it. A proper fix is still needed in ffmpeg (or the library it is using).