gacopl / dvmkv2mp4

Convert any Dolby Vision/HDR10+ MKV to DV MP4 that runs on many devices
198 stars 36 forks source link

Include subtitles into the resulting mp4 file #10

Closed konstantin-kelemen closed 1 year ago

konstantin-kelemen commented 2 years ago

I don't see a reason not to include .srt files into the resulting video file. Was that a planned feature that was omitted? The offered implementation works perfectly with my LG CX and plays nicely with -l | --langs flag.

gacopl commented 2 years ago

Yes it was omitted on purpose all you need is bad subtitle or bad encoding for mp4box to shit itself. The feature was in alpha but it was removed because of that

wt., 28 cze 2022, 20:46 użytkownik Konstanin Kelemen < @.***> napisał:

I don't see a reason not to include .srt files into the resulting video file. Was that a planned feature that was omitted? The offered implementation works perfectly with my LG CX and plays nicely with -l | --langs flag.

You can view, comment on, or merge this pull request online at:

https://github.com/gacopl/dvmkv2mp4/pull/10 Commit Summary

File Changes

(1 file https://github.com/gacopl/dvmkv2mp4/pull/10/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/gacopl/dvmkv2mp4/pull/10, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMKIAJRS777WGEUBJDSADVRNCARANCNFSM52DE5DMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

konstantin-kelemen commented 2 years ago

Should this be enabled by an additional flag then?

gacopl commented 2 years ago

Yes default off and also lang set i am afk but i got ready code somewhere

wt., 28 cze 2022, 20:57 użytkownik Konstanin Kelemen < @.***> napisał:

Should this be enabled by an additional flag then?

— Reply to this email directly, view it on GitHub https://github.com/gacopl/dvmkv2mp4/pull/10#issuecomment-1169106357, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARMKICZCDZFGIC6BERW3ATVRNDH5ANCNFSM52DE5DMA . You are receiving this because you commented.Message ID: @.***>

gacopl commented 2 years ago

found it

` while read i;do stream=echo "$i" | cut -f1 -d| codec=echo "$i" | cut -f2 -d| id=echo "$i" | cut -f3 -d| lang=echo "$i" | cut -f5 -d| title=echo "$i" | cut -f6 -d| | sed 's/ /-/g'` mp4opts="-add \"$stream\":lang=$lang:name=\"$title\"" mp4string+=($mp4opts) done <<< "$(cat sub.exports | grep srt)"

while read i; do mp4opts="-add \"$i\":lang=pol:name='downloaded'" mp4string+=($mp4opts) done <<< $(ls {pl,pl-sync}.srt) while read i; do if [ "$i" != "" ]; then mp4opts="-add \"$i\":lang=eng:name='downloaded'" mp4string+=($mp4opts) fi done <<< $(ls {en,en-sync}.srt)

gacopl commented 1 year ago

the subtitle support has been added to latest master please test just add -s flag