JackMahoney
JackMahoney

Reputation: 3433

Publish audio via RTMP to Red5 server without flash

strange problem here so I understand if it's the wrong place to post, would appreciate any help if you can give it.

I have a .swf that records a voice and uploads it to a red5 server via rtmp using Netstream.publish(). I want a way to write a command line tool or bash script for streaming multiple audio files to the same red5 server via rtmp.

I have tried ffmpeg like so, but it doesn't seem to be working ffmpeg -i #{file} -f flv #{connection_url}

My questions are:

1) what format must audio be in order to mimic flash's Netstream.publish() ? FLV? If so, I thought flv was a video format?

2) are there any existing tools you would recommend for uploading/streaming the file to the red5 server via rtmp.

3) finally, should i just write my scripts in actionscript using the netstream.publish calls? If that is the case how can I invoke the AS3 in order to batch upload files from the command line?

Thanks and sorry for the obscurity. Any help is appreciated.

Jack

Upvotes: 1

Views: 1122

Answers (1)

Paul Gregoire
Paul Gregoire

Reputation: 9793

Use a "valid" audio codec and ensure that you're ignoring video, so something like this will work:

ffmpeg -i [your file] -vn -acodec libmp3lame -f flv rtmp://[yourhost]/[yourapp]/outputstream

The following codecs will work:

  • nelly moser
  • aac
  • speex
  • pcm
  • mp3

Upvotes: 2

Related Questions