4 ms·
I have a pile of mp3s and want to splice them together with a single ffmpeg operation. Essentially injecting multiple small audio files into a large one using t
by bastawhiz 5y ago
I have a pile of mp3s and want to splice them together with a single ffmpeg operation. Essentially injecting multiple small audio files into a large one using time codes. I know there's got to be a way to do it, but I have yet to find a way to do it in a single operation instead of multiple passes.
- dehrmann 5y agoAre they sequential, or are you splicing at arbitrary times?
- bastawhiz 5y agoThey might be spliced in at arbitrary times but multiple audio files may be spliced in sequentially at an arbitrary time. I'm not going to be upset if there's a millisecond of gap between them or whatever by just splicing at approximate time codes to make them sequential.
- zamadatix 5y agoSome god awful combination in a complex filter using atrim to pull the pieces, adelay to set the positions in the output, and amix to put all of the output back together could probably do it. What that command may actually be is definitely open but that's probably the only way that would work as otherwise this is really 2 separate operations (chopping then merging) so there isn't going to be consideration for having it in a single premade flag. On another note if the goal is just to avoid files/writing to disk then a bunch of ffmpeg splices to named pipes as inputs to another ffmpeg command to merge them could do the same without the command soup.
- bastawhiz 5y agoI'm very fine with command soup; the plan was to generate it with a script and run it directly. The input files are in a lossy format so I'd rather avoid having intermediate WAVs or double-encoding or something like that.
- minhmeoke 5y agoffmpeg -f concat -i mylist.txt -c copy output.mp3 https://superuser.com/questions/587511/concatenate-multiple-wav-files-using-single-command-without-extra-file https://superuser.com/questions/587511/concatenate-multiple-...