I have a encoded video and audio stream from a device that cannot produce a compatible stream for an iOS device. The encoder will output h.264 and/or mjpeg. How can I use my pi to convert a video/audio stream in real time to another format? It would also be nice to be able to stretch and crop the stream..

  • VLC seems to be an option, but I can't figure out where to start for the configuration. Dec 29 '12 at 22:52

Answer actually depends on several factors, like

  • Acceptable frame-rate (input and output)
  • Frame-size (input and output)
  • Presence of audio (apart from video) and audio encoding format
  • What else your Pi could be doing at the time of transcoding operation

Typically, the media transcoding on an ARM11 processor, when done live, requires coprocessor support, and in case of RaspberryPi's SoC, this is done by the GPU. This thread here, shed more light on the subject.

However, stretch / crop pushes the bar up higher, and while I am not sure, but unless you directly use the GPU API's and write that logic yourself, on the ARM core, those operations might be a stretch. All said and done, again the similar set of factors will determine what is possible and what is not.

Note that heavy GPU operation would demand it's pound of RAM to be allocated, which means, for ARM core based operations you might fall short on RAM.

  • Video is 30fps, but could be slowed down to 10fps (if necessary),480i (but can be halved if necessary), AAC audio, I could dedicated this Pi to this operation. I also forgot to mention an RTSP feed is available rom the source. Dec 29 '12 at 15:19
  • At slower frame-rates (10 fps, might actually not be slow-enough, but I am not sure), and smaller frame-size you might be able to pull it off, but a lot will also depend on software, i.e. does it really make the best use of GPU ? If you've got everything working on a PC, might be good thing to try it out on RaspPi ! Sounds very much like a surveillance video gateway type of thing. People have pulled of ARM9 core (@ 450MHz) with custom ASICs + FPGA, for such things, but in those cases CPU is pretty lightly loaded.
    – bdutta74
    Dec 29 '12 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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