Hi all,
First post, so mercy please if this is wrong. I've spent several days scouring posts, testing, fixing, scouring again and have come up with the following that works. But I'm wondering if there's a way to streamline this or even batch it.

Short of the long story as to why we have to do this.... We have an 80 minute program we produce in world languages for many years. The DVD production had 2 tracks: one for title and other for main program. Title track can be different lengths depending on language which adding to main track during the DVD production would mess up subtitles, hence 2 tracks.

Problem: we want both the title and the chapters on the mp4 video files. Below are the steps I have found that work on mac and now I’m wondering if there is a way to streamline it. If I need to move the process to Windows, we can. With 370 languages (and growing), I’d love to be able to batch process the whole thing or hand it over to a non-techie person.

As a side note, I’ve tried some things to streamline and come up with errors. Tried to skip ffmpeg and merge in MKVToolNix adding chapters at same time and cannot figure out how to fix it (ends up with only the title file). I'm not good enough to figure out how do this all in ffmpeg.

Thanks for any help.

Current solution: 4 steps for Mac.

CONVERT DVD to MP4

Handbrake converts from DVD to MKV with chapters. Do title and main file to make 2 files.
------------------------------------------------------------
JOINS TITLE AND MAIN VIDEO FILES DELETES CHAPTERS

In Terminal

ffmpeg -f concat -safe 0 -i join.txt -c copy output.MKV

------------------------------------------------------------
ADDS CHAPTERS TO JOINED VIDEO FILE

Open MKVToolNix-24.0.0.app
In the Multiplexer tab add the output.MKV file
In the output tab at top, add the chapter.xml file under "Chapters" and "Chapter File:"

Click "Start Multiplexing" at bottom to produce FileName.mkv
------------------------------------------------------------
CONVERTS MKV TO MP4 WITH CHAPTERS
Back in Handbrake

Load FileName.mkv
Encode to MP4 using WebOptimised

Resulting file should have both chapters and titles for mp4 and work with many devices.