Re: [FFmpeg-user] Extract sound from multiple input files

2024-04-29 Thread Moritz Barsnick via ffmpeg-user
On Mon, Apr 29, 2024 at 11:48:18 +0200, Michael Koch wrote:
> Am 29.04.2024 um 11:28 schrieb turgut kalfaoğlu:
> > Hi. I have an interesting case. I need to extract sound from multiple
> > input files,  combine those video files into one, and then re-insert the
> > audio into the combined video file.
> >
> > $ ffmpeg -i resized/360_0233.MP4   -i resized/360_0234.MP4   -i
> > resized/360_0235.MP4 -vn -map 0:a   tmpsound.mp3

You explictly selected only the fist input with "-map 0:a".

> Not tested, but I think it should work with the concat filter:
>
> ffmpeg -i resized/360_0233.MP4 -i resized/360_0234.MP4 -i
> resized/360_0235.MP4 -lavfi [0][1][2]concat=n=3:v=0:a=1 -y tmpsound.mp3

I have a different interpretation of what "combine those into one" was
supposed to mean. ;-)

Turgut, can you be more precise? The three audio tracks, what shall
happen with them?

* Attach audio one after the other on the timeline (i.e. concatenate).
* Insert all three audio tracks as separate parallel tracks into the
  resulting video.
* Overlay all three audio tracks, so that you hear their sound
  simultaneously in the final track.

Michael's solution is for problem no. 1.

Cheers,
Moritz
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Extract sound from multiple input files

2024-04-29 Thread Michael Koch

Am 29.04.2024 um 11:28 schrieb turgut kalfaoğlu:
Hi. I have an interesting case. I need to extract sound from multiple 
input files,  combine those video files into one, and then re-insert 
the audio into the combined video file.


Unfortunately I need to do them in this order. Extract sounds, then 
combine the input videos, then add sound back to the resulting video.


Can someone help me the first step?

I tried this:

$ ffmpeg -i resized/360_0233.MP4   -i resized/360_0234.MP4   -i 
resized/360_0235.MP4 -vn -map 0:a   tmpsound.mp3




Not tested, but I think it should work with the concat filter:

ffmpeg -i resized/360_0233.MP4 -i resized/360_0234.MP4 -i 
resized/360_0235.MP4 -lavfi [0][1][2]concat=n=3:v=0:a=1 -y tmpsound.mp3


Michael

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".