I'm trying to convert x265 video to x264, copying the audio and the subtitles (vobsub).
The video is converted and the audio is copied ok, but the subs are missing.
I listed the results from ffprobe and the command line used for the conversion.
ffprobe:
Input #0, matroska,webm, from '1.mkv':
Metadata:
creation_time : 2022-05-12T17:49:26.000000Z
ENCODER : Lavf58.76.100
Duration: 00:44:48.30, start: 0.000000, bitrate: 1140 kb/s
Stream #0:0: Video: hevc (Main), yuv420p(tv, smpte170m/bt470bg/bt709), 720x406 [SAR 1:1 DAR 360:203], 25 fps, 25 tbr,
1k tbn (default)
Metadata:
DURATION : 00:44:48.301000000
Stream #0:1(eng): Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
title : Stereo
DURATION : 00:44:48.213000000
Stream #0:2(eng): Subtitle: dvd_subtitle, 720x576
Metadata:
DURATION : 00:43:11.405000000
[Code:ffmpeg -i 1.mkv -filter_complex "[0:v:0][0:s:0]overlay[v]" -map "[v]" -map 0:a:0 -acodec copy -c:v libx264 -crf 18 output.mkv
+ Reply to Thread
Results 1 to 5 of 5
-
Last edited by sambat; 11th Jul 2022 at 20:03. Reason: slowly losing mind
-
I don't use vobsubs but I suspect they are being rendered below the bottom of the frame. Note the subs are 720x576 but the video is only 720x406. Try resizing the video to 1024x576 instead.
-
Thanks to both.
@jagabo, resizing didn't do it.
The subtitles being a larger resolution than the video, is that normal?
@Selur, changed the command and it worked (I had to add the extra map command before -scodec copy.
The logic of the map and overlay commands elude me.
Code:ffmpeg -i 1.mkv -filter_complex "[0:v:0][0:s:0]overlay[v]" -map "[v]" -map 0:s:0 -scodec copy -map 0:a:0 -acodec copy -c:v libx264 -crf 18 output.mkv
Similar Threads
-
How to specify subtitles codec in ffmpeg cli?
By Anonymous543 in forum Newbie / General discussionsReplies: 5Last Post: 22nd Dec 2021, 23:41 -
Using ffmpeg to dowload subtitles
By JohnReese in forum Video Streaming DownloadingReplies: 9Last Post: 2nd Oct 2021, 22:50 -
Using ffmpeg to dowload webvtt subtitles
By ecolek in forum Video Streaming DownloadingReplies: 24Last Post: 20th Jun 2021, 04:12 -
ffmpeg how to cut off video and keep subtitles
By aeon1 in forum Newbie / General discussionsReplies: 5Last Post: 31st Jul 2020, 08:43 -
yellow subtitles with ffmpeg
By lintucrowk in forum DVB / IPTVReplies: 1Last Post: 23rd Aug 2018, 17:01