Danny
Danny

Reputation: 183

Setting up seperate audio and video files using ffmpeg while straming rtsp to wowza

I use the following command to stream to wowza server over rtsp;

ffmpeg -re -i 1464197749623.mkv -c:v copy -c:a copy -strict experimental -f rtsp rtsp://127.0.0.1:1935/live/myStream

It works fine.

However, I have a situation where I only get the video from mkv file but not audio. I get separate audio file in mkv format. How can I specify audio and video source separately in above ffmpeg command so it can stream combiningly to wowza ?

Thanks

Upvotes: 1

Views: 1807

Answers (1)

llogan
llogan

Reputation: 133663

How can I specify audio and video source separately in above ffmpeg command so it can stream combiningly to wowza ?

Add another input and explicitly map each stream:

ffmpeg -re -i video.mkv -re -i audio.mka -map 0:v:0 -map 1:a:0 -c copy rtsp://127.0.0.1:1935/live/myStream
  • See -map documentation.
  • You can use -c copy instead of -c:v copy -c:a copy.
  • I saw no need for the -strict experimental option so I removed it.
  • The -f rtsp option is likely superfluous so I removed it.

Upvotes: 1

Related Questions