I dont know enough and would love someone's expertise to help me understand why my encoding works, when I don't think it should.
I have a mkv with several hdmv_pgs_subtitle streams. I am using the following command to encode to mp4:
ffmpeg -canvas_size 1920x1080 -i 'video.mkv' -vcodec libx265 -crf 20 -map 0:v:0 -map 0:a:0? -map 0:a:1? -map 0:a:2? -map 0:a:3? -map 0:0? -map 0
:1? -map 0
:2? -map 0
:3? -c
dvdsub -metadata
:0 language=ita -metadata
:1 language=eng -metadata
:2 language=deu -metadata
:3 language=fra 'out.mp4'
So I have read that hdmv_pgs_subtitle are bitmap images that are not supported in mp4. So why does this work? Does the dvdsub encoder convert them?
One more question/observation. I started looking into this because the subtitles were not syncronised with both the audio and video whem playing back with VLC. I spent hours trying to find out why and fix it. I then descovered it was fine when playing back through my Kodi tv setup.
Any comments, ponters would be very welcome. Forgive me if these are simple quesstions, I am quite a newbie.
thanks Malcolm
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays!
+ Reply to Thread
Results 1 to 4 of 4
Thread
-
-
Like your Descartes misquote.
Thanks for replying. Didn't know mediainfo. So hope this is what your asked.
Malcolm
General
Unique ID : 49049446047678623268319304986942941412 (0x24E694668E617C625CA8346A23CEA8E4)
Complete name : C:\xxx\video.mkv
Format : Matroska
Format version : Version 2
File size : 31.2 GiB
Duration : 2 h 4 min
Overall bit rate mode : Variable
Overall bit rate : 35.7 Mb/s
Frame rate : 29.970 FPS
Encoded date : 2023-04-28 11:47:33 UTC
Writing application : MakeMKV v1.17.3 win(x64-release)
Writing library : libmakemkv v1.17.3 (1.3.10/1.5.2) win(x64-release)
Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, Reference frames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 2 h 4 min
Bit rate mode : Variable
Bit rate : 28.0 Mb/s
Maximum bit rate : 35.0 Mb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : MBAFF
Scan type, store method : Interleaved fields
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.451
Stream size : 24.4 GiB (78%)
Writing library : x264 core 155
Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=1 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=24 / lookahead_threads=4 / sliced_threads=0 / slices=4 / nr=0 / decimate=1 / interlaced=tff / minigop=1 / stitchable=1 / constrained_intra=0 / bframes=2 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=1 / weightp=0 / keyint=30 / keyint_min=1 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=2pass / mbtree=1 / bitrate=28000 / ratetol=1.0 / qcomp=0.60 / qpmin=3 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=35000 / vbv_bufsize=30000 / nal_hrd=vbr / filler=0 / ip_ratio=1.40 / aq=1:1.00
Language : English
Default : No
Forced : No
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Original source medium : Blu-ray
Audio #1
ID : 2
ID in the original source medium : 4352 (0x1100)
Format : PCM
Format settings : Little / Signed
Codec ID : A_PCM/INT/LIT
Duration : 2 h 4 min
Bit rate mode : Constant
Bit rate : 2 304 kb/s
Channel(s) : 2 channels
Sampling rate : 48.0 kHz
Frame rate : 30.000 FPS (1600 SPF)
Bit depth : 24 bits
Stream size : 2.01 GiB (6%)
Title : Stereo
Language : Italian
Default : Yes
Forced : No
Original source medium : Blu-ray
Audio #2
ID : 3
ID in the original source medium : 4353 (0x1101)
Format : DTS XLL
Format/Info : Digital Theater Systems
Commercial name : DTS-HD Master Audio
Codec ID : A_DTS
Duration : 2 h 4 min
Bit rate mode : Variable
Bit rate : 3 932 kb/s
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossless
Stream size : 3.43 GiB (11%)
Title : Surround 5.1
Language : Italian
Default : No
Forced : No
Original source medium : Blu-ray
Audio #3
ID : 4
ID in the original source medium : 4353 (0x1101)
Format : DTS
Format/Info : Digital Theater Systems
Codec ID : A_DTS
Duration : 2 h 4 min
Bit rate mode : Constant
Bit rate : 1 509 kb/s
Channel(s) : 6 channels
Channel layout : C L R Ls Rs LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 24 bits
Compression mode : Lossy
Stream size : 1.32 GiB (4%)
Title : Surround 5.1
Language : Italian
Default : No
Forced : No
Original source medium : Blu-ray
Text #1
ID : 5
ID in the original source medium : 4608 (0x1200)
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 1 h 57 min
Bit rate : 17.5 kb/s
Frame rate : 0.226 FPS
Count of elements : 1588
Stream size : 14.7 MiB (0%)
Language : Italian
Default : No
Forced : No
Original source medium : Blu-ray
Text #2
ID : 7
ID in the original source medium : 4609 (0x1201)
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 1 h 57 min
Bit rate : 18.6 kb/s
Frame rate : 0.226 FPS
Count of elements : 1588
Stream size : 15.6 MiB (0%)
Language : English
Default : No
Forced : No
Original source medium : Blu-ray
Text #3
ID : 9
ID in the original source medium : 4610 (0x1202)
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 1 h 57 min
Bit rate : 20.2 kb/s
Frame rate : 0.226 FPS
Count of elements : 1588
Stream size : 16.9 MiB (0%)
Language : German
Default : No
Forced : No
Original source medium : Blu-ray
Text #4
ID : 11
ID in the original source medium : 4611 (0x1203)
Format : PGS
Codec ID : S_HDMV/PGS
Codec ID/Info : Picture based subtitle format used on BDs/HD-DVDs
Duration : 1 h 57 min
Bit rate : 17.7 kb/s
Frame rate : 0.232 FPS
Count of elements : 1636
Stream size : 14.9 MiB (0%)
Language : French
Default : No
Forced : No
Original source medium : Blu-ray
Menu
00:00:00.000 : en:Chapter 01
00:01:11.471 : en:Chapter 02
00:03:04.817 : en:Chapter 03
00:06:26.753 : en:Chapter 04
00:10:37.470 : en:Chapter 05
00:11:45.471 : en:Chapter 06
00:14:31.003 : en:Chapter 07
00:24:33.271 : en:Chapter 08
00:27:58.910 : en:Chapter 09
00:29:32.003 : en:Chapter 10
00:33:52.764 : en:Chapter 11
00:41:40.197 : en:Chapter 12
00:46:54.978 : en:Chapter 13
00:51:37.627 : en:Chapter 14
00:55:39.836 : en:Chapter 15
00:58:58.301 : en:Chapter 16
01:03:29.205 : en:Chapter 17
01:07:21.537 : en:Chapter 18
01:08:56.265 : en:Chapter 19
01:11:47.503 : en:Chapter 20
01:16:39.861 : en:Chapter 21
01:20:22.984 : en:Chapter 22
01:23:39.981 : en:Chapter 23
01:31:26.814 : en:Chapter 24
01:36:30.818 : en:Chapter 25
01:40:40.234 : en:Chapter 26
01:44:13.680 : en:Chapter 27
01:46:44.865 : en:Chapter 28
01:48:24.931 : en:Chapter 29
01:54:21.187 : en:Chapter 30
01:58:01.874 : en:Chapter 31
01:59:26.459 : en:Chapter 32 -
Thought it would be useful to show you the encoded file details. The pgs subtitles have been converted to VobSub. Which is great. My question is: is that to be expected - I was told you can't convert pgs without optical readers.
General
Complete name : C:\Users\malco\Videos\Tosca\Tosca.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/mp41)
File size : 3.37 GiB
Duration : 2 h 4 min
Overall bit rate : 3 859 kb/s
Frame rate : 29.970 FPS
Writing application : Lavf58.77.100
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L4@Main
Codec ID : hev1
Codec ID/Info : High Efficiency Video Coding
Duration : 2 h 4 min
Bit rate : 2 896 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 29.970 (30000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan type, store method : Interleaved fields
Scan order : Top Field First
Bits/(Pixel*Frame) : 0.047
Stream size : 2.53 GiB (75%)
Writing library : x265 3.5+8-57e817329:[Windows][GCC 10.2.0][64 bit] 8bit+10bit+12bit
Encoding settings : cpuid=1111039 / frame-threads=4 / numa-pools=20 / wpp / no-pmode / no-pme / no-psnr / no-ssim / log-level=2 / input-csp=1 / input-res=1920x1080 / interlace=0 / total-frames=0 / level-idc=0 / high-tier=1 / uhd-bd=0 / ref=3 / no-allow-non-conformance / no-repeat-headers / annexb / no-aud / no-hrd / info / hash=0 / no-temporal-layers / open-gop / min-keyint=25 / keyint=250 / gop-lookahead=0 / bframes=4 / b-adapt=2 / b-pyramid / bframe-bias=0 / rc-lookahead=20 / lookahead-slices=6 / scenecut=40 / hist-scenecut=0 / radl=0 / no-splice / no-intra-refresh / ctu=64 / min-cu-size=8 / no-rect / no-amp / max-tu-size=32 / tu-inter-depth=1 / tu-intra-depth=1 / limit-tu=0 / rdoq-level=0 / dynamic-rd=0.00 / no-ssim-rd / signhide / no-tskip / nr-intra=0 / nr-inter=0 / no-constrained-intra / strong-intra-smoothing / max-merge=3 / limit-refs=1 / no-limit-modes / me=1 / subme=2 / merange=57 / temporal-mvp / no-frame-dup / no-hme / weightp / no-weightb / no-analyze-src-pics / deblock=0:0 / sao / no-sao-non-deblock / rd=3 / selective-sao=4 / early-skip / rskip / no-fast-intra / no-tskip-fast / no-cu-lossless / b-intra / no-splitrd-skip / rdpenalty=0 / psy-rd=2.00 / psy-rdoq=0.00 / no-rd-refine / no-lossless / cbqpoffs=0 / crqpoffs=0 / rc=crf / crf=21.0 / qcomp=0.60 / qpstep=4 / stats-write=0 / stats-read=0 / ipratio=1.40 / pbratio=1.30 / aq-mode=2 / aq-strength=1.00 / cutree / zone-count=0 / no-strict-cbr / qg-size=32 / no-rc-grain / qpmax=69 / qpmin=0 / no-const-vbv / sar=1 / overscan=0 / videoformat=5 / range=0 / colorprim=1 / transfer=1 / colormatrix=1 / chromaloc=0 / display-window=0 / cll=0,0 / min-luma=0 / max-luma=255 / log2-max-poc-lsb=8 / vui-timing-info / vui-hrd-info / slices=1 / no-opt-qp-pps / no-opt-ref-list-length-pps / no-multi-pass-opt-rps / scenecut-bias=0.05 / hist-threshold=0.03 / no-opt-cu-delta-qp / no-aq-motion / no-hdr10 / no-hdr10-opt / no-dhdr10-opt / no-idr-recovery-sei / analysis-reuse-level=0 / analysis-save-reuse-level=0 / analysis-load-reuse-level=0 / scale-factor=0 / refine-intra=0 / refine-inter=0 / refine-mv=1 / refine-ctu-distortion=0 / no-limit-sao / ctu-info=0 / no-lowpass-dct / refine-analysis-type=0 / copy-pic=1 / max-ausize-factor=1.0 / no-dynamic-refine / no-single-sei / no-hevc-aq / no-svt / no-field / qp-adaptation-range=1.00 / scenecut-aware-qp=0conformance-window-offsets / right=0 / bottom=0 / decoder-max-rate=0 / no-vbv-live-multi-pass
Language : English
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Menus : 9
Codec configuration box : hvcC
Audio #1
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 2 h 4 min
Source duration : 2 h 4 min
Source_Duration_LastFrame : -19 ms
Bit rate mode : Constant
Bit rate : 129 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 115 MiB (3%)
Source stream size : 115 MiB (3%)
Title : Stereo
Language : Italian
Default : Yes
Alternate group : 1
Menus : 9
mdhd_Duration : 7499160
Audio #2
ID : 3
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 2 h 4 min
Source duration : 2 h 4 min
Bit rate mode : Constant
Bit rate : 395 kb/s
Channel(s) : 6 channels
Channel layout : L R C Cb Lb Rb
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 353 MiB (10%)
Source stream size : 353 MiB (10%)
Title : Surround 5.1
Language : Italian
Default : No
Alternate group : 1
Menus : 9
mdhd_Duration : 7499166
Audio #3
ID : 4
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 2 h 4 min
Source duration : 2 h 4 min
Bit rate mode : Constant
Bit rate : 395 kb/s
Channel(s) : 6 channels
Channel layout : L R C Cb Lb Rb
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 353 MiB (10%)
Source stream size : 353 MiB (10%)
Title : Surround 5.1
Language : Italian
Default : No
Alternate group : 1
Menus : 9
mdhd_Duration : 7499166
Text #1
ID : 5
Format : VobSub
Codec ID : mp4s-E0
Codec ID/Info : The same subtitle format used on DVDs
Duration : 1 h 59 min
Source duration : 1 h 57 min
Bit rate mode : Constant
Bit rate : 7 009 b/s
Frame rate : 0.111 FPS
Stream size : 5.88 MiB (0%)
Source stream size : 5.88 MiB (0%)
Language : Italian
Default : Yes
Forced : No
Alternate group : 3
Menus : 9
mdhd_Duration : 7141768
Text #2
ID : 6
Format : VobSub
Codec ID : mp4s-E0
Codec ID/Info : The same subtitle format used on DVDs
Duration : 1 h 59 min
Source duration : 1 h 57 min
Bit rate mode : Constant
Bit rate : 7 508 b/s
Frame rate : 0.111 FPS
Stream size : 6.30 MiB (0%)
Source stream size : 6.30 MiB (0%)
Language : English
Default : No
Forced : No
Alternate group : 3
Menus : 9
mdhd_Duration : 7141768
Text #3
ID : 7
Format : VobSub
Codec ID : mp4s-E0
Codec ID/Info : The same subtitle format used on DVDs
Duration : 1 h 59 min
Source duration : 1 h 57 min
Bit rate mode : Constant
Bit rate : 8 166 b/s
Frame rate : 0.111 FPS
Stream size : 6.85 MiB (0%)
Source stream size : 6.85 MiB (0%)
Language : German
Default : No
Forced : No
Alternate group : 3
Menus : 9
mdhd_Duration : 7141768
Text #4
ID : 8
Format : VobSub
Codec ID : mp4s-E0
Codec ID/Info : The same subtitle format used on DVDs
Duration : 1 h 59 min
Source duration : 1 h 57 min
Bit rate mode : Constant
Bit rate : 7 104 b/s
Frame rate : 0.114 FPS
Stream size : 5.96 MiB (0%)
Source stream size : 5.96 MiB (0%)
Language : French
Default : No
Forced : No
Alternate group : 3
Menus : 9
mdhd_Duration : 7144771
Menu #1
ID : 9
Format : Timed Text
Codec ID : text
Duration : 2 h 4 min
Language : English
Bit rate mode : CBR
Menu For : 1,2,3,4,5,6,7,8
00:00:00.000 : Chapter 01
00:01:11.471 : Chapter 02
00:03:04.818 : Chapter 03
00:06:26.753 : Chapter 04
00:10:37.470 : Chapter 05
00:11:45.471 : Chapter 06
00:14:31.003 : Chapter 07
00:24:33.272 : Chapter 08
00:27:58.911 : Chapter 09
00:29:32.004 : Chapter 10
00:33:52.764 : Chapter 11
00:41:40.198 : Chapter 12
00:46:54.979 : Chapter 13
00:51:37.628 : Chapter 14
00:55:39.837 : Chapter 15
00:58:58.301 : Chapter 16
01:03:29.205 : Chapter 17
01:07:21.538 : Chapter 18
01:08:56.265 : Chapter 19
01:11:47.503 : Chapter 20
01:16:39.862 : Chapter 21
01:20:22.985 : Chapter 22
01:23:39.982 : Chapter 23
01:31:26.815 : Chapter 24
01:36:30.818 : Chapter 25
01:40:40.234 : Chapter 26
01:44:13.681 : Chapter 27
01:46:44.865 : Chapter 28
01:48:24.932 : Chapter 29
01:54:21.188 : Chapter 30
01:58:01.875 : Chapter 31
01:59:26.459 : Chapter 32
Bit rate mode : Constant
Similar Threads
-
Demux .mp4 (video+audio) to 2 separate files (video.mp4) + (audio.mp4)
By kalemvar1 in forum Video ConversionReplies: 3Last Post: 15th Dec 2021, 07:05 -
ffmpeg losing subtitle track converting MP4 to MP4
By the_steve_randolph in forum Newbie / General discussionsReplies: 9Last Post: 31st May 2021, 16:42 -
Rewrap MTS to MP4 w/o re-encoding. Why is MP4 smaller? GUI batch tool?
By Razz in forum Video ConversionReplies: 7Last Post: 13th Mar 2021, 16:24 -
FFMPEG Conversion from MKV to MP4 returns a empty MP4 file?
By lolmaisine in forum Video ConversionReplies: 4Last Post: 6th Mar 2019, 07:45 -
Split mp4 file into specified size (part1.mp4, part2.mp4 etc.)
By TubeBar in forum EditingReplies: 7Last Post: 1st Feb 2019, 22:41