User avatar
Posts: 191
Joined: Sat Dec 09, 2017 12:57 am
Location: United States

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Fri Jul 12, 2019 11:57 pm


Until just two weeks ago, my automated script built a state-of-the-art, GPU-accelerated software suite with the most advanced Raspberry technologies available — the Raspberry Pi 3 and the Raspbian Stretch operating system.

That all changed on June 24, 2019.

On that epic day, the Raspberry Pi Foundation simultaneously launched two fundamentally new and exciting technologies — the Raspberry Pi 4 and the Raspbian Buster operating system.

That's a lot for one day — new hardware AND new software!

As I clearly indicate in my current instructions, my automated script is specifically designed to work on the Raspberry 3 with Raspbian Stretch. And it continues to work just fine on that platform. But it will NOT work on the brand-new Raspbian Buster — on either the Raspberry 3 or the Raspberry 4.

With more than 90,000 views of my tutorial, I know that many people around the world have come to enjoy my custom-built software suite. I never expected such an enthusiastic response when I signed up on this website 19 months ago and randomly published my work — which also happened to be my very first post on this site!

Going forward, I will maintain my established practice of supporting the latest hardware. After all, this is very intense multimedia software with more than one million lines of code. So it only makes sense that I focus my one-man resources on the best technology available.

That means the next generation of my script will be designed exclusively for the Raspberry Pi 4.

I will, however, keep the existing version of my script as an archived post.

I've already built a working prototype of the software on the RPi 4. So far, for the most part, I like what I see.

But I just got my shiny new Raspberry a week ago and Buster still has some teething issues. That's to be expected with any major new generation of technology.

And as some of you may know, I have other projects going on as well — like my image-viewing solution that's pinned to the top of this room as a "sticky".

So, what happens next?

I'm going to let the dust settle for a while as the Foundation continues to refine Buster.

I will then publish an entirely new generation of my script with even more software than before.

It may be a week or it may be a month. I'll see how it goes.

Whatever the case, I'd rather do it right than do it fast!

Stay tuned my fellow nerds,


Posts: 1
Joined: Tue Jul 30, 2019 8:11 pm

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Tue Jul 30, 2019 8:29 pm

Pi 3 A+ success
Great news about the Pi4 stuff in the works! That makes this post a little backwards...anyway, I wanted to put together a compact security camera system so I went with a 3 A+. But I wanted good video processing of course.

After a bit of trial and error I successfully compiled by following the script exactly (except the A+ isn't specifically mentioned) with the following change:
1. In STEP 3, instead set GPU to 16Mb (before compilation)
2. Set swap size to 1024 (Mb)
3. Set GPU to 128Mb after compilation

So basically I just temporarily expanded the A+'s meagre memory to allow ffmpeg to compile successfully. I'm very much a newbie so this simple change took me quite a while to get to!

The image I used was 2019-04-08 (the latest Stretch version).

Posts: 2
Joined: Wed Apr 17, 2019 12:36 am

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Tue Aug 06, 2019 12:54 am

Thanks, @RPi_Mike, for the fine work and entertaining responses! I am in fear of your greatness so please go easy on me as I know my question is of no interest to you:

Can you please elaborate on @Bemused 's post ... 0#p1369012
on exactly what needs to be changed with your script for me to use libmpv?

I really have looked everywhere but I'm handicapped by my lack of Linux fundamentals (getting better though!) I now welcome you to bite my head off!

Posts: 6
Joined: Tue Aug 14, 2018 5:39 pm

Re: GIANT UPDATE: Build FFmpeg and mpv – Automatically in 54 Minutes!

Thu Aug 08, 2019 12:22 am


I'm glad to say that I got your script working on the first attempt. I found your instructions perfect. However, I am having some issues and I don't know if it is related to this setup or my lack of knowledge. I assume the latter, of course.

I am trying to stream the Pi Camera V2 and pick up the stream using VLC, on another system. I should point out that I have it streaming to Twitch, so something is working. I don't care which protocol is used, as long as it is stutter free and at the highest framerate possible.

I read somewhere that FFmpeg can not use the hardware encoders when streaming, is this true? That doesn't make sense to me.

If I use the following on the Pi:

Code: Select all

ffmpeg -re -i video.mp4 -vcodec copy -an -f rtp rtp:// > config.sdp
and in another terminal on the same Raspberry Pi, I use:

Code: Select all

ffplay config.sdp

I will see the playback, but it is on the same machine. Pointless, other than proof that the stream exists.

Moving forward, I have another program for facial tracking (on Win10), but it requires a webcam as input, so I need to convert the stream, being read on Win10 into something the system sees as a webcam. I can do this with VLC, which is then interpreted by another program and then seen by the tracking program.

Here's the problem

When I use VLC, on a Windows 10 machine, it doesn't see the stream from the Raspberry Pi, and I suspect it has to do with the sdp file, as I have no idea how it is utilized with VLC.

Any thoughts or alternative ideas are greatly appreciated.


Stick with the flock, end up a lamb chop

Return to “Graphics, sound and multimedia”