Custom ffmpeg transcoding to HLS with Subtitles not working
Posted: Tue Dec 07, 2021 5:55 pm
Hi all,
I'm having issues passing a subtitle file to a custom ffmpeg encoder that works just fine with a video file only but when adding a subtitle file with -i option ffastrans ends with an error.
Here is the custom ffmpeg command:
At first, reading the logs found that I had to add a backslash between %s_original_folder%\%s_original_name% otherwise it was concatenating both variables without a backslash.
But that did not help either and still fails (see attached log)
I was able to compress the workflow and the log, but I cannot seems to be able to send the subtitle file (even compressed) it says the quota was exceeded.
As a side note, the ffmpeg command inside the log works just fine after removing all the escape characters (I guess those are needed when submitting the job inside FFAstrans)
Can you please help me find out what is going on?
I'm having issues passing a subtitle file to a custom ffmpeg encoder that works just fine with a video file only but when adding a subtitle file with -i option ffastrans ends with an error.
Here is the custom ffmpeg command:
Code: Select all
-i "%s_original_drive%%s_original_folder%\%s_original_name%.srt" -filter_complex "[0:v]split=3[v1][v2][v3]; [v1]scale=w=1280:h=720[v1out]; [v2]scale=w=854:h=480[v2out]; [v3]scale=w=640:h=360[v3out]" -map [v1out] -c:v:0 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:0 1465k -maxrate:v:0 1465k -minrate:v:0 1465k -bufsize:v:0 3500k -preset fast -g 30 -sc_threshold 0 -keyint_min 30 -map [v2out] -c:v:1 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:1 964k -maxrate:v:1 964k -minrate:v:1 964k -bufsize:v:1 1800k -preset fast -g 30 -sc_threshold 0 -keyint_min 30 -map [v3out] -c:v:2 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:2 764k -maxrate:v:2 764k -minrate:v:2 764k -bufsize:v:2 1500k -preset fast -g 30 -sc_threshold 0 -keyint_min 30 -map a:0 -c:a:0 aac -b:a:0 128k -ac 2 -map a:0 -c:a:1 aac -b:a:1 96k -ac 2 -map a:0 -c:a:2 aac -b:a:2 48k -ac 2 -map 1 -c:s webvtt -f hls -hls_playlist_type 2 -var_stream_map "v:0,a:0,name:1465,s:0,sgroup:subtitle_group v:1,a:1,name:964 v:2,a:2,name:764" -master_pl_name index.m3u8 -hls_time 6 -hls_list_size 0 -hls_allow_cache 1 -start_number 1 -hls_segment_filename
"P:\HLS\Outbox\%s_original_name%\%v_%05d.ts" -f hls -master_pl_name "index.m3u8" "P:\HLS\Outbox\%s_original_name%\%v.m3u8" -hls_subtitle_path P:\HLS\Outbox\%s_original_name%\%v.m3u8
But that did not help either and still fails (see attached log)
I was able to compress the workflow and the log, but I cannot seems to be able to send the subtitle file (even compressed) it says the quota was exceeded.
As a side note, the ffmpeg command inside the log works just fine after removing all the escape characters (I guess those are needed when submitting the job inside FFAstrans)
Can you please help me find out what is going on?