Hi,
I'm still an FFMPEG newbie, so bear with me.
I'm using TvHeadend to record free-to-air shows via DVB-T in Denmark.
The VLC doesn't play dvbsub, so I need to convert it to something VLC or ideally QuickTime player can work with - but from what I can read in google, then both dvb/dvdsub are image based subtitles, and doesn't convert to srt easily, which would be required for using the mp4 container.
(If someone knows how to (practically) do OCR on dvbsub streams inside MKV, I'd like a description also as a side note.)
The source:
root@nas:/mnt/store/tv/recorded/Sherlock# ffmpeg -i Baskervilles\ hunde.mkv
ffmpeg version 3.4-1~16.04.york0 Copyright (c) 2000-2017 the FFmpeg developers
<cut - compiler versions, libs etc >
Input #0, matroska,webm, from 'Baskervilles hunde.mkv':
Metadata:
title : Sherlock: Baskervilles hunde
encoder : Tvheadend Matroska muxer
DATE_BROADCASTED: 2017-11-10 21:00:00
ORIGINAL_MEDIA_TYPE: TV
CONTENT_TYPE : Movie / Drama
TVCHANNEL : DR3
SUMMARY : Engelsk krimi fra 2011.For 20 år siden så Henry Knight sin far blive dræbt af et enormt, hundeagtigt væsen på den uhyggelige Dartmoor-hede.
SUMMARY-dan : Engelsk krimi fra 2011.For 20 år siden så Henry Knight sin far blive dræbt af et enormt, hundeagtigt væsen på den uhyggelige Dartmoor-hede.
DESCRIPTION : Nu har Henry set tegn på, at den mystiske kæmpehund stadig er løs. Sagen fører Sherlock Holmes til et tophemmeligt militært forskningscenter midt på heden. Er hunden en genetisk mutation, fremavlet til at dræbe krigsfjender på slagmarken?Sherlock
DESCRIPTION-dan : Nu har Henry set tegn på, at den mystiske kæmpehund stadig er løs. Sagen fører Sherlock Holmes til et tophemmeligt militært forskningscenter midt på heden. Er hunden en genetisk mutation, fremavlet til at dræbe krigsfjender på slagmarken?Sherlock
Duration: 01:38:30.88, start: 0.000000, bitrate: 3415 kb/s
Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 1k tbn, 100 tbc (default)
Stream #0:1(dan): Audio: aac (HE-AAC), 48000 Hz, stereo, fltp (default)
Stream #0:2(dan): Subtitle: dvb_subtitle (default)
Stream #0:3(dan): Subtitle: dvb_subtitle (default)
I've tried something simple like:
ffmpeg -i "Baskervilles hunde.mkv" -vcodec copy -acodec copy -cdvdsub "Baskervilles hunde2.mkv"
Which almost works - the subtitles are displayed correctly wrt time, but they are placed too high and to the left of center.
I suspect the subtitles are encoded at 704x576 (SD) and they aren't scaled up to 1280x720 due to the way I'm doing it?
I haven't got any SD subtitled material I can test the theory with.
How can I scale up the dvbsubs for 1280x720?
+ Reply to Thread
Results 1 to 5 of 5
-
-
and doesn't convert to srt easily, which would be required for using the mp4 container.
How can I scale up the dvbsubs for 1280x720?
[Attachment 44217 - Click to enlarge] -
Move (or scale) with BDSup2Sub.
Ideally I'd like to just use ffmpeg to conduct this, as it would be a fast one-liner deal most likely.
I found a post somewhere that -canvas_size 1280x720 would magically fix this, but I cannot make this work -
ffmpeg is limited and not well documented on subtitle area. Bellow available for subtitle options:
Code:Subtitle options: -s size set frame size (WxH or abbreviation) -sn disable subtitle -scodec codec force subtitle codec ('copy' to copy stream) -stag fourcc/tag force subtitle tag/fourcc -fix_sub_duration fix subtitles duration -canvas_size size set canvas size (WxH or abbreviation) -spre preset set the subtitle options to the indicated preset
-
Figured it out - I obviously had to provide the source resolution of the subtitles - not the desired output resolution. Makes perfect sense once I think about it.
Once I added -canvas_size 704x576 (res of subtitles) it scales perfectly in VLC, and all is good.
so working cli ended up being:
Code:ffmpeg -canvas_size 704x576 -i "Baskervilles hunde.mkv" -vcodec copy -acodec copy -c:s dvdsub "Baskervilles hunde2.mkv"
Similar Threads
-
Change in color while reencoding with ffmpeg
By Epaminaidos in forum Video ConversionReplies: 24Last Post: 30th Sep 2016, 11:09 -
(Willing to pay)ffmpeg Need help downloading live stream ffmpeg and rtmp
By grabyea in forum Video Streaming DownloadingReplies: 0Last Post: 10th Apr 2016, 16:54 -
convert pgssub to dvdsub
By jack616 in forum SubtitleReplies: 4Last Post: 17th Mar 2016, 06:42 -
How can I stream h264 files with FFmpeg over rtmp without reencoding?
By Ninelpienel in forum Video Streaming DownloadingReplies: 4Last Post: 11th Mar 2016, 12:47 -
How to cut video with ffmpeg with the same quality without reencoding
By alexander121 in forum EditingReplies: 6Last Post: 8th Dec 2014, 02:36