TheMetalCenter / m4b-mp3-chapters-from-cuesheets

merge audiobooks or podcasts without re-encoding (remuxing only) to single m4b with quicktime/nero chapters or mp3 with id3v2 chapters using cuesheets; also allows for renaming/editing chapters
25 stars 0 forks source link

same script for aac files? #13

Closed thedkm closed 2 years ago

thedkm commented 2 years ago

can u make same script for aac files?

TheMetalCenter commented 2 years ago

Hmm, I've never worked with aac files. However, aac is often the audio codec used in a mp4/m4a/m4b file. I don't know if aac files supports any chapter tags by itself, but I would guess that it would be easy to wrap the aac file into a m4b container without re-encoding the file (i.e. without quality loss.).

Something like "ffmpeg -i input.aac -c copy output.mp4" would probably work. Then continue using these scripts for an mp4 like normal.

thedkm commented 2 years ago

yeah exactly aac is the audio codec in m4b, and merging all aac files into single M4b without quality loss thats what I need . Please try If u can make aac to m4b merging script , thanks.

TheMetalCenter commented 2 years ago

Gotcha, I can look into it. I think it will be straightforward but will have to test it out.

thedkm commented 2 years ago

sure, Please try these aac files https://bashupload.com/IppBz/Main.rar

TheMetalCenter commented 2 years ago

Your link says 404 no file; I think I found some to test with though

TheMetalCenter commented 2 years ago

added "aac_merge-files.bat" to optional scripts folder. Tested it and it seems to work. Essentially you just follow scenario 1 or scenario 4 instructions, except use "aac_merge-files.bat" instead of "m4b_merge-files.bat".

thedkm commented 2 years ago

ohh wow much thanks will test it out.

thedkm commented 2 years ago

Press [q] to stop, [?] for help filelist.txt: I/O error:00:00.00 bitrate=N/A speed= 0x

it gives me erros like this , did u try with files I have sent u??https://bashupload.com/SnE7N/Main.rar

TheMetalCenter commented 2 years ago

No, the first link was broken. I just tried with the ones in the second link, and yeah something is up with these files. It is unrelated to the script, if I use ffmpeg on the first aac file it gives an I/O error. The second does not give an error. The 3rd, 4th, and 5th, do. The 6th does not. I think the files may be corrupted, I/O means a read/write error.

TheMetalCenter commented 2 years ago

Strangely using ffmpeg on the individual files still spits out the wrapped mp4 despite the error message. So you could use ffmpeg on each file then merge them with m4b_merge-files.bat after changing mp4 extension to m4b. Annoying workaround if you have multiple books you need to do this on, but not too bad for a one time fix.

thedkm commented 2 years ago

well these files are from Scribd n it gave files in like thousands 😆 , so like processing file one by one is not possible , thats why I wanted a merging script so I can merge these thousands of file into single M4b anyway thanks for all the work.

TheMetalCenter commented 2 years ago

I added a batch script called aac2m4b in optional folder that converts all aac files in a directory to m4b, then you can merge with m4b_merge-files. It seems to have worked okay on the 11 files you uploaded. Best of luck!

thedkm commented 2 years ago

thanks for the efforts.