Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subtitle embed issue #4718

Closed
cyburgee opened this issue Jan 15, 2015 · 1 comment
Closed

subtitle embed issue #4718

cyburgee opened this issue Jan 15, 2015 · 1 comment
Labels
bug

Comments

@cyburgee
Copy link

@cyburgee cyburgee commented Jan 15, 2015

There is an issue with embedding subtitles if the video format downloaded does not include audio. Here is the output of my command:

$ youtube-dl -v -f 135/134/136/133/18/22/43/5 --embed-sub --write-auto-sub -o "/Users/ceburger/Movies/youtubes/b301c582-1ba7-4fc1-b628-838b3f91d807.%(ext)s" https://www.youtube.com/watch?v=eCPjR-94p3U
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-f', '135/134/136/133/18/22/43/5', '--embed-sub', '--write-auto-sub', '-o', '/Users/ceburger/Movies/youtubes/b301c582-1ba7-4fc1-b628-838b3f91d807.%(ext)s', 'https://www.youtube.com/watch?v=eCPjR-94p3U']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.01.15
[debug] Python version 2.7.9 - Darwin-14.0.0-x86_64-i386-64bit
[debug] exe versions: ffmpeg 2.5.2, ffprobe 2.5.2
[debug] Proxy map: {}
[youtube] eCPjR-94p3U: Downloading webpage
[youtube] eCPjR-94p3U: Extracting video information
[youtube] eCPjR-94p3U: Looking for automatic captions
[youtube] eCPjR-94p3U: Downloading XML
[youtube] eCPjR-94p3U: Downloading DASH manifest
[info] Writing video subtitles to: /Users/ceburger/Movies/youtubes/b301c582-1ba7-4fc1-b628-838b3f91d807.en.srt
[debug] Invoking downloader on 'https://r16---sn-nwj7knls.googlevideo.com/videoplayback?id=7823e347ef78a775&itag=135&source=youtube&requiressl=yes&ms=au&mv=m&pl=18&mm=31&ratebypass=yes&mime=video/mp4&gir=yes&clen=2383611&lmt=1394257976744154&dur=30.198&signature=88F56680DAD5E626E24EF536A3E54BA88FCC8B84.7132F766D3BE3F5C4B44186964B370DE5688A740&sver=3&upn=kLA_muCddPg&mt=1421365377&fexp=900718,904843,907263,909725,916644,927622,934947,9405613,941004,943917,947209,947225,948124,952302,952605,952901,955301,955404,957103,957105,957201,958631,959701&key=dg_yt0&ip=73.189.206.204&ipbits=0&expire=1421387021&sparams=ip,ipbits,expire,id,itag,source,requiressl,ms,mv,pl,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: /Users/ceburger/Movies/youtubes/b301c582-1ba7-4fc1-b628-838b3f91d807.mp4
[download] 100% of 2.27MiB in 00:00
[ffmpeg] Embedding subtitles in '/Users/ceburger/Movies/youtubes/b301c582-1ba7-4fc1-b628-838b3f91d807.mp4'
[debug] ffmpeg command line: ffmpeg -y -i /Users/ceburger/Movies/youtubes/b301c582-1ba7-4fc1-b628-838b3f91d807.mp4 -i /Users/ceburger/Movies/youtubes/b301c582-1ba7-4fc1-b628-838b3f91d807.en.srt -map 0:0 -map 0:1 -c:v copy -c:a copy -map 1:0 -c:s:0 mov_text -metadata:s:s:0 language=eng -f mp4 /Users/ceburger/Movies/youtubes/b301c582-1ba7-4fc1-b628-838b3f91d807.mp4.temp
ERROR: Stream map '0:1' matches no streams.
Traceback (most recent call last):
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1243, in post_process
    keep_video_wish, info = pp.run(info)
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 488, in run
    self.run_ffmpeg_multiple_files(input_files, temp_filename, opts)
  File "/usr/local/bin/youtube-dl/youtube_dl/postprocessor/ffmpeg.py", line 103, in run_ffmpeg_multiple_files
    raise FFmpegPostProcessorError(msg)
FFmpegPostProcessorError

The issue is a conflict with the format I specified which does not include audio and the ffmpeg command that specifies that the audio stream be copied. If you remove the '-c:a copy' from the line:

ffmpeg -y -i /Users/ceburger/Movies/youtubes/8f979ccd-2206-4b93-87fc-5aef22f0ff07.mp4 -i /Users/ceburger/Movies/youtubes/8f979ccd-2206-4b93-87fc-5aef22f0ff07.en.srt -map 0:0 -map 0:1 -c:v copy -c:a copy -map 1:0 -c:s:0 mov_text -metadata:s:s:0 language=eng -f mp4 /Users/ceburger/Movies/youtubes/8f979ccd-2206-4b93-87fc-5aef22f0ff07.mp4.temp

then it'll work properly.

@jaimeMF jaimeMF added the bug label Jan 15, 2015
@jaimeMF jaimeMF closed this in e205db3 Jan 16, 2015
@jaimeMF
Copy link
Collaborator

@jaimeMF jaimeMF commented Jan 16, 2015

It will work in the next version, thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.