<div dir="ltr">LeRoy,<br>If you have timestamps, I would try these commands and see if they work for you:<br><br>Begin at 0, with a duration of 1214 seconds:<br><font face="monospace">ffmpeg -i audiobook.m4a -t 1214 -c copy chapter1.mp3</font><br><br>Begin at 20 minutes and 14 seconds, with a duration of 1214 seconds:<br><font face="monospace">ffmpeg -ss 00:20:14 -i audiobook.m4a -to 1214 -c copy chapter2.mp3</font><br><br><a href="https://trac.ffmpeg.org/wiki/Seeking">https://trac.ffmpeg.org/wiki/Seeking</a> for more details<br><br>Holly<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 30, 2022 at 10:06 AM LeRoy Diener <<a href="mailto:leroy@choosetherightside.com" target="_blank">leroy@choosetherightside.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>To Wayne and all:</div><div><br></div><div>The .m4b file is not corrupted. The 11hr file plays flawlessly in VLC and SMplayer. The first 1hr loads correctly in Audacity, but only as the truncated portion of the larger file. I found that others had a similar experience, as at <a>https://forum.audacityteam.org/viewtopic.php?t=79754</a></div><div><br></div><div>I'm guessing that the issue for Audacity is that the .m4b file includes some encoding which points to a .cue file which has the timestamps for the chapters. Here are snippets of the .cue file:</div><div>TRACK 1 AUDIO</div><div> TITLE "Chapter 01"</div><div> INDEX 01 0:0:00</div><div>TRACK 2 AUDIO</div><div> TITLE "Chapter 02"</div><div> INDEX 01 20:14:56</div><div>...</div><div>TRACK 19 AUDIO</div><div> TITLE "Chapter 19"</div><div> INDEX 01 661:19:09</div><div><br></div><div>My end objective is to break the 11hr file into smaller files, ideally the chapters of the audiobook.</div><div>I'm not sure what is the best workflow for this. Here's one idea. If I can convert the .m4b file to a .mp3 file, then I can edit it in Audacity. It might be even easier if I can use ffmpeg to split the file into chapters.</div><div>I would be happy to have the chapter files in .m4b format (unconverted). I just want to end up with files that are not so long.</div><div><br></div><div>Wayne, thanks for your ideas. I have not yet tried using the nitrag script. I'm not sure how to do that, and I'm being cautious, asking for guidance.</div><div><br></div><div>I'm still unsure about how to proceed.</div><div>LeRoy</div><div><span><pre>-- <br></pre><span style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none;float:none;display:inline">There is something glorious birthing within all of us.</span><br style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><span style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;background-color:rgb(255,255,255);display:inline">I am the Love of God, no matter what.</span><div><span style="background-color:rgb(255,255,255)">BSA<br style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline">LeRoy Diener</span></span><br style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><span style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none;float:none;display:inline">213-LEROYIZ</span><br style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><span style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none;float:none;display:inline">213-537-6949</span><div style="color:rgb(46,52,54);font-family:Cantarell;font-size:18.6667px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration:none"><a title="Click to open https://leroydiener.com/">https://leroydiener.com</a><br></div></div></span></div><div><br></div><div>On Tue, 2022-11-29 at 15:32 -0800, Wayne wrote:</div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div><br></div><div>If it can't be opened correctly by Audacity, is it possible the file is corrupted somehow?<br></div><div><br></div><div>Do you really want the results in separate chapters, or is a single non-chaptered file okay? ffmpeg would be a very simple command-line if you wish to write to a single file. If you need to separate by chapters, did you try using the nitrag script?<br></div><div><br></div><div>BTW, most video/audio editors use ffmpeg or one of it's components as it's engine. It is extremely powerful.<br></div><div><br></div><div>Wayne<br></div><div><br></div><div><br></div><div>On 11/26/22 1:16 PM, LeRoy Diener wrote:<br></div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div>Hi NMGLUG folks,<br></div><div><br></div><div>I would like to convert an audiobook .m4b file (probably with chapters in metadata) to .mp3 files split into chapters.<br></div><div>I'm trying to learn how to convert files.<br></div><div>I looked at <a>https://ffmpeg.org/ffmpeg.html</a> but it gets overwhelming.<br></div><div><br></div><div>I'm not sure what the best approach will be.<br></div><div>I also found <a>https://github.com/sandreas/m4b-tool</a> where the author references <a>https://github.com/sandreas/tone</a><br></div><div>Additionally, I found this script from nitrag <a>https://gist.github.com/nitrag/a188b8969a539ce0f7a64deb56c00277</a><br></div><div>Other options appear in <a>https://www.videoproc.com/media-converter/m4b-to-mp3.htm</a><br></div><div>Indeed, my first idea was to import the .m4b file into Audacity to do the conversion. Unfortunately, it doesn't import correctly into Audacity.<br></div><div>I'm able to play .m4b file in VLC and SMplayer. It seems like it's possible to use VLC to do the conversion with some help from ffmpeg, though maybe not a great option.<br></div><div><br></div><div>Any thoughts?<br></div><div><br></div><div>Thanks,<br></div><div>LeRoy<br></div><div><br></div><div>-- <br></div><div><br></div><div>There is something glorious birthing within all of us.<br></div><div>I am the Love of God, no matter what.<br></div><div>BSA<br></div><div>LeRoy Diener<br></div><div>213-LEROYIZ<br></div><div>213-537-6949<br></div><div><a>https://leroydiener.com</a> <<a>https://leroydiener.com/</a>><br></div><div><br></div><div>_______________________________________________<br></div><div>nmglug mailing list<br></div><div><a>nmglug@lists.nmglug.org</a><br></div><div><a>http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org</a><br></div><div><br></div></blockquote><div>_______________________________________________<br></div><div>nmglug mailing list<br></div><div><a>nmglug@lists.nmglug.org</a><br></div><div><a>http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org</a><br></div></blockquote></div>
_______________________________________________<br>
nmglug mailing list<br>
<a>nmglug@lists.nmglug.org</a><br>
<a rel="noreferrer">http://lists.nmglug.org/listinfo.cgi/nmglug-nmglug.org</a><br>
</blockquote></div>
</div>