[FFmpeg-user] juxtapose utf-8 soft subtitle
Rayjahn
rayjahn at chinabestgmts.com.tw
Thu Dec 29 14:27:07 EET 2022
Dear forum moderators:
Could you please advise an alternative forum
in case that ffmpeg-user forum is not a good fit?
Thanks for guidance.
Dear community:
juxtapose utf-8 soft subtitle, 字幕併列,
4 OSS subtitle media players are evaluated.
They are built on the libavformat and libavcodec of FFmpeg project.
During the evaluation of juxtaposition of utf-8 soft subtitles,
I discovered the need of some advice for proper CUI options.
Guidance on the following is appreciated.
01. LAV Filters, CUI options to pass spatial shift instructions.
02. VLC, CUI options to auto-enable utf-8 soft subtitles.
03. MPV, good, no questions.
04. MPlayer, no questions, needed work not on user side.
This juxtaposition evaluation involved the following components.
1 soft subtitle (*.srt, utf-8 zh-tw, attached).
3 media files (2 container formats, *.mp4, *.mkv).
4 subtitle media players, OSS, based on libavformat and libavcodec.
4 test environments (1*XP Pro x32, 2*10 Pro x64, 1*11 Pro x64).
The XP Pro x32 is becoming outdated.
The LAV Filters lags behind other subtitle media players.
Results of these two are grouped toward the end of [results, ...].
The sequence of info. sections follows.
Some sections are lengthy.
[results, ...] 16 of them, lengthy.
[juxtaposition preamble]
[media files]
[juxtaposition playback]
[test systems]
Thanks in advance for guidance and advice.
Sincerely,
Ray Jahn
~~~~~ ~~~~~
[results, 11 Pro x64 + VLC]
--- test.01.mp4 (auto detect test.01.srt)
perfect,
OK for audio + video + hard subtilte + soft subtitle.
correct juxtaposition of soft subtitle.
correct font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
--- test.02.mp4
OK for audio + video + hard subtilte.
soft subtitle absent initially, but detected.
Need to manually select the soft subtitle stream in GUI during playback.
correct juxtaposition of soft subtitle.
correct font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
--- test.02.mkv
OK for audio + video + hard subtilte + soft subtitle.
correct juxtaposition of soft subtitle.
correct font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
[results, 11 Pro x64 + MPV]
--- test.01.mp4 (auto detect test.01.srt)
--- test.02.mp4
--- test.02.mkv
perfect,
OK for audio + video + hard subtilte + soft subtitle.
correct juxtaposition of soft subtitle.
correct font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
[results, 11 Pro x64 + MPlayer]
--- test.01.mp4 (auto detect test.01.srt)
--- test.02.mp4
--- test.02.mkv
OK for audio + video + hard subtilte.
correct juxtaposition of soft subtitle.
incorrect font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
[results, 10 Pro x64 lap PC + VLC]
--- test.01.mp4 (auto detect test.01.srt)
perfect.
OK for audio + video + hard subtitle + soft subtitle.
correct juxtaposition of soft subtitle.
correct font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
--- test.02.mp4
OK for audio + video + hard subtilte.
utf-8 soft subtitle absent initially, but detected.
Need to manually select the soft subtitle in GUI during playback.
correct juxtaposition.
correct font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
--- test.02.mkv
OK for audio + video + hard subtilte + soft subtitle.
correct juxtaposition.
correct font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
[results, 10 Pro x64 lap PC + MPV]
--- test.01.mp4 (auto detect test.01.srt)
--- test.02.mp4
--- test.02.mkv
perfect.
OK for audio + video + hard subtitle + soft subtitle.
correct juxtaposition of soft subtitle.
correct font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
[results, 10 Pro x64 lap PC + MPlayer]
--- test.01.mp4 (auto detect test.01.srt)
OK for audio + video + hard subtilte.
correct juxtaposition of soft subtitle.
incorrect font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
--- test.02.mp4
--- test.02.mkv
OK for audio + video + hard subtilte.
correct juxtaposition of soft subtitle.
incorrect font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
[results, 10 Pro x64 desk PC + VLC]
--- test.01.mp4 (auto detect test.01.srt)
perfect.
OK for audio + video + hard subtilte + soft subtitle.
correct juxtaposition.
correct font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
--- test.02.mp4
OK for audio + video + hard subtilte.
utf-8 soft subtitle absent initially, but detected.
Need to manually select the soft subtitle in GUI during playback.
correct juxtaposition.
correct font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
--- test.02.mkv
OK for audio + video + hard subtilte + soft subtitle.
correct juxtaposition.
correct font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
[results, 10 Pro x64 desk PC + MPV]
--- test.01.mp4 (auto detect test.01.srt)
--- test.02.mp4
--- test.02.mkv
perfect,
OK for audio + video + hard subtilte + soft subtitle.
correct juxtaposition of soft subtitle.
correct font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
[results, 10 Pro x64 desk PC + MPlayer]
--- test.01.mp4 (auto detect test.01.srt)
OK for audio + video + hard subtilte.
correct juxtaposition of soft subtitle.
incorrect font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
--- test.02.mp4
--- test.02.mkv
OK for audio + video + hard subtilte.
correct juxtaposition of soft subtitle.
Incorrect font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
[results, XP Pro x32 + VLC]
In need of command option to auto-enable utf-8 soft subtitle.
--- test.01.mp4 (auto detect test.01.srt)
OK for audio + video + hard subtilte.
soft subtitle absent initially, not detected.
Need to manually select the soft subtitle file in GUI during playback.
correct juxtaposition of soft subtitle.
correct font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
--- test.02.mp4
--- test.02.mkv
OK for audio + video + hard subtilte.
utf-8 soft subtitle absent initially, but detected.
Need to manually select the soft subtitle stream in GUI during playback.
correct juxtaposition of soft subtitle.
correct font (code page) of utf-8 soft subtitle.
temporal seek: possible skip of soft subtitle if temporal seeking jumped
into the middle of a temporal segment.
[results, XP Pro x32 + MPV]
MPV 20151029 x32 does not work on XP Pro x32.
It terminated immediately after flashing an empty screen.
[results, XP Pro x32 + MPlayer]
--- test.01.mp4 (auto detect test.01.srt)
--- test.02.mp4
--- test.02.mkv
100% black screen, audio + video + hard subtilte,
soft subtitle present,
correct juxtaposition of soft subtitle.
Incorrect font (code page) of utf-8 soft subtitle.
[results, XP Pro x32 + LAV Filters]
LAV Filters, 0.74.1.9 x32,
tinyplay active = tinyplay GUI on screen
--- test.01.mp4 (auto detect test.01.srt)
01. fresh playback (tinyplay not active) →
OK for audio + video + hard subtitle.
soft subtitle displayed,
incorrect juxtaposition (no option supplied).
incorrect font (code page) of utf-8 soft subtitle,
temporal seek: instant refresh of soft subtitle.
02. repeat playback (tinyplay active) →
OK for audio + video + hard subtitle.
soft subtitle absent.
Orange characters and black stripes flashed over the hard subtitle when each
temporal segment of soft title was entered.
--- test.02.mp4
--- test.02.mkv
OK for audio + video + hard subtitle.
soft subtitle absent, in either fresh or repeat playback.
no visual detection of objects flashing over the hard subtitle region.
[results, 10 Pro x64 desk PC + LAV Filters]
LAV Filters, 0.77.1
--- test.01.mp4 (auto detect test.01.srt)
OK for audio. No video or hard subtitle.
100% scrambled stripes, green band at bottom (hard subtitle region).
soft subtitle displayed.
incorrect juxtaposition (no option supplied).
incorrect font (code page) of utf-8 soft subtitle.
temporal seek: instant refresh of soft subtitle.
--- test.02.mp4
--- test.02.mkv
OK for audio. No video or hard subtitle.
100% blank, either black or white, pending on mouse clicks.
soft subtitle absent.
Hypothesis of hijack by other DirectShow filters.
GraphEdit displayed an empty panel upon attempt of graph connection.
The clue to filters activated by tinyplay.exe remains elusive.
[results, 10 Pro x64 lap PC + LAV Filters]
LAV Filters, 0.77.1
--- test.01.mp4 (auto detect test.01.srt)
OK for audio + video + hard subtitle.
soft subtitle absent, but detected.
Visual detection of objects flashing over the hard subtitle region.
temporal seek: instant refresh of soft subtitle.
--- test.02.mp4
OK for audio + video + hard subtitle.
soft subtitle absent.
No visual detection of objects flashing over the hard subtitle region.
temporal seek: disabled.
--- test.02.mkv
OK for audio + video + hard subtitle.
soft subtitle absent.
No visual detection of objects flashing over the hard subtitle region.
temporal seek: OK.
[results, 11 Pro x64 + LAV Filters]
LAV Filters, 0.77.1
--- test.01.mp4 (auto detect test.01.srt)
OK for audio + video + hard subtitle.
soft subtitle absent.
Visual detection of objects flashing over the hard subtitle region.
--- test.02.mp4
--- test.02.mkv
OK for audio + video + hard subtitle.
soft subtitle absent.
No visual detection of objects flashing over the hard subtitle region.
[juxtaposition preamble]
Soft subtitles can be tuned by spacial shift or temporal shift.
The juxtaposition of soft subtitle involves only the spatial shift.
Juxtaposition is not border anchoring as SSA/ASS {\an??}.
Spatial shift is not constant, and will vary with media files.
It depends on font size (soft) and position (hard) of subtitles.
A de facto convention for spatial shift does not exist.
Each player uses own coordinate system to handle the shift vector.
Therefore the CUI options of juxtaposition by players differ.
[media files]
set of separate files
b:\test.01.mp4 ← utf-8, zh-cn, from youtu.be/BDlgUPco-Q0, 1080 resolution.
b:\test.01.srt ← utf-8, zh-tw, soft subtitle, attached.
The source video stream contains hard subtitle (burned-in).
single file, created by ffmpeg commands below,
b:\test.02.mp4
b:\test.02.mkv
ffmpeg -i b:\test.01.mp4 -i b:\test.01.srt -map 0 -c copy -map 1:s -c:s
mov_text b:\test.02.mp4
ffmpeg -i b:\test.01.mp4 -i b:\test.01.srt -c copy -disposition:s +default
b:\test.02.mkv
stream status in containers, per ffprobe
test.01.mp4
stream #0:0 (und) video (default)
stream #0:1 (eng) audio (default) ← actually (chi),
stream #0:2 video png
test.01.srt
stream #0:0 subtitle, subrip
test.02.mp4
stream #0:0 (und) video (default)
stream #0:1 (eng) audio (default) ← actually (chi),
stream #0:2 (und) video png
stream #0:3 (und) subtitle mov_text (default)
test.02.mkv
stream #0:0 video (default)
stream #0:1 (eng) audio (default) ← actually (chi),
stream #0:2 subtitle subrip (default)
[juxtaposition playback]
The tinyplay.exe command lacks a CUI option of spatial shift.
I am still ignorant of how to pass spatial shift to LAV Filters.
Any guidance is appreciated.
--- playback, set of files
vlc.exe b:\test.01.mp4 --sub-margin=70
mpv.exe b:\test.01.mp4 --sub-pos=92
mplayer.exe b:\test.01.mp4 -subpos 90 -xy 800 -geometry 50%:50%
tinyplay.exe b:\test.01.mp4
--- playback, single file, *.mp4 format
vlc.exe b:\test.02.mp4 --sub-margin=70
mpv.exe b:\test.02.mp4 --sub-pos=92
mplayer.exe b:\test.02.mp4 -subpos 90 -xy 800 -geometry 50%:50%
tinyplay.exe b:\test.02.mp4
--- playback, single file, *.mkv format
vlc.exe b:\test.02.mkv --sub-margin=70
mpv.exe b:\test.02.mkv --sub-pos=92
mplayer.exe b:\test.02.mkv -subpos 90 -xy 800 -geometry 50%:50%
tinyplay.exe b:\test.02.mkv
[test systems]
4 MS Windows PCs, with configurations below.
MS Windows 11 Pro, x64 lap PC
MS Windows 10 Pro, x64 lap PC
MS Windows 10 Pro, x64 desk PC
01. player 01
LAV Filters → 0.77.1, both x32 and x64
Tiny Player → 2.8.4.3, per tinyplay_EN.txt
02. player 02, vlc → 3.0.18 x64
03. player 03, mpv → 20221211 x64
04. player 04, mplayer → 38363 x64
05. tools
ffmpeg → 5.1.2 x64, full shared
InstalledCode → 1.30
GraphStudioNext → 0.7.3.01, both x32 and x64
MS Windows XP Pro, SP3 x32
01. player 01
LAV Filters → 0.74.1.9 x32, XP last version
Tiny Player → 2.8.4.3, per tinyplay_EN.txt
02. player 02, vlc → 3.0.18 x32
03. player 03, mpv → 20151029 x32, XP last version
04. player 04, mplayer → 38363 x32
05. tools
ffmpeg → 3.1.2 x32
InstalledCode → 1.30
GraphStudioNext → 0.7.3.01, invalid win32 on XP
Softwares were unzipped into destination folders.
The MS registry remains intact.
All softwares were in default mode, no configuration or setting.
FFmpeg, VLC, MPV, MPlayer use self-contained codecs or filters.
DirectShow filters, inc. LAV Filters, were activated by tinyplay.exe.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.01.srt
Type: application/octet-stream
Size: 2535 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20221229/0a70faac/attachment.obj>
More information about the ffmpeg-user
mailing list