Log in

View Full Version : Converting XML/TXT chapters to redbook CUEsheet


Anakunda
7th January 2017, 11:53
Hi, I'm blundering with accurate conversion of DVD format chapters

CHAPTER01=00:00:00.000
CHAPTER01NAME=
CHAPTER02=.........
CHAPTER02NAME=
...

to redbook CUE counterpart on HiRes audio track.
Failed with chap2cue which requires a 44.1/16 wavefile (ok, after some audio conversion I eventually could get the expected wave file but this comes too bothering for my purposes) and chapterEditor which can generate .xml chapters but apparently it's converter which should be able generate CUEsheet is unable to load it (I get an error message about invalid float format).
Is anybody knowing a better way for conversion than all the martyrdom with chap2cue?

tebasuna51
7th January 2017, 18:09
Not sure about your request.

Try drag & drop your chapter.txt OGM ANSI file over Chap-Cue.vbs, and check if you obtain the desired output.

Anakunda
7th January 2017, 18:24
Thx tebasuna51. On first look your script works. It spit out the following cuesheet:

FILE "51.wav" WAV
TRACK 01 AUDIO
TITLE "01"
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "02"
INDEX 02 07:03:31
TRACK 03 AUDIO
TITLE "03"
INDEX 03 17:13:46
TRACK 04 AUDIO
TITLE "04"
INDEX 04 23:13:23
TRACK 05 AUDIO
TITLE "05"
INDEX 05 33:36:44


After changing image file to .flac I open it in foobar2000 but I get only one unmatched track in the playlist.
Loading 51.flac first and embedding the CUEsheet into it leads to same result.
Any idea? fb2k is able to open and parse CUEsheets

tebasuna51
7th January 2017, 20:00
Sorry, the INDEX must be always 01.
And WAVE instead WAV.

Reload Chap-Cue and try.

This one work for me in Foobar2000

FILE "test.flac" WAVE
TRACK 01 AUDIO
TITLE "01"
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "02"
INDEX 01 07:03:31
TRACK 03 AUDIO
TITLE "03"
INDEX 01 17:13:46
...

Anakunda
7th January 2017, 20:06
I'm still out of luck, neither embedding nor opening new .cue does show individual subsongs on the image.

tebasuna51
7th January 2017, 20:18
Also with WAVE?

Anakunda
7th January 2017, 20:24
Yes even with wave. Format doesnot matter, foobar2000 can handle flac and any other codecs in cuesheets as long as it has available decoder for it.

FILE "51.wav" WAV
TRACK 01 AUDIO
TITLE "01"
INDEX 01 00:00:00
TRACK 02 AUDIO
TITLE "02"
INDEX 01 07:03:31
TRACK 03 AUDIO
TITLE "03"
INDEX 01 17:13:46
TRACK 04 AUDIO
TITLE "04"
INDEX 01 23:13:23
TRACK 05 AUDIO
TITLE "05"
INDEX 01 33:36:44
Current cuesheet

Does matter the audio file resolution?

General
Complete name : 51.flac
Format : FLAC
Format/Info : Free Lossless Audio Codec
File size : 2.83 GiB
Duration : 59 min 50 s
Overall bit rate mode: Variable
Overall bit rate : 6 765 kb/s

Audio
Format : FLAC
Format/Info : Free Lossless Audio Codec
Duration : 59 min 50 s
Bit rate mode : Variable
Bit rate : 6 765 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 96.0 kHz
Bit depth : 24 bits
Stream size : 2.83 GiB (100%)
Writing library : libFLAC 1.2.1 (UTC 2007-09-17)

tebasuna51
7th January 2017, 20:53
Yes even with wave...

FILE "51.wav" WAV
TRACK 01 AUDIO
TITLE "01"
INDEX 01 00:00:00
... Current cuesheet


I make a second edition, see previous post.

The word 'WAV' must be 'WAVE' and work for me even with flac file:

FILE "51.flac" WAVE
TRACK 01 AUDIO
TITLE "01"
INDEX 01 00:00:00
...

Anakunda
7th January 2017, 21:24
Finally CUEsheet is processed properly-thx!
Just for affirmation, are the time indexes converted accurately?

tebasuna51
7th January 2017, 22:38
The Cue Sheet time format is: mm:ss:ff
where ff is 'frame' in the range 0-74 (1/75 sec.)

Then miliseconds must be converted to ff:
[0-13 ms] -> 0 ff
[14-26 ms] -> 1 ff
...
[987-999 ms] -> 74 ff

