Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

How can I add background box to words in ASS subtitle format?

I want to add a background box to the word being spoken, I have tried different ASS subtitle tags but none seems to output my requirement. Which tags can be used to achieve that? I was trying ...
fady taher's user avatar
0 votes
0 answers
29 views

ffmpeg -c:s dvdsub continues processing after writing the outuput

When running ffmpeg -y -t 20 -i test-in.ts -c:s dvdsub test-out.mp4 ffmpeg continues to use CPU after writing the 20 seconds of output. Observed with versions 6.1.1 and 7.0. There is no such problem ...
Peter's user avatar
  • 11
1 vote
0 answers
100 views

How to extract subtitle timestamps using ffprobe (not working as expected)?

I am trying to extract subtitle timestamps from a M2TS file using ffprobe. This does not work as expected. The M2TS file is known to contain 1001 subtitles in track 4, but I am getting about 4000 ...
Binarus's user avatar
  • 1,835
0 votes
1 answer
173 views

Change subtitle font size with ffmpeg

I’m able to change the FontName when hardcoding subtitles with ffmpeg: ffmpeg -y -i temp.mp4 -vf subtitles=subtitles.srt:force_style='FontName=Roboto-Condensed-Bold' output.mp4 but unable to change ...
Sulli's user avatar
  • 137
1 vote
0 answers
49 views

Generating ffmpeg command to mux in subtitles matching the style of VLC

I am trying to mux in subtitles with ffmpeg, but I am having trouble getting the desired style and output with a reference point being VLC's standard format of showing subtitles matching the look of ...
bigboss's user avatar
  • 11
0 votes
1 answer
208 views

How to convert multiple .VTT segments to one single .VTT file or subtitle file?

I have a list of .VTT segments from a bunch of URLs for a stream looking like these (the total amount of segments is much higher): https://drod24s.akamaized.net/all/clear/none/d9/...
bigboss's user avatar
  • 11
0 votes
0 answers
152 views

Disable subtitles by default in a MP4 file using FFmpeg

Is there a way to disable (not to remove) subtitles by default using FFmpeg, I tried: ffmpeg -i input.mkv -map 0:0 -map 0:1 -map 0:2 -c:v copy -c:a copy -c:s mov_text -disposition:s:s:0 0 output.mp4 ...
Nau's user avatar
  • 205
2 votes
1 answer
122 views

I cannot seem to add subtitles to MP4 using FFmpeg

I have a video called test_video.mp4 downloaded from YouTube This is the information of the video obtained by running ffmpeg -i test_video.mp4: Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test_video.mp4'...
Nau's user avatar
  • 205
0 votes
0 answers
138 views

How to extract subtitle from usm file

I would like to extract subtitle.txt from usm file, I tried use ffmpeg but it show unspuported file. Hexedit show that file has txt extension. Ffmpeg support demux cri usm file, but I cant figure out ...
Marcin Nancin's user avatar
0 votes
1 answer
176 views

FFmpeg: How to encoding h264 mkv files in h265 mkv and keep the 2 subtitles streams?

I've lots of mkv files in h264 format with 2 languages of subtitle, and I'm trying to convert them in h265 (with cuda) and keep the 2 subtitles streams. I've tried that: ffmpeg -i "xxx.mkv" -...
ShkYo's user avatar
  • 11
3 votes
1 answer
304 views

How to escape file path for burned-in text-based subtitles with FFmpeg?

I'm trying to burn text-based subtitles into a video using ffmpeg, via the command line option -vf followed by subtitles=(filename):si=(subtitle index). I need this to work for both Windows and macOS. ...
kshetline's user avatar
  • 165
1 vote
1 answer
128 views

Unexpected output when using FFMPEG to add multiple English Subtitles to MP4 file

I am trying to soft-encode 3 subtitle files into my film. I extracted the subtitles from the DVD using ByteCopy I am using this command to add the files: ffmpeg -i BloodDiamond.mp4 -i ...
Our Man in Bananas's user avatar
0 votes
0 answers
160 views

ffmpeg fails to detect subtitles

