Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is the command I am currently using to stream live audio under the Raspbian distro:

ffmpeg -f alsa -ac 1 -i hw:1 -ar 44100 -f flv rtmp://10.255.11.53/

The functionality I am looking for is called the "Tee" command, which I will use to record the stream as an mp3 file while it is streaming live.

Is there any hope of getting this functionality from the Raspbian repository? Or is there an different command which does the same thing?

share|improve this question
    
Should I wait for the Raspbian repository to update to the latest version of Libav (which might or might not have the "Tee" command) or reformat my RaspberryPi to run on the Arch distro which has FFmpeg in its repository? –  hinekyle Mar 15 '13 at 13:53
1  
libav pretends that FFmpeg does not exist, and therefore does not merge many features FFmpeg develops including the tee-psuedo muxer. So you'll either have to compile ffmpeg, or as you mentioned, use a (better) distro like Arch Linux ARM. –  LordNeckbeard Mar 15 '13 at 19:02
    
this was and still is very confusing because even though I am on Raspbian which only supports Libav I can still run FFmpeg commands. For a while I thought I was using FFmpeg until I did more research, ignorance is bliss! –  hinekyle Mar 15 '13 at 19:16
1  
Yes, it is an unfortunate situation has confused thousands of users and using the name "ffmpeg" is misleading. See Who can tell me the difference and relation between ffmpeg, libav, and avconv? and The FFmpeg/Libav situation for more details. –  LordNeckbeard Mar 15 '13 at 19:23
add comment

1 Answer

up vote 2 down vote accepted

Unless putting this all in a single command is absolutely vital, I would say that changing the entire OS to a less stable one for this one purpose is probably overkill. I would just use one of the alternative commands on the page you linked to in the question:

ffmpeg -f alsa -ac 1 -i hw:1 -ar 44100 -c:a libmp3lame -f mpegts - | \
ffmpeg -f mpegts -i - -c copy output.mp3 -c copy -f flv rtmp://10.255.11.53/

Even on a Raspberry Pi, I doubt that the minor extra overhead of the extra ffmpeg process will be too much - especially since -c copy takes a tiny amount of processing.

Depending on how old your ffmpeg is, you may have to use -acodec copy instead of -c copy.

Also, you can get an up-to-date static build of ffmpeg from here; I know that Raspbian is based off of Debian, so maybe the Debian repos listed there could be handy?

share|improve this answer
1  
I disagree with the statement that Arch Linux ARM is less stable. Have you used it? –  LordNeckbeard Mar 15 '13 at 19:03
1  
This solution worked for me with only a minor alteration: ffmpeg -f alsa -ac 1 -i hw:1 -ar 44100 -f \ mp3 - | ffmpeg -f mp3 -i - -acodec copy output.mp3 -acodec copy -f flv rtmp://10.255.11.53/ –  hinekyle Mar 15 '13 at 19:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.