Line 30 in Chap-Cue.vbs:
ms = int(ms * 3 / 40)

We need lose precission from 1 ms to 13 ms.

hubblec4
12th January 2017, 12:41
.....
and chapterEditor which can generate .xml chapters but apparently it's converter which should be able generate CUEsheet is unable to load it (I get an error message about invalid float format).

Hi
could you share a sample with me please?

You could try the new chapterEditor.

SeeMoreDigital
31st March 2024, 14:54
Is there a little app that can convert .cue sheet files into .ogm style chapter (text based) files, that are suitable for use with MKVToolNIX GUI?

tebasuna51
31st March 2024, 19:04
Try with that Cue-chap.vbs
Drag & drop the X.cue to obtain a X.txt (ogm)

EDIT: new version

SeeMoreDigital
31st March 2024, 22:48
Try with that Cue-chap.vbs
Drag & drop the X.cue to obtain a X.txt (ogm)
Thanks... I've just tried it with the following .cue sheet file

PERFORMER "Beatles, The"
TITLE "Abbey Road [2019]"
REM DATE 1969
REM GENRE Rock

FILE "Abbey Road.mka" WAVE

TRACK 01 AUDIO
PERFORMER "Beatles, The"
TITLE "Come Together"
INDEX 01 00:00:00
TRACK 02 AUDIO
PERFORMER "Beatles, The"
TITLE "Something"
INDEX 01 04:20:15
TRACK 03 AUDIO
PERFORMER "Beatles, The"
TITLE "Maxwell's Silver Hammer"
INDEX 01 07:22:32
TRACK 04 AUDIO
PERFORMER "Beatles, The"
TITLE "Oh! Darling"
INDEX 01 10:50:30
TRACK 05 AUDIO
PERFORMER "Beatles, The"
TITLE "Octopus's Garden"
INDEX 01 14:17:41
TRACK 06 AUDIO
PERFORMER "Beatles, The"
TITLE "I Want You (She's So Heavy)"
INDEX 01 17:08:26
TRACK 07 AUDIO
PERFORMER "Beatles, The"
TITLE "Here Comes The Sun"
INDEX 01 24:55:53
TRACK 08 AUDIO
PERFORMER "Beatles, The"
TITLE "Because"
INDEX 01 28:01:31
TRACK 09 AUDIO
PERFORMER "Beatles, The"
TITLE "You Never Give Me Your Money"
INDEX 01 30:47:02
TRACK 10 AUDIO
PERFORMER "Beatles, The"
TITLE "Sun King"
INDEX 01 34:49:52
TRACK 11 AUDIO
PERFORMER "Beatles, The"
TITLE "Mean Mr Mustard"
INDEX 01 37:16:02
TRACK 12 AUDIO
PERFORMER "Beatles, The"
TITLE "Polythene Pam"
INDEX 01 38:22:37
TRACK 13 AUDIO
PERFORMER "Beatles, The"
TITLE "She Came In Through The Bathroom Window"
INDEX 01 39:35:22
TRACK 14 AUDIO
PERFORMER "Beatles, The"
TITLE "Golden Slumbers"
INDEX 01 41:34:08
TRACK 15 AUDIO
PERFORMER "Beatles, The"
TITLE "Carry That Weight"
INDEX 01 43:05:41
TRACK 16 AUDIO
PERFORMER "Beatles, The"
TITLE "The End"
INDEX 01 44:41:74
TRACK 17 AUDIO
PERFORMER "Beatles, The"
TITLE "Her Majesty"
INDEX 01 47:03:67

However, I get the following error with Windows 11: -

https://i.ibb.co/LrLHJrB/Error.jpg (https://ibb.co/zFyD7FC)

Cheers

tebasuna51
1st April 2024, 09:54
Try with the new version, I make the first using a very simple .cue file

SeeMoreDigital
1st April 2024, 10:35
Try with the new version, I make the first using a very simple .cue file
Success. Bloody brilliant. Fantastic... You're a star :D

This is going to make MKA audio muxing a lot easier. Do you think Mosu would be interested in incorporating something like this into MKVToolNIX GUI?

tebasuna51
2nd April 2024, 11:30
Do you think Mosu would be interested in incorporating something like this into MKVToolNIX GUI?

I don't know, maybe can add .cue files for chapter file input.
Now support .txt (ogm), .xml and .ifo
The code is very simple like can see in the cue-chap.vbs.

hubblec4
8th April 2024, 15:20
chapterEditor has a lot of more conversion option on board.