Alright, I have gotten an index from my file names:
CHAPTER000=00:08:20.940
CHAPTER000NAME=Introduction
CHAPTER001=01:23:43.906
CHAPTER001NAME=The Unauthorized Peacemaker
CHAPTER002=00:58:55.938
CHAPTER002NAME=Speech Becomes Sedition
CHAPTER003=01:08:08.686
CHAPTER003NAME=The Federalists\' Last Stand
CHAPTER004=01:06:06.698
CHAPTER004NAME=The Rogue Diplomat
CHAPTER005=02:01:01.507
CHAPTER005NAME=The Gray-Eyed Man of Destiny
CHAPTER006=01:11:36.572
CHAPTER006NAME=Striking the Copperhead
CHAPTER007=00:59:42.677
CHAPTER007NAME=The Will of the People Undone
CHAPTER008=01:10:43.898
CHAPTER008NAME=American Bolshevik
CHAPTER009=01:01:19.956
CHAPTER009NAME=The Press Goes to War
Which isn't right, but since it's not working yet, I don't see how starting 8 1/3 minutes in going to break anything, however I just zeroed that out and reran it so that CHAPTER000=00:00:00.000 and thus CHAPTER001 will start 8 1/3 minutes late, but since I can't get VLC to see the chapter markers mediainfo does, this looks moot.
$ mi If\ This\ Be\ Treason\ --\ Audiobook.opus
General
Complete name : If This Be Treason -- Audiobook.opus
Format : Ogg
File size : 74.5 MiB
Duration : 11 h 9 min
Overall bit rate : 15.5 kb/s
Writing application : Lavc60.6.101 libopus
Audio
ID : 415454770 (0x18C35632)
Format : Opus
Duration : 11 h 9 min
Channel(s) : 1 channel
Channel layout : C
Sampling rate : 24.0 kHz
Compression mode : Lossy
Writing library : Lavf60.18.100
Menu
00:00:00.000 : Introduction
01:23:43.906 : The Unauthorized Peacemaker
00:58:55.938 : Speech Becomes Sedition
01:08:08.686 : The Federalists\' Last Stand
01:06:06.698 : The Rogue Diplomat
02:01:01.507 : The Gray-Eyed Man of Destiny
01:11:36.572 : Striking the Copperhead
00:59:42.677 : The Will of the People Undone
01:10:43.898 : American Bolshevik
01:01:19.956 : The Press Goes to War
[NB: The quoted Federalists\' in the code above was done on the HA forum, not in bash.]
And that certainly looks like other books...even opus books converted from m4b.
FWIW: here's the code I used to generate the above. If I run into a chapter longer than 09:59:59.99, then I'll split out the hours and do them separately, but for now this suffices—except for the fact that the times are start times and I need to sum them...
#!/bin/bash
for i in *opus
do
chno="${i#*Part }"; chno="${chno%.*}"; chno="${chno%:*}"
chna="${i#* -- Part }"; chna="${chna%.opus}"; chna="${chna:4}"
d=$(ffprobe -v error -show_entries format=duration -sexagesimal -of default=nk=1:nw=1 "$i")
hms="${d%.*}"
ms="${d##*.}" ; ms1="${ms:0:3}"; ms3="${ms:3:1}"
[[ "$ms3" -gt 4 ]] && ((ms1++))
printf "CHAPTER%03d=0%s.%03d\n" "${chno#0}" "$hms" "$ms1"
printf "CHAPTER%03dNAME=%s\n" "${chno#0}" "$chna"
done
How do I make this work in e.g., VLC?