Closed nakda closed 5 years ago
Dear Jonathan Dana,
I use these to get English, Chinese and Japanese subs and audio when available although I prefer to have them as optional rather than burned into the video.
--add-subtitle eng,zho --add-audio eng,zho,jpn
Imagine you can easily change the language code for French. Not sure about differentiating between forced and non-forced though.
Best, Platonium
On Mar 26, 2019, at 7:08 AM, Jonathan Dana notifications@github.com<mailto:notifications@github.com> wrote:
I'm using video_transcoding to prepare my movies as followed:
transcode-video --quiet --no-log --mp4 --target big --max-width 1920 --max-height 1080 --main-audio audioTrackId --audio-width main=stereo --crop detect --fallback-crop minimal --burn-subtitle subtitleTrackId
My objective is to convert my mkv files to the most compatible format, while preserving the quality as much as possible (I didn't give the --avbr setting a try yet..).
Everything is working great so far, but where I'm losing time is when I have to identify which track to keep. Source files tracks are ordered randomly, but I always want to keep the english audio track along the french non-forced subtitle one.
According to the documentation, I can select the first input audio track in a specific language using a three-letter code --main-audio fre, then find any embedded forced subtitle track that's in the same language as the main audio track --burn-subtitle scan.
This is not answering my need since what I would like is to pick the first english audio track (--main-audio eng) and the first non-forced french subtitle track (--burn-subtitle fre-non-forced).
I would like to avoid --scaning/using ffmpeg/mkvtoolnix to identify tracks and prepare configuration files for each file.
TL;DR: is there a way to select a non-forced subtitle track by using a three-letter language code, different from the main audio track?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/donmelton/video_transcoding/issues/275, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOepbaNARQ9keMhMlKfEZvhqGUWssaR5ks5vainzgaJpZM4cLikL.
@Nakda - Hi there! Hopefully we can get this working for you. It's always a little dicey when your input is random, but --main-audio eng --add-subtitle fra
will get you most of the way there. What it won't do is burn the subtitle into the video. It will be set to passthrough if the original is PGS (I'm not 100% certain what happens if the input is non-image based).
I would recommend that you take a peek at the file first in MediaInfo or ffprobe to determine which track you want to burn and add that with --burn subtitle n
. The ffprobe command to quickly view this is ffprobe -select_streams s -show_entries stream_tags=language -v error -i "FILENAME"
What you're looking for would be more of a feature request to change the behavior of --burn-subtitle
to be:
--burn-subtitle TRACK|LANG|scan
burn track selected by number into video
or first with language code
or `scan` to find forced track in main audio language
@donmelton will have to speak to whether or not this is a change that would be considered, or even doable.
Hope this helps somewhat!
@Nakda Thanks for opening this issue with such a great question. And thanks to @khaosx and @platonium for responding so quickly, especially Kris with the best solution and that dandy feature enhancement.
OK, to officially answer your main question, Jonathan:
TL;DR: is there a way to select a non-forced subtitle track by using a three-letter language code, different from the main audio track?
Unfortunately, no. As Kris pointed out, this would require a feature enhancement. So I and the other project contributors will start discussing if, when and how we could do this.
I am so sorry I don't have a simple solution for you.
Thanks everyone for the feedback.
@khaosx I'm already using something similar to ffprobe to identify the tracks I want, but this is the time consuming part of the process I would like to skip.
Not sure the passthrough PGS will be handled by my Plex clients so I will stick with the old method for now unfortunately.
@donmelton Thanks, I'm now aware that it is not possible with the current state of the project. No big deal, I just wanted to be sure in case I was wasting time because I misread the manual :)
I'm no Ruby nor transcoding expert, as I'm using C# since I started programming, but I'm getting used to it and quickly adapted your batch example to Ruby (I find it more convenient since I'm running video_transcoding on Windows without using Linux subsystem).
So maybe I could investigate on the topic myself? If you don't mind, could you give me a quick insight on where to start?
@Nakda Sorry I took so long to reply! I left for a multiple-hour drive across state after my last comment.
Sure, please feel free to investigate and send a patch! The relevant code would be in the prepare_subtitle
function of the transcode-video
file.
Also, would you and/or @platonium like to join our Video Transcoding Slack? That's where me, @khaosx and other contributors/commenter hang out together to discuss development, usage, configuration and other random stuff.
If so, just send me an email (see: https://donmelton.com/contact/ for my email address) with your email address and I'll send you an invitation from Slack.
@donmelton No worries, thanks for the headsup. I'm going to send you an email to join the Slack 👍
Do you want me to close the issue for now until I investigate more?
@Nakda Sure, you can close this issue since one of us is bound to open a new issue describing the feature that @khaosx proposed.
Dear Don,
Hope I’m doing this right. Is there a slack digest? We don’t use it at work so I would only follow along as I have been.
Best, Plato
On Mar 27, 2019, at 8:04 AM, Jonathan Dana notifications@github.com<mailto:notifications@github.com> wrote:
Closed #275https://github.com/donmelton/video_transcoding/issues/275.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/donmelton/video_transcoding/issues/275#event-2233432288, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOepbXJDsuxVyytxbjNK77PfMH0PXk0Tks5va4hygaJpZM4cLikL.
@platonium Github is always acceptable as a place to ask questions, and thanks for asking this one!
Sadly, there's no digest, as it's not really a mailing list type thing. It's more of a real-time chat. And that email would be gigantic - there's a fair amount of random chatter on no particular topic at all. If you ever have the ability to use it, please drop us a note for an invite!
Regards!
@platonium Yes, as @khaosx says, just send me your email address and I'll send you an invitation from Slack. You can even used their Web-based interface. You don't have to install the Slack application.
I'm using
video_transcoding
to prepare my movies as followed:transcode-video --quiet --no-log --mp4 --target big --max-width 1920 --max-height 1080
--main-audio audioTrackId --audio-width main=stereo
--crop detect --fallback-crop minimal --burn-subtitle subtitleTrackId
My objective is to convert my mkv files to the most compatible format, while preserving the quality as much as possible (I didn't give the
--avbr
setting a try yet..).Everything is working great so far, but where I'm losing time is when I have to identify which track to keep. Source files tracks are ordered randomly, but I always want to keep the english audio track along the french non-forced subtitle one.
According to the documentation, I can select the first input audio track in a specific language using a three-letter code
--main-audio fre
, then find any embedded forced subtitle track that's in the same language as the main audio track--burn-subtitle scan
.This is not answering my need since what I would like is to pick the first english audio track (
--main-audio eng
) and the first non-forced french subtitle track (--burn-subtitle fre-non-forced
).I would like to avoid
--scan
ing/using ffmpeg/mkvtoolnix to identify tracks and prepare configuration files for each file.TL;DR: is there a way to select a non-forced subtitle track by using a three-letter language code, different from the main audio track?