-
Notifications
You must be signed in to change notification settings - Fork 13
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
Embedding subtitles ends in ERROR: Conversion failed! #18
Comments
Okay, that's quite simple to fix, but I think that's not the issue here. youtube-dl already is invoked with What happens when you invoke ydl as follows?
|
Then i get .mp4 instead of .mkv files. This fixes the subtitle issue of the merging error, but i need to have mkv files instead. BTW: Is youtube-sync written in the way to only handle .mkv files or also mp4 witthout a problem? |
no errors? and the mp4 contains the subtitles?
I guess it's written for mkv only. But a solution might be to not use extensions at all. What happens with the following command?
and please try this as well: (it's with
|
looks like it does work.
So you need to add
Tested that just now. ydl doesn't seem to support that. |
@PotcFdk any idea how we should fix this in the ytsync script? Should we add |
Yes.
This gives me the error:
I allready tried this, and it works, but imho we should avoid re-encondig at all costs! Especially because we don't have to as we could theoretically simply just copy the streams to another container(mp4 > mkv) without re-encoding. Also the reencode suffers in quality and is heavy on the cpu!
Something like: `youtube-dl -v -i -f '22/136+bestaudio[ext=m4a]/bestvideo[height<=720]+bestaudio[ext=m4a]/best[height<=720]' --all-subs --merge-output-format mkv -o 'SYNC/PursuitofWonder/ID/%(id)s.%(ext)s' 'https://www.youtube.com/channel/UC-tLyAaPbRZiYrOJxAGB7dQ' if %(id)s.mp4|%(id)s.webm exist(){ Beware that this dummycode above wont work, it is just for brainstorming. I think in general it would be nice to support more than one file format, let the user choose in a separate settings file in the script-root where he can set the default file format(mkv,mp4,webm) as also the default quality format (bestvideo+bestaudio,22 etc...) |
I agree.
I guess so, too.
Agree again.
yes, probably.
I thought ytdl actually merges the subtitles into the mp4. No?
Best if you try if it works, then share it.
note that I'm not the maintainer, just a user who contributed some code ;) |
Yes ytdl does this if you add "--embed-subs" parameter. But if you omit, it saves the subtitles files as *.vtt separately, then it is simple to merge the .mp4 + .vtt into an .mkv without loosing the formatting of the subtitles. I also tried to directly convert the merged .mp4 with integrated subtitles into mkv
I already tried the steps above manually and they worked like a charm :) i just don't have enough time today to write the code nicely. Maybe tomorrow ;) |
Alright, so I finally had some time and motivation to investigate this. AnalysisI tried to call youtube-dl without your custom Calling youtube-dl with
Hmm, alright, but why would ffmpeg support it when using the standard The first one is the working call, the second one is the non-working call:
Aha! The difference is a Solution?It's kind of tricky, honestly. I am not too sure why youtube-dl decides to suddenly specify a subtitle codec, but I assume they have their reason (although I might contact them to make sure it's not unintended behavior). DiscussionWhat are your opinions on this? |
Quick update: As you can see in ytdl-org/youtube-dl#22090, the TL;DR: We need to make sure that whatever is selected by |
This issue will be resolved by #11, which contains the plan to remove the hardcoded |
Verbose log
Description
When i try to download all videos of a channel i get the error "Conversion failed!" at the step "[ffmpeg] Embedding subtitles in 'SYNC/PursuitofWonder/ID/oGVhOWqsBWM.mkv'". Is this error youtube-dl or ffmpeg related? How to fix this?
The url of the video is https://www.youtube.com/watch?v=oGVhOWqsBWM
As @dstftw said "Do not hardcode extension in output template" in his comment here
So i guess he means the fact that youtube-sync does hardcode the .mkv filename extension in the script...But since youtube-dl doesn't offer the ability to force MKV-container(AFAIK) what should we do to fix this?
Reference to: ytdl-org/youtube-dl#21929
The text was updated successfully, but these errors were encountered: