[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: working with mp3 files



On Thu, 29 Oct 2020 Nicolas George wrote:
Siard (12020-10-29):
ffmpeg -f concat -safe 0 -i <(for f in ./*.mp4; do echo "file '$PWD/$f'"; done) -c copy output.mp4

The method that I know is slightly different. I once took it from
https://medium.com/abraia/basic-video-editing-for-social-media-with-ffmpeg-commands-1e873801659
but that site has apparently been simplified now and concatenation has been
removed.
I found that it works fine for mp3's as well.

Create join.txt file that contains the exact paths of the files that you
want to join. All files should be same format (same codec). The path name
of all files should be mentioned one by one like below.
  file /home/xx/myvideos/part1.mp4
  file /home/xx/myvideos/part2.mp4
  file /home/xx/myvideos/part3.mp4
  file /home/xx/myvideos/part4.mp4
Now, join all files using command:
$ ffmpeg -f concat -i join.txt -c copy output.mp4
If you get an error something like below;
  [concat @ 0x555fed174cc0] Unsafe file name '/path/to/mp4'
  join.txt: Operation not permitted
add "-safe 0":
$ ffmpeg -f concat -safe 0 -i join.txt -c copy output.mp4

That's exactly the same method, you are just using a file instead of a
shell pipe substitution.

Also known as "Process Substitution". See the subheading, with that
name, in bash(1) under EXPANSION section.

Briefly review the effects of doing s/buster/bullseye/g on some file:

$ diff /etc/apt/sources.list <(sed 's/buster/bullseye/g' /etc/apt/sources.list)

--
Ce qui est important est rarement urgent
et ce qui est urgent est rarement important
-- Dwight David Eisenhower


Reply to: