I have a lot of videos with soft or external subtitles and was wondering if there is a way to hard-code them into the video stream when converting? Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried the Sub tab but I want to convert and burn-in at the same time so I tried using the -vf flag like you mentioned but it keeps erroring. Can you tell me what I might be doing wrong?
But to do that, all "soft subtitles" must separate from the MKV container and in the folder specified in the path above to be hard-coded into the video stream. Do I understand that correctly?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a lot of videos with soft or external subtitles and was wondering if there is a way to hard-code them into the video stream when converting? Thanks!
You could yse the subtitles tab for external subtitles hard-coding,
or in main tab parameters, use the subtitles filter, like:
-vf subtitles=subtitle.srt
I tried the Sub tab but I want to convert and burn-in at the same time so I tried using the -vf flag like you mentioned but it keeps erroring. Can you tell me what I might be doing wrong?
-map 0 -c:v hevc_amf -quality balanced -rc cqp -qp_p 28 -qp_i 28 -quality balanced -rc cqp -qp_p 28 -qp_i 28 -vf "scale=640:360" subtitles=subtitle.srt -c:a aac -b:a 128K -filter:a loudnorm
I think you need to join the vf filters, like
-vf "scale=640:360,subtitles=subtitle.srt"
subtitles.srt should be located at input file path.
log file should help pointing at the errors cause.
Ok, I changed the preset to this:
-map 0 -c:v hevc_amf -quality balanced -rc cqp -qp_p 20 -qp_i 20 -quality balanced -rc cqp -qp_p 20 -qp_i 20 -vf "scale=640:360,subtitles=subtitle.srt" -c:a aac -b:a 128K -filter:a loudnorm
and I received this error message when I tested the preset:
...and the SRT subtitle with the same filename was in the directory.
I'll test it asap.
File paths inside vf filters are very confusing in Window, \ and : need to be escaped.
Please try something like this:
-map 0 -c:v hevc_amf -quality balanced -rc cqp -qp_p 20 -qp_i 20 -quality balanced -rc cqp -qp_p 20 -qp_i 20 -vf "scale=640:360,subtitles=C\:/Users/\Data/\Videos/\Test.srt" -c:a aac -b:a 128K -filter:a loudnorm
Replacing the Test.srt path with your own.
Those parameters tested successfully for me.
But to do that, all "soft subtitles" must separate from the MKV container and in the folder specified in the path above to be hard-coded into the video stream. Do I understand that correctly?
You could use the input file in subtitles filter, or even use the input file path variable as filter file (fx button for variables)
Last edit: Abel 2023-11-14