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

[CBS] Getting errors on subtitles #9971

Open keybounce opened 8 years ago

keybounce commented 8 years ago

Please follow the guide below


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


The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


I am getting errors on subtitles from CBS on Colbert Report. I suspect I'm doing something wrong. What am I doing wrong?

keybounceMBP:Colbert michael$ youtube-dl -v http://www.cbs.com/shows/the-late-show-with-stephen-colbert/video/CqL6j94f0bp2b
1ItuczaM_DpwYUvnF_G/the-late-show-6-28-2016-tom-brokaw-sarah-erin-foster-bibi-bourelly-/
[debug] System config: []
[debug] User config: [u'--no-mtime', u'-o', u'%(title)s.%(ext)s', u'-f', u'best[ext=mp4][height=480]/bestvideo[ext=mp4][height=480]+bestaudio[ext=m4a]/best[ext=mp4][height>360][height<=480]/bestvideo[ext=mp4][height>360][height<=480]+bestaudio/best[height>360][height<=480]/bestvideo[height>360][height<=480]+bestaudio/best[ext=mp4][height>=280][height<=360]/best[height<=480]/worst', u'--write-sub', u'--embed-subs', u'--recode-video', u'mp4']
[debug] Command-line args: [u'-v', u'http://www.cbs.com/shows/the-late-show-with-stephen-colbert/video/CqL6j94f0bp2b1ItuczaM_DpwYUvnF_G/the-late-show-6-28-2016-tom-brokaw-sarah-erin-foster-bibi-bourelly-/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2016.07.01
[debug] Python version 2.7.5 - Darwin-13.4.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 3.0.2, ffprobe 3.0.2, rtmpdump 2.4
[debug] Proxy map: {}
[CBS] CqL6j94f0bp2b1ItuczaM_DpwYUvnF_G: Downloading JSON metadata
[CBS] CqL6j94f0bp2b1ItuczaM_DpwYUvnF_G: Downloading SMIL data for RTMP
[CBS] CqL6j94f0bp2b1ItuczaM_DpwYUvnF_G: Downloading SMIL data for StreamPack
[CBS] CqL6j94f0bp2b1ItuczaM_DpwYUvnF_G: Downloading m3u8 information
[CBS] CqL6j94f0bp2b1ItuczaM_DpwYUvnF_G: Downloading SMIL data for OnceURL
[CBS] CqL6j94f0bp2b1ItuczaM_DpwYUvnF_G: Checking video URL
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: Downloading m3u8 information
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: Checking http-1200 video format URL
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: http-1200 video format URL is invalid, skipping
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: Checking http-4400 video format URL
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: http-4400 video format URL is invalid, skipping
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: Checking http-2000 video format URL
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: http-2000 video format URL is invalid, skipping
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: Checking http-764 video format URL
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: http-764 video format URL is invalid, skipping
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: Checking http-512 video format URL
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: http-512 video format URL is invalid, skipping
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: Checking http-264 video format URL
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: http-264 video format URL is invalid, skipping
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: Checking http-60 video format URL
[CBS] c97625f7-04ac-4de7-9e61-2d72e549fda4: http-60 video format URL is invalid, skipping
[CBS] CqL6j94f0bp2b1ItuczaM_DpwYUvnF_G: Downloading JSON metadata
[info] Writing video subtitles to: The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).en.ttml
[debug] Invoking downloader on u'https://cbsios-vh.akamaihd.net/i/temp_hd_gallery_video/CBS_Production_Outlet_VMS/video_robot/CBS_Production_Entertainment/2016/06/27/713946179638/CBS_COLBERT_0169_CONTENT_CIAN_steamclip_857002_,1848,3596,2596,1248,848,548,298,158,000.mp4.csmil/index_3_av.m3u8?null=0&id=AgAtGeZDuFfDD1fddVds1TR1CSUNvPPgAWbtk+CeT4bLv2AHRcSNpnQVMFYVwsV%2f5Au02e0YZrrgHg%3d%3d'
[download] Destination: The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).mp4
[debug] ffmpeg command line: ffmpeg -y -headers 'Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome)
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cookie: _alid_=wMNzfo6jSC8VLy1YfuocDA==; hdntl=exp=1467428567~acl=%2fi%2ftemp_hd_gallery_video%2fCBS_Production_Outlet_VMS%2fvideo_robot%2fCBS_Production_Entertainment%2f2016%2f06%2f27%2f713946179638%2fCBS_COLBERT_0169_CONTENT_CIAN_steamclip_857002_*~data=hdntl~hmac=bc301f9fc1f3744fed2398840d083011d1be4b15e9abaed78f41c4253f0c1f54
' -i 'https://cbsios-vh.akamaihd.net/i/temp_hd_gallery_video/CBS_Production_Outlet_VMS/video_robot/CBS_Production_Entertainment/2016/06/27/713946179638/CBS_COLBERT_0169_CONTENT_CIAN_steamclip_857002_,1848,3596,2596,1248,848,548,298,158,000.mp4.csmil/index_3_av.m3u8?null=0&id=AgAtGeZDuFfDD1fddVds1TR1CSUNvPPgAWbtk+CeT4bLv2AHRcSNpnQVMFYVwsV%2f5Au02e0YZrrgHg%3d%3d' -c copy -f mp4 -bsf:a aac_adtstoasc 'file:The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).mp4.part'
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-avresample --enable-libmp3lame --enable-libvorbis --enable-libopus --enable-libtheora --enable-libschroedinger --enable-libopenjpeg --enable-libmodplug --enable-libvpx --enable-libsoxr --enable-libspeex --enable-libass --enable-libbluray --enable-lzma --enable-gnutls --enable-fontconfig --enable-libfreetype --enable-libfribidi --disable-libxcb --disable-libxcb-shm --disable-libxcb-xfixes --disable-indev=jack --disable-outdev=xv --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --enable-vda --enable-videotoolbox --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libavresample   3.  0.  0 /  3.  0.  0
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Input #0, hls,applehttp, from 'https://cbsios-vh.akamaihd.net/i/temp_hd_gallery_video/CBS_Production_Outlet_VMS/video_robot/CBS_Production_Entertainment/2016/06/27/713946179638/CBS_COLBERT_0169_CONTENT_CIAN_steamclip_857002_,1848,3596,2596,1248,848,548,298,158,000.mp4.csmil/index_3_av.m3u8?null=0&id=AgAtGeZDuFfDD1fddVds1TR1CSUNvPPgAWbtk+CeT4bLv2AHRcSNpnQVMFYVwsV%2f5Au02e0YZrrgHg%3d%3d':
  Duration: 00:41:22.43, start: 0.100511, bitrate: 0 kb/s
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (Main) ([27][0][0][0] / 0x001B), yuv420p, 768x432 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 5 kb/s
Output #0, mp4, to 'file:The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).mp4.part':
  Metadata:
    encoder         : Lavf57.25.100
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 768x432 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 5 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=74398 fps=233 q=-1.0 Lsize=  388963kB time=00:41:22.44 bitrate=1283.6kbits/s speed=7.77x    
video:356436kB audio:29077kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.895002%
[ffmpeg] Downloaded 398298203 bytes
[download] 100% of 379.85MiB
[ffmpeg] Not converting video file The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).mp4 - already is in target format mp4
[ffmpeg] Embedding subtitles in 'The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).mp4'
[debug] ffmpeg command line: ffmpeg -y -i 'file:The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).mp4' -i 'file:The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).en.ttml' -map 0 -c copy -map -0:s -c:s mov_text -map 1:0 -metadata:s:s:0 language=eng 'file:The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).temp.mp4'
ERROR: file:The Late Show - 6_28_2016 (Tom Brokaw, Sara & Erin Foster, Bibi Bourelly).en.ttml: Invalid data found when processing input
Traceback (most recent call last):
  File "/Users/michael/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1786, in post_process
    files_to_delete, info = pp.run(info)
  File "/Users/michael/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 382, in run
    self.run_ffmpeg_multiple_files(input_files, temp_filename, opts)
  File "/Users/michael/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 168, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError

keybounceMBP:Colbert michael$ 
remitamine commented 8 years ago

ffmpeg doesn't support ttml subtitles.

yan12125 commented 8 years ago

Good catch. Maybe a better error message in such cases?

remitamine commented 8 years ago

yes, we should make sure that youtube-dl allow to embed only for subtitles supported by ffmpeg and the container and maybe add fixup by embeding in mkv or convert the subtitle before embeding.

yan12125 commented 8 years ago

I prefer just an error message instead of converting subtitles automatically. Maybe some people want to embed srt while others vtt.

By the way, can TTML subtitles be merged into mkv?

keybounce commented 8 years ago

Is there any way to request a different format of subtitle that FFMPEG can work with?

HeroCC commented 7 years ago

Similar error here with TTML subs from PBS:


youtube-dl --write-info-json --write-description --all-subs --embed-subs --embed-thumbnail --add-metadata -a links.txt -o "%(title)s/%(title)s-%(id)s-%(resolution)s.%(ext)s"
[pbs] Downloading JSON metadata
[pbs] deja-vu-1858-1961-7tmfea: Downloading webpage
[pbs] 3004622993: Downloading widget/partnerplayer page
[pbs] 3004622993: Downloading portalplayer page
[pbs] 3004622993: Downloading hls-1080p-16x9 video url info
[pbs] 3004622993: Downloading m3u8 information
[pbs] 3004622993: Downloading mp4-2500k-16x9 video url info
[pbs] 3004622993: Downloading hls-16x9-720p video url info
[pbs] 3004622993: Downloading m3u8 information
[pbs] 3004622993: Checking http-2000k video URL
[pbs] 3004622993: http-2000k video URL is invalid, skipping
[pbs] 3004622993: Checking http-6500k video URL
[pbs] 3004622993: http-6500k video URL is invalid, skipping
[pbs] 3004622993: Checking http-4500k video URL
[pbs] 3004622993: http-4500k video URL is invalid, skipping
[pbs] 3004622993: Checking http-3000k video URL
[pbs] 3004622993: Checking http-1100k video URL
[pbs] 3004622993: http-1100k video URL is invalid, skipping
[pbs] 3004622993: Checking http-730k video URL
[pbs] 3004622993: http-730k video URL is invalid, skipping
[pbs] 3004622993: Checking http-730k video URL
[pbs] 3004622993: http-730k video URL is invalid, skipping
[pbs] 3004622993: Checking http-3000k video URL
[pbs] 3004622993: Checking http-2000k video URL
[pbs] 3004622993: http-2000k video URL is invalid, skipping
[pbs] 3004622993: Checking http-1100k video URL
[pbs] 3004622993: http-1100k video URL is invalid, skipping
[info] Writing video description to: The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)/The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-196
1)-3004622993-1920x1080.description
[info] Writing video subtitles to: The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)/The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)
-3004622993-1920x1080.en.ttml
[info] Writing video description metadata as JSON to: The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)/The Vietnam War _ Explicit Language Version - 01 -
Déjà Vu (1858-1961)-3004622993-1920x1080.info.json
[pbs] 3004622993: Downloading thumbnail ...
[pbs] 3004622993: Writing thumbnail to: The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)/The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-
1961)-3004622993-1920x1080.jpg
[download] Destination: The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)/The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)-3004622993
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linu
x-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth -
-enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreety
pe --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, hls,applehttp, from 'https://ga.video.cdn.pbs.org/videos/vietnam-war-not-edited/26403898-23c3-4157-a9ae-7e5ad3888707/2000008007/hd-16x9-mezzanine-1080p/xcw0xfeq_vwar0101_explicit_r-16x9-1080p-1080p-6500k.m3u8':
  Duration: 01:25:50.81, start: 2.050078, bitrate: 0 kb/s
  Program 0
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 96 kb/s
[mp4 @ 0x2f0c440] Codec for stream 0 does not use global headers but container format requires global headers
[mp4 @ 0x2f0c440] Codec for stream 1 does not use global headers but container format requires global headers
Output #0, mp4, to 'file:The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)/The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)-3004622993-1920x1080.mp4.part':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 29.97 fps, 29.97 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=154370 fps=162 q=-1.0 Lsize= 4150892kB time=01:25:50.82 bitrate=6601.7kbits/s
video:4087215kB audio:58711kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.119804%
[ffmpeg] Downloaded 4250513828 bytes
[download] 100% of 3.96GiB
[ffmpeg] Adding metadata to 'The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)/The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)-3004622993-1920x1080.mp4'
[ffmpeg] Embedding subtitles in 'The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)/The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)-3004622993-1920x1080.mp4'
ERROR: file:The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)/The Vietnam War _ Explicit Language Version - 01 - Déjà Vu (1858-1961)-3004622993-1920x1080.en.ttml: Invalid data found when processing input