How to record rtmp stream with ffmpeg

How to record rtmp stream with ffmpeg

There are certain streams (not live) I wan't to save for later.

rtmpdump works:

rtmpdump --rtmp=rtmp://vod-bonanza.gss.dr.dk/bonanza/mp4:bonanza/08-03-2008/40322_720x540x1400K.mp4 --playpath=mp4:bonanza/08-03-2008/40322_720x540x1400K.mp4 --flv=test.flv

However, the output file is in flv format and extremely large compared to the quality, so I need to convert it to mp4 afterwards with ffmpeg.

No problem.

But since I know that ffmpeg can grab rtmp streams already, I have tried various forms with ffmpeg, such as:

ffmpeg -i "rtmp://vod-bonanza.gss.dr.dk/bonanza/mp4:bonanza/08-03-2008/40322_720x540x1400K.mp4" -rtmp_playpath "mp4:bonanza/08-03-2008/40322_720x540x1400K.mp4" test.mp4

But I get the following error no matter what:

Closing connection: NetStream.Play.StreamNotFound
rtmp://vod-bonanza.gss.dr.dk/bonanza/mp4:bonanza/08-03-2008/40322_720x540x1400K.mp4: Unknown error occurred

Is the ffmpeg command malformed, or can ffmpeg just not grab this stream?

相关内容