VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member
    Join Date
    Dec 2017
    Location
    Denmarm
    Search PM
    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 -c dvdsub "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?
    Quote Quote  
  2. and doesn't convert to srt easily, which would be required for using the mp4 container.
    No. MP4 uses ttxt and vobsub. https://en.wikipedia.org/wiki/Comparison_of_video_container_formats

    How can I scale up the dvbsubs for 1280x720?
    Move (or scale) with BDSup2Sub.

    Image
    [Attachment 44217 - Click to enlarge]
    Quote Quote  
  3. Member
    Join Date
    Dec 2017
    Location
    Denmarm
    Search PM
    Move (or scale) with BDSup2Sub.
    Uhm right, so I can get that running, but then I need to provide a file extended by either idx, sup, ifo, xml or sub.
    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
    Quote Quote  
  4. 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
    I would check frame size and canvas size - please provide feedback if you find some solution.
    Quote Quote  
  5. Member
    Join Date
    Dec 2017
    Location
    Denmarm
    Search PM
    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"
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!