Den 11.02.2024 00:57, skrev Andrew Randrianasulu:
сб, 10 февр. 2024 г., 21:10 Terje J. Hanssen via Cin <cin@lists.cinelerra-gg.org>:
There are two things I want to add to my current intermediate DVD mpg video files created with ffmpeg, and/or to the DVD tree structure created with DeVeDeNG:
1. Create and add a Navigation menu in the beginning
This will be an upcoming, separate topic
2. Create and add Soft Subtitles as simple text info commentaries to the video content
This is the topic for this post.
The reason that I want Soft Subtitles as a separate text file stream related to timing, is because this should be possible to add or import to an existing video file without the need to re-encode. It should also be flexible to display on or off during playback, if I have understood this correct so far.
IIRC you can't add text-based subtitles to DVD video. Blu-ray yes, dvd no (both can use palletized reduced-color graphical subtitles) ... so at least rendering text as palletized picture and then muxing it into mpeg stream is unavoidable step,as far as I understand.
I have prepared a new video file and will try to add sub-titles to-morrow
http://www.g-raffa.eu/Cinelerra/HOWTO/subtitles.html#_how_to_create_soft_subtitles
DVD-09-1993_subtitle.srt
[mpeg @ 0x55aac13139c0] start time for stream 0 is not set in estimate_timings_from_pts
Input #0, mpeg, from 'DV09-1993.mpg':
Duration: 00:28:04.44, start: 0.540000, bitrate: 9701 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn
Side data:
cpb: bitrate max/min/avg: 9000000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:2[0xa0]: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s
Input #1, srt, from 'DVD-09-1993_subtitle.srt':
Duration: N/A, bitrate: N/A
Stream #1:0: Subtitle: subrip
[mpeg @ 0x55aac134b140] pcm_dvd in MPEG-1 system streams is not widely supported, consider using the vob or the dvd muxer to force a MPEG-2 program stream.
Output #0, mpeg, to 'DV09-1993+srt.mpg':
Metadata:
encoder : Lavf60.16.100
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], q=2-31, 25 fps, 25 tbr, 90k tbn
Side data:
cpb: bitrate max/min/avg: 9000000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s
Stream #0:2: Subtitle: subrip
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Stream #0:2 -> #0:1 (copy)
Stream #1:0 -> #0:2 (copy)
Press [q] to stop, [?] for help
[out#0/mpeg @ 0x55aac134af80] video:1644910kB audio:316303kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.561824%
size= 1972232kB time=00:28:04.44 bitrate=9591.6kbits/s speed= 378x
Input #0, mpeg, from 'DV09-1993+srt.mpg':= 0KB sq= 0B f=0/0
Duration: 00:28:04.45, start: 0.540000, bitrate: 9591 kb/s
Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x576 [SAR 16:15 DAR 4:3], 25 fps, 25 tbr, 90k tbn
Side data:
cpb: bitrate max/min/avg: 9000000/0/0 buffer size: 1835008 vbv_delay: N/A
Stream #0:1[0xa0]: Audio: pcm_dvd, 48000 Hz, stereo, s16, 1536 kb/s
[Parsed_subtitles_0 @ 0x7f7368464340] Shaper: FriBidi 0.19.6 (SIMPLE) HarfBuzz-ng 3.4.0 (COMPLEX)
[Parsed_subtitles_0 @ 0x7f7368464340] Using font provider fontconfig
[Parsed_subtitles_0 @ 0x7f7368464340] fontselect: (Arial, 400, 0) -> /usr/share/fonts/truetype/LiberationSans-Regular.ttf, 0, LiberationSans
39.75 A-V: 0.002 fd= 0 aq= 190KB vq= 1222KB sq= 0B f=0/0
2,0G DV09-1993.mpg (1)6) Why is the merged (subtitled) file (3) smaller than the initial file (1)?
1,9G DV09-1993+srt.mpg (3)
[mpeg @ 0x55aac134b140] pcm_dvd in MPEG-1 system streams is not widely supported, consider using the vob or the dvd muxer to force a MPEG-2 program stream.
But may be those DVD creation guis can do srt => dvd_sub conversion for you ?--
2.1 Preferably I want to add/import subtitles as fast and easy using GUI interactive tools like DeVeDeNG or VLC if possible?
Next thereafter could be using the more time consuming ffmpeg
https://www.baeldung.com/linux/subtitles-ffmpeg#how-to-add-soft-subtitles
2.2 So is the question if learning a special subtitle editor is necessary to create the text file easier, like one of these 5
https://www.debugpoint.com/3-great-subtitle-editors-in-linux-systems/
Tip, suggestions or experience how to do this?
Cin mailing list
Cin@lists.cinelerra-gg.org
https://lists.cinelerra-gg.org/mailman/listinfo/cin