Hi,
I've got some BluRays of a 4:3 TV series. I'd like to encode smaller copies to store on the hard drive so I don't need to get the discs out each time.
I thought I would crop out the black bars off the sides as I go, which is easy enough for the video stream, but just can't manage to get this to work with the subtitle stream (PGSSUB).
If I only crop the video (crop=1440:1080:240:0), the subtitles get squeezed horizontally. The subtitle stream can be filtered similarly to the video, but then it stops being a subtitle stream and FFMPEG outputs a file with two video streams (cropped video and cropped subtitle). So basically it can do what I want, but I can't get a useful output file. Can I somehow force the filtered subtitle back into being a subtitle stream? Just a question of order of operations perhaps?
There also seems to be no PGSSUB encoder, but I'm fine with DVDSUB even if the text then loses some of the anti-aliasing. I don't really want to go through the trouble of OCR'ing all of this.
So long story short, how would I crop the black bars off both the video and the subtitles?
Thanks for any input!
+ Reply to Thread
Results 1 to 11 of 11
-
-
The easiest way is not to crop the video stream, but to leave it at 1920x1080. Then the subtitles will also fit.
Otherwise, you will first have to extract the subtitle, then adjust it to the new dimensions using Subtitleedit, for example, and then mux the modified subtitle with the cropped video stream. -
Thanks, yeah, any solution that I can't automate with FFMPEG will be too troublesome for this many episodes. Leaving it as is was my first idea for sure

But are you saying that it's definitely impossible to do within FFMPEG? I have previously scaled DVD subtitles to fit a BD image in a similar context, and that worked fine (I think using 'canvas_size'). Somehow these BD subs are just behaving differently. -
This suggestion won't remove the black sidebars.
It will give you smaller copies.
Use BDRebuilder to convert the blu ray disc to DVD9 or even DVD5.
This will give you about a 9GB or 4.3 GB file.
It will leave the subtitles as they are.
You can copy & use just the .mts file of the main movie.
If you are using a PC media player the .MTS should play with no problem.
If it is a commercial encrypted blu ray you will need a decrypter.
XReveal is free.
There is an old guide here for doing this:
https://forum.videohelp.com/threads/299579-How-to-shrink-a-Blu-ray-to-DVD-5-DVD-9-or-BD-25 -
Thanks - I've already got all the BDs ripped to my hard drive, no issue there. I also have a FFMPEG/Python script set up which will automatically re-encode all the episodes to my liking.
I can certainly let the process run as is, and get usable 1920x1080 files, but this would be a really good opportunity to crop away the bars since I'm re-encoding anyway. I just need guidance with FFMPEG specifically, as it can get pretty complicated with all the filter graphs and stuff.
This is more or less where I am now:
ffmpeg -canvas_size 1920x1080 -i input.m2ts -vcodec hevc_nvenc -acodec aac -scodec dvdsub -filter_complex "[0:0]crop=1440:1080:240:0[vid];[0:2]crop=1440:1080:240:0[sub]" -map [vid] -map 0:1 -map [sub] output.mkv
The problem is the third stream (-map [sub]) doesn't come out as a subtitle stream, but a second video stream. It is, however, cropped properly to match the actual video which is exactly what I would want. It seems like I'm 95% there but some crucial bit is missing! -
I hope some member that is better than I am at ffmpeg steps in to help.
I can tell you your -map settings are not correct.
The video one should be something like this:-map 0:0
The audio as you have it.
The sub may be:I'm not sure that -scodec dvdsub will get the subs from the .mts file.Code:-map 1:0 or -map 0:s:1 or -map 0:s:0
It might be something like:orCode:-c:s mov_text
I had to use code to eliminate the smilesCode:-c:s dvd_subtitle
Last edited by cholla; 14th Feb 2026 at 14:13. Reason: used code to eliminate smiles
-
There is some interesting discussion herre, not sure if you saw this:
https://emby.media/community/index.php?/topic/60844-scale-subtitle-stream-to-target-di...nal-dimension/ -
@cholla
But if I use "-map 0:0" for the video, won't it just bypass the crop filter and use the original input stream?
Looking at the documentation, "dvdsub" seems like the appropriate nomenclature when choosing the encoder. Where did you find "dvd_subtitle" from?
@davexnet
I had not seen this, it does have some interesting syntax to play around with! However, it seems that in all those examples the output is overlayed on top of the image. I don't really want to burn in the subtitles here, just crop them and maintain a separate stream. -
Alright, well I couldn't get FFMPEG to do this by itself. However, I found SupMover which runs on the command line and is able to crop PGSSUBs. So, I first run a script which does:
This leaves me with cropped subtitles, which can then be used as a second input file in the actual FFMPEG command which re-encodes the video. Something like (simplified here):Code:ffmpeg -i input.m2ts -map 0:2 -c:s copy input.sup supmover input.sup output.sup --crop 240 0 240 0
I did also need to include "-itsoffset" to get the subtitles to start at the correct point in time.Code:ffmpeg -i input.m2ts -i output.sup [...video filtering steps here...] -map [video] -map 0:1 -map 1:0 output.mkv
Not quite a one-liner in the end, but gets the job done in an automated fashion, which was the goal! -
It might.
I run the file I'm working on with ffmpeg with ffmpeg i input.file to see what to use in map.
I found dvd_subtitle in my notes for ffmpeg .
You should find "DES... dvd_subtitle DVD subtitles (decoders: dvdsub) (encoders: dvdsub)" in the ffmpeg codec list using ffmpeg -codecs.
In this topic at videohelp & probably in more.
https://forum.videohelp.com/threads/402429-Using-ffmpeg-and-image-based-subtitle-tracks
In the AI Google here: AI
Similar Threads
-
Adding subtitles with FFmpeg
By Nico Darko in forum Video ConversionReplies: 1Last Post: 16th Oct 2025, 02:26 -
How change subtitles or audio track of 3D BluRay disc and remux it together
By tetranode in forum Blu-ray RippingReplies: 0Last Post: 20th Nov 2023, 16:24 -
--
By hnsteyding in forum Blu-ray RippingReplies: 0Last Post: 10th Jul 2022, 12:33 -
Using ffmpeg to dowload subtitles
By JohnReese in forum Video Streaming DownloadingReplies: 9Last Post: 2nd Oct 2021, 22:50 -
Replacing pgs subtitles in an m2ts bluray file
By jond in forum SubtitleReplies: 1Last Post: 12th Jun 2021, 06:23



Quote