[FFmpeg-user] Muxing Video from Cam1 with Audio from Cam2?
    Carl Zwanzig 
    cpz at tuunq.com
       
    Sat Feb 20 05:14:02 EET 2021
    
    
  
On 2/19/2021 6:23 PM, Steven Kan wrote:
> What’s the correct syntax to mux the video from new Cam1 with the audio
> from older Cam2, while completely discarding the unwanted video from
> Cam2? Preferably without transcoding anything, since I want to minimize
> CPU usage. 
It's all about the mapping (and this is answered at 
https://stackoverflow.com/questions/12938581/ffmpeg-mux-video-and-audio-from-another-video-mapping-issue/12943003)
but the command will look something like
ffmpeg -i VIDEOSOURCE -i AUDIOSOURCE -map 0.0 -map 1.1 -t 00:00:10 out.mp4
(assume that the video is stream 0 in both and audio is stream 1)
Also look up the options -shortest and -apad to see if they may apply 
(https://ffmpeg.org/documentation.html).
I'd consider whether .mkv is better output container than .mp4, which can 
become corrupt if the file isn't closed properly.
Later,
z!
    
    
More information about the ffmpeg-user
mailing list