FFmpeg does not copy subtitles with two input files.
To convert my videos to Av1and Opus, I first use the following command to convert the video track to Av1 :
Then I use the following command to add the Av1 video track, convert the audio track from the start file to Opus and copy the subtitle track from the start file:Code:ffmpeg -i video.5.1.subfr.mkv -map 0:v:0 -pix_fmt yuv420p10le -f yuv4mpegpipe -strict -1 - | SvtAv1EncApp -i stdin --preset 6 --keyint 240 --input-depth 10 --crf 30 --rc 0 --passes 1 --film-grain 0 -b av1.ivf
Once done, I look at the video.5.1.av1.opus.subfr.mkv file with MKVToolNix Gui, there is no subtitle track.Code:ffmpeg -i av1.ivf -i video.5.1.subfr.mkv -map 0:v -map 1:a:0 -c:v copy -c:a libopus -af channelmap=channel_layout=5.1 -b:a 250k -vbr on -c:s copy video.5.1.av1.opus.mkv
After thinking about it, I wonder if I shouldn't map the subtitle track with :
positioned after :
-map 0:v -map 1:a:0
I looked at the documentation of FFmpeg on the official website but it is not clear to me at all.
I'm already converting a video track to Av1, which takes several hours so I'm asking before I'm done. If I don't get an answer by then, I'll do some tests and report the results here.
If anyone has any ideas?
+ Reply to Thread
Results 1 to 7 of 7
Last edited by ignace72; 30th Mar 2022 at 21:10.
Thank you for your quick and precise answer.
According to the link I gave myself, adapted to my case, I had to add :
This will allow me to be sure that the subtitles are well copied.
Positioned after :
-map 0:v -map 1:a:0
Sorry, but since last night the conversion process has been stuck at 26 minutes without returning to the command prompt and therefore without an error message.
I didn't realize it until 30 minutes ago.
So I just restarted the process.
So I'll get back to you to report on the modified command test as mentioned above after the process is complete.
That's it, the conversion of the video track to Av1 is finished.
Adding -map 1:s? to my command works perfectly.
Last edited by ignace72; 1st Apr 2022 at 03:13.
Try -c:s copy command
-c:s = command for selecting codec of subtitle
copy = copies subtitle stream without rencode
You didn't read my first and last messages.
The piece of order you suggest is already present in my order and I indicated the piece of order that was missing, and I indicated that my problem is solved.