Just encoding an episode of Game of Thrones, Season 5, Episode 6 - Unbowed Unbent Unbroken. First copy to a temporary file, and thats whats fails to detect all subtitles. Here is an example that works,...
Summers's user avatar
  • 11
0 votes
1 answer
227 views

Does 'force_style' work with 'subtitles=video.mkv' for FFMPEG?

I am using this script to encode an burn in subtiles for an entire folder: for filepath in newFiles: video = os.path.basename(filepath) videoName = os.path.splitext(video)[0] newFile = '%s....
http.bird's user avatar
1 vote
0 answers
338 views

How to add multiple audio and subtitle tracks to video?

I'm trying to add an audio track and three subtitle tracks to a video file with already one audio track, but can't get it to work. How does it work (on Linux in case it isn't obvious)? The subtitle ...
zvavybir's user avatar
  • 145
0 votes
0 answers
334 views

Is there any ffmpeg option to rescale too fast/slow subtitles?

I found subtitles to an old movie but no one fits to it correctly. I found a delay option like: ffmpeg -itsoffset 2 -i subtitles.srt -c copy subtitles_delayed.srt which could fit it at current frame, ...
Peter.k's user avatar
  • 129
1 vote
0 answers
653 views

Metadata for closed captioned subtitles

I have a video file (mp4.mp4) and two subtitle files (cc.srt and sub.srt). Both subtitle files are in English but the first one has sound effects "[gasps]" and "[coughs]". If I add ...
Artyer's user avatar
  • 111
0 votes
1 answer
292 views

How to combine these two FFmpeg commands into one command?

I'm using ffmpeg to modify multiple .mp4 files. First I use this command to change the default language from eng to fr. ffmpeg.exe -i "imput 1.mp4" -map 0 -c copy -disposition:a:0 0 -...
Dimitri's user avatar
1 vote
0 answers
426 views

ffmpeg subtitles does not copy text, only timestamps when converting ass to srt

I've been trying to convert an mkv to mp4 without loosing subtitles, however nothing has worked so far. I've narrowed it down to some sort of bug (I think). I can extract the subtitles from the mkv to ...
pop1040's user avatar
  • 21
1 vote
1 answer
3k views

Unable to find a suitable output format for 'copy' copy: Invalid argument - ffmpeg Error

I'm trying to get the video and first voice channel with converted AAC. Also trying to add a subtitle. The command I've used is: ffmpeg -i yourmkv.mkv -i yoursubtitles.srt -map 0:v -map 0:a -map 1:s -...
tatoline's user avatar
  • 623
0 votes
0 answers
880 views

Set default subtitle language based on language code (eng, spa, etc.), not the stream specifier

I batch downloaded videos from a channel, but the subtitle languages available for each video are not consistent. Is there a way to set a default subtitle using the language code (e.g. eng, spa, fra, ...
athena's user avatar
  • 1
0 votes
0 answers
521 views

ffmpeg/ffprobe won't detect the language of a WEBvtt (subtitles) file

A WEBvtt subtitle file starts with a few header lines, and one of them indicates the language: WEBVTT Kind: captions Language: en 00:00:09.977 --> 00:00:11.563 I'd like you to take a look at this ...
PierU's user avatar
  • 1,629
1 vote
1 answer
8k views

How can I extract a subtitle in "HDMV PGS" format from a video with FFmpeg?

I'm trying to extract a subtitle in "HDMV PGS" format embedded in a video with this command ffmpeg -i Movie.mkv -map 0:s:0 subs.srt from an answer on Super User command, but it gives the ...
Idhtft's user avatar
  • 11
2 votes
0 answers
75 views

Huge video duration after PGS subtitles burn onto video

i'm trying to burn subtitles onto video stream and something weird happens. This is my video file before the process: ffprobe version N-107936-gf99d15cca0-20220829 Copyright (c) 2007-2022 the FFmpeg ...
Tvuce's user avatar
  • 21
1 vote
1 answer
3k views

How to add metadata to subtitle?

I'm trying to add language metadata to existing external .ass subtitles, but it doesn't seem to work. I'm using ffmpeg -i input.ass -map 0 "-metadata:s:s:0" "language=eng" "-...
tyrande's user avatar
  • 11
2 votes
2 answers
2k views

How to make youtube-dl (yt-dlp) generate subtitles properly and not duplicate the text?

I'm using yt-dlp to download some videos, and I've told it to embed the subtitles. This seems to work, except it's generating subtitles in the most horrible way by duplicating the text. For example, ...
Component's user avatar
0 votes
0 answers
3k views

How can I force a subtitle track to be set as active on an MP4 video?

I'm converting .mkv's to mp4 and it's working, however the issue is that when I open the .mp4, the subtitle track is disabled by default. I have to manually select it as such: How can I make it so ...
Mnea's user avatar
  • 1
2 votes
2 answers
3k views

ffprobe OCR of a subtitle stream

I have some video files containing HDMV PGS subtitles, and I need to convert them to subrip (or other text subtitles). I know that I can ffmpeg demux the video file to extract .sup and on the fly ...
Minty's user avatar
  • 143
0 votes
0 answers
214 views

FFMPEG: boost video volume but preserve subtitles

Using as input video files that contain subtitle streams, currently I use this command to boost volume while copying video: ffmpeg -i input_file -vcodec copy -af "volume=10.0dB" ...
GI D's user avatar
  • 1
0 votes
1 answer
2k views

FFMpeg Softsub ass to mp4 using custom font

Requirement I'm trying to add an ass subtitle file to a mp4 video. I want the text to use system/custom fonts and have a certain position. My test This is an example of my ass file: [Script Info] ...
Timmy's user avatar
  • 223
-1 votes
2 answers
5k views

How to convert audio/video file to SRT?

I want to convert audio/video file to SRT. I've tried these commands: ffmpeg -i sample.mp4 sample.srt ffmpeg -threads 4 -i sample.mp4 -vn -an -codec:s:0.2 srt sample.srt But then I learned that it ...
TheCodeExpert's user avatar
0 votes
2 answers
2k views

How to convert text-based subtitles to image-based subtitles?

I want to convert an ass type subtitle track into a dvd_subtitle type track. I know I can't simply ask ffmpeg to convert it with -c:s dvd_subtitle, but there must be another simple way, since video ...
nc404's user avatar
  • 115
1 vote
0 answers
274 views

How to hard code / embed subtitles of videos inside a folder with FFMPEG

Lets say I have folder A with lots of videos that have TX3G subtitles Some videos don't have any subtitles So I need a windows command to process all videos inside this folder and embed / hard code ...
Furkan Gözükara's user avatar
3 votes
1 answer
4k views

Extracting QuickTime mov_text subtitles with ffmpeg

I have a .mov file that has mov_text-formatted subtitle tracks that were created using the old (now deprecated) QuickTime 7 Pro's "Text Track" feature. This is what ffmpeg -i myfile.mov ...
jan's user avatar
  • 201
3 votes
1 answer
3k views

Extracting DVB_subtitles with ffmpeg fails with empty file / nothing encoded

These are the streams contained: Stream #0:0[0x247]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc Stream #...
udippel's user avatar
  • 31
0 votes
1 answer
1k views

ffmpeg adding subtitles with options

Hi I'm having trouble adding options to subtitles: I can only add 1 attribute. ffmpeg -i "video.mp4" -vf 'subtitles=subtitles.srt:force_style=Fontname=Z003,PrimaryColour=&HCCFF0000' -y &...
user1630709's user avatar
2 votes
1 answer
1k views

Use ffmpeg to convert .mkv to .mp4 while retaining hard-embedded subs

I'm trying to convert an mkv video into mp4 while keeping the hard-embedded subs. Extra information is below - does anyone know which command I should use to make this work? So far I've tried these ...
Wilan's user avatar
  • 21
3 votes
1 answer
2k views

how to embed RTL subtitles in a video (hebrew, arabic, ...) with the correct language directionality?

I try to hard-code subtitles in a video, by re-encoding the video with the subtitles as graphics (and NOT as an additional stream). The subtitles are in Hebrew / Arabic. (All texts are UTF-8 encoded. ...
Berry Tsakala's user avatar
0 votes
1 answer
2k views

ffmpeg: mkv to mp4 with subtitles hardcoded

I don't understand something. I'm trying this: ffmpeg -i input.mkv -map 0:0 -map 0:2 -map 0:3 -vf subtitles=input.mkv output.mp4 But I have this error: Automatic encoder selection failed for output ...
user1508331's user avatar
0 votes
1 answer
416 views

ffmpeg subtitles filter input pad error

What am I doing wrong? I'm trying to make this work for a couple of hours now. I know it has something to do with the subtitles filter but couldn't figure it out. If I run a sample command, such as ...
Nicolae Olariu's user avatar
2 votes
0 answers
640 views

Subtitles misaligned/missing when cutting video using ffmpeg

TL;DR: After cutting a video with ffmpeg, subtitles are invisible in VLC player even though there is a subtitle stream. I have an MP4 file of a TV recording of a movie and I want to cut off the parts ...
Mophotla's user avatar
  • 141
1 vote
1 answer
1k views

FFmpeg: Issues muxing/copying ASS subtitle streams from one MKV source with another MKV, causes 33secs of missing subtitle at the beginning

Hey first time posting, But I really tried to look all around for a solution, even tried a couple of options that worked for me before for a similar issue with WebVTT from another solution [here]. ...
Jinhjy's user avatar
  • 11
2 votes
1 answer
5k views

How do I copy a specific subtitle track, by language, with FFmpeg?

I have a video file with 30+ subtitles from which I want to save only the English subtitle track. Input #0, matroska,webm, from 'Galaxy.mkv': Metadata: title : Galaxy.720p.WEBRip.x264-...
sfxedit's user avatar
  • 333
4 votes
0 answers
759 views

Change the speed of subtitles in an srt file

I have a set of videos that were recorded at 25 fps. That was the original speed of the video and I want to keep it that way. The video and audio work fine. I have a corresponding set of subtitle ...
farnsy's user avatar
  • 141
0 votes
0 answers
630 views

ffmpeg: adding subtitles (.srt) to MKV only adds first subtitle frame

I am trying to add a separate .srt file to an existing MKV container using ffmpeg: > ffmpeg -i 'input.mkv' -fix_sub_duration -i 'subtitles.srt' -map 0 -c copy -map 1 -c:s:1 srt 'output.mkv' I am ...
AlpacasInSpace's user avatar
0 votes
1 answer
612 views

How can I fix Error: "No usable fontconfig configuration file found, using fallback." in a WIN10 when I try hardsub a SRT in a MP4?

I trying to burn a subtitle on video but no way to get this. Already create a bin fonts\fonts.conf in everywhere but seems not working right. But the same code works on another computer. Someone can ...
Renan Silbar's user avatar
1 vote
1 answer
10k views

Why is FFmpeg suddenly throwing “Segmentation fault: 11” errors and creating output files with only “ftypisomisomiso2avc1mp4freemdat” as content?

I am running FFmpeg version 4.3.1 — as installed via Homebrew — on macOS Catalina (10.15.7). And this morning I was running a standard FFmpeg command to I use merge MP4 and SRT subtitles: ffmpeg -y -i ...
Giacomo1968's user avatar
5 votes
1 answer
2k views

resize/change aspect ratio of PGS subtitles with ffmpeg

i have some blu-ray rips that i have re-encoded. they were letterboxed and so now have resolutions of 1920x816, 1920x804, etc. and this has caused some issues with the subtitles. in some video players ...
Bredboi's user avatar
  • 51
1 vote
2 answers
873 views

I would like to re-pack MKV files while keeping ALL subtitles

I have been using MakeMKV to rip DVDs to my hard drive. This program works OK, but produces very inefficient files. Resulting video files from Blu-Rays are typically 35GB or more. I would like to use ...
MarcNBarrett's user avatar
4 votes
3 answers
8k views

How can ffmpeg extract dvd_subtitles to separate file?

How can I extract dvd_subtitles from an .mkv file using ffmpeg into a separate file like a .sub or .idx? Or both? Thank you for your help/advice.
maddogandnoriko's user avatar