Thanks Lintest for the credit!

I was browsing the Lintest website as part of my research on the Limitations of Raspberry Pi live streaming, and saw that they linked to my Raspberry Pi live streaming computer build page directly on their home page.

Thanks Lintest! I appreciate the link and credit!

Screen Shot 2019-08-03 at 1.15.19 PM.png

The Limitations Of Raspberry Pi Livestreaming

This post relates directly to my Raspberry Pi live stream computer build described on this page.

I had a question come in from a reader regarding the ability of the Raspberry Pi live streaming computer to handle anamorphic video. The question was whether the Raspberry Pi could compress the vertical scale of the anamorphic video. Here’s the Wikipedia page with more information on anamorphic video.

The actual question was

“Do you know if FFMPEG has the ability to stretch or scale a video image? We are shooting 1x33 anamorphic and while we can scale and adjust within OBS OK (finally) I can’t see if it’s possible in FFMPEG.”

And so I spent some time researching this question and trying out some things on my Raspberry Pi build.
And here’s what I found:

  • Yes, it is possible to use FFMPEG to scale or resize video to an arbitrary size. BUT… not when using the copy video codec. Here’s some information on using the -vf switch in FFMPEG to scale video. When using the copy video codec FFMPEG cannot apply any filters. Filters in FFMPEG only work on uncompressed video and the copy codec simply is taking the compressed video stream (or file) and passing it along to the output format.

  • There is a raspivid command for changing the output size of the video stream (or file).

    raspivid -o - -t 0 -md 1 -awb sun -b 5500000 -w 640 -h 480
  • The above command is taking a 1080p input (specified by the -md 1 switch and outputting a video with a size of 640x480 pixels.

  • BUT… it’s not actually scaling the video. It’s cropping it. Here’s a screen grab of the full 1080p resolution video:

This is the full resolution 1080p video.

This is the full resolution 1080p video.

This is the same scene as above but with the video size changed to 640x480.

This is the same scene as above but with the video size changed to 640x480.

  • Notice that the image in the 2nd screen grab is a cropped version of the top image. It’s not the same image scaled down.

  • Next, I tried to change the video codec in my streaming command to use h264, which would force FFMPEG to decompress the video, then apply a filter, and then recompress the video. Which, technically worked, but the Pi could only squeeze out 2 frames per second. The Raspberry Pi just isn’t powerful enough to decompress and compress video and stream it all at the same time.

So it seems that the answer is that the Raspberry Pi can capture the HDMI output from the camera at 1080p using the Lintest PiCapture HD card, and it can stream it using FFMPEG but it definitely cannot alter the video to resize or scale it.

Portable Power For Hours and Hours and Hours

One of the biggest challenges I’ve run into after having streamed at least 30 hours of content over the course of several months is dealing with the Canon’s battery pack limitations.

I’m using the official Canon BP-727 battery, which has 2685 mAh, the BM Premium and the Power2000 BP-727 clones both of which have 3000 mAh capacity. The total cost for all three was over $100.

Under most “normal” circumstances, these batteries each would provide 2.0 to 2.5 hours of power which would be fine, but when your streaming a soccer game that can last 2+ hours or a gymnastics meet that can last 2.5+ hours the battery will usually run out of juice sometime just near the end of the event, which is not ideal. And the battery performance varies quite a bit under various temperatures. Filming an outdoor soccer game in January in 30 degree celsius plus a wind, the battery may only last 1.5 hours at best.

To deal with this, I end the stream at half time of a soccer game and start up a new one after changing the camera’s battery, or in a gymnastics meet, I’ll do the same thing after the first two events. Either way I end up with two videos for each event.

Ideally, I’d like to have one video per event, even if that video is three hours long.

This whole Raspberry Pi live streaming is a pretty involved DIY project. One area that I’m not too comfortable with though is messing around with DIY power supply hacks. There are some cool things out there where you can integrate a lithium ion battery pack right into the Raspberry Pi enclosure. This concept made me wonder if there’s a way to use a USB power pack to power the Canon Vixia. The Vixia has its own propriety connector and it says that it requires a 5.3V power source. Most off-the-shelf USB power packs offer a 5.0V power source.

Well, it turns out that someone did build a USB to Canon cable. And the 5.0V USB power pack seems to work just fine in the video. I thought to myself “I could do that”. I started researching it. I’d need the male-to-female connector, a volt meter, and of course I’d need a solder iron, and cord shrink wrap. So the cost started adding up and like I said, this is an area that I’m not super comfortable with.

Before clicking the buy button to order all the DIY stuff to build my own cord, I decided to do a bit of searching on Amazon and yes indeed there’s an off-the-shelf cord for $9.99. I was 50/50 on whether it would work because of the voltage difference but I though it was worth a $10 gamble.

It arrived yesterday and I’m pleased to say it works perfectly!

Here’s a photo of the Raspberry Pi 3B and the Official 7” Touchscreen and the Lintest video capture card AND the Canon Vixia all running off one 20,000 mAh battery pack.

I estimate that I can run the whole setup for at least four hours if not more using this battery pack. That’s more than enough time.

And the best part is that high capacity USB battery packs are cheap compared to camcorder battery packs.

I feel like this $10 cord is some kind of well kept secret. Why would anyone owning a Canon Vixia ever buy a $30 to $100 camcorder battery again!

First successful Raspberry Pi live stream!


After a few months of building and trial and error the first successful livestream to YouTube happened today. Yes!

Here’s a peek at the setup.

RaspberryPiLiveStreamSetup - 1.jpg

I’m standing under a big umbrella and the Raspberry Pi is hanging from the tripod. I have my camcorder attached to the post just during halftime so I could take this photo. I am using a monopod to make it easier to control the zoom on the camera. I had to shield the computer from the rain using a high tech trash bag!

Unfortunately my son is injured and couldn’t play today, but it was great to be there to cheer the boys on anyway. Go Eastside!

Half-time in today’s game including some torrential rain. Welcome to boy’s soccer in the northwest!

Half-time in today’s game including some torrential rain. Welcome to boy’s soccer in the northwest!

Here’s a link to the YouTube video of the game.

EFC B02 White vs FWFC B02 Blue - 10/28/18 (Raspberry Pi Live-Stream)

The quality is close to that as if I’d uploaded the video file from my camcorder after the game. I may need to tweak the video setting a bit as the color is a bit hot on the reds, but it’s still a success in my book.

I’ll be posting a “how to” build the Raspberry Pi Live Streaming computer soon, complete with a parts list and step by step instructions.