Open keybounce opened 8 years ago
ffmpeg doesn't support ttml subtitles.
Good catch. Maybe a better error message in such cases?
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.
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?
Is there any way to request a different format of subtitle that FFMPEG can work with?
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
Please follow the guide below
x
into all the boxes [ ] relevant to your issue (like that [x])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.Before submitting an issue make sure you have:
What is the purpose of your issue?
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?