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..
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.