Split existing audio files to match Broadcast duration
-
Iterate over the available files and get their lengths.
-
Split any audio files that match the Broadcast's time into segments that match the length of the broadcast.
-
Use ffmpeg to do the splitting.
Maybe do it like this
-
Find all files that match, using the code that's in there already.
- But modify it so that it matches the case where there are 1 hour recordings, and the show starts at the X:30 mark, so that it will locate the audio file that started before the intended broadcast itself started.
-
Concatenate these audio files with ffmpeg and the demuxer rather than the concat function (which actually produces invalid MP3 files, with metadata in the middle).
-
Figure out where the concatenated audio files overlap the actual broadcast time.
-
Consider that the files may start before the broadcast, so the splitter algorithm needs to split from (1) the middle to the end, or (2) from the start to the middle, or (3) both.
Edited by Travis