0

I saw "https://superuser.com/questions/277642/how-to-merge-audio-and-video-file-in-ffmpeg" and for a project we need to retrieve video stream (RTMP) from a camera and an icecast audiostream and merge them into a video+audio stream. The original camera audio can be ignored. We'll have to make this available for live viewing, so it's crucial there's not too much delay.

Would ffmpeg -i https://path/to/videostream -i https://path/to/audiostream.stream -c:v copy -c:a aac output.mp4 that was suggested in the original thread work?

Thom
  • 1

1 Answers1

0

Not much info to work with but assuming both input formats are compatible with the output and suitable for your target player/device you can try stream copy (-c copy).

ffmpeg -i https://path/to/videostream -i https://path/to/audiostream.stream -map 0:v -map 1:a -c copy -f flv rtp://output

-map option is used so it knows which streams you want. Otherwise it may choose the unwanted audio from https://path/to/videostream. See FFmpeg Wiki: Map.

llogan
  • 63,280