Anomunus
Posts: 3
Joined: Wed Oct 02, 2019 8:41 am

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

Wed Oct 02, 2019 5:22 pm

Hi, I'm having problems completing the mpv installation in your script. Everything else seemed to have installed fine, and I don't have a problem with checkinstall not being installed. However when I get to that line:

Code: Select all

sudo checkinstall -y --pkgname mpv --pkgversion 0.29.0 ./waf install
After checkinstall lists its summary, it goes on to give me this error:
The project was not configured: run "waf configure" first!

I have no idea what I'm doing wrong, and the .waf/configure line that is before the checkinstall line seems to have run fine. My question is whether or not there's anything I can do without having to nuke the entire Raspbian installation. (If it really comes down to that then I guess I will accept the reality of this situation.)

grrgle
Posts: 4
Joined: Mon Jul 08, 2019 10:57 pm

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

Sun Oct 06, 2019 11:19 pm

So I overcame my problems with my earlier install -- not sure what that was about but a clean install got it sorted -- BUT:

I have a file that will play on my CentOS laptop but not on my Pi; the Pi plays at least one other file perfectly, but in this case it only plays the audio:

Code: Select all

[email protected]:~ $ mpv -fs /media/pi/LIVE/\[Bunny_Hat\]Macross_21_\(3CE5C7D8\).mkv
Playing: /media/pi/LIVE/[Bunny_Hat]Macross_21_(3CE5C7D8).mkv
 (+) Video --vid=1 (*) (h264 1440x1080 23.976fps)
 (+) Audio --aid=1 --alang=jpn (*) (aac 2ch 48000Hz)
 (+) Subs  --sid=1 --slang=eng (*) (ass)
AO: [alsa] 48000Hz stereo 2ch float
Using hardware decoding (mmal).
VO: [rpi] 1440x1080 mmal
[vo/rpi] Could not create EGL surface!
[vo/rpi] EGL/GLES initialization for OSD renderer failed.
Could not initialize video chain.
Video: no video
A: 00:00:03 / 00:25:17 (0%)


Exiting... (Quit)
[email protected]:~ $ 
I am pretty sure I have followed the instructions correctly. I tried nuking it and doing it over, with the same result. Anybody have any idea what I might have gotten wrong? Or, if I followed the instructions correctly, why would the system be able to play one file and not another?

grrgle
Posts: 4
Joined: Mon Jul 08, 2019 10:57 pm

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

Mon Oct 07, 2019 1:29 pm

(Addendum: the vidware system plays at least two files: the demo included in the install, and also a different file that I had on hand. The file from which this system plays only the audio is known good, as another (CentOS) system using mpv plays both audio and video from this file, using the same USB thumb drive. I also note that the CentOS system presents a GUI from the Applications -> Sound and Video menu, and this feature is absent in my installation from the vidware system. Finally, mpv on the Pi is intermittently unresponsive to keyboard input, e.g. during play of the demo video the q command did not quit the video)

tommyfeelgod
Posts: 1
Joined: Fri Oct 18, 2019 3:27 pm

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

Fri Oct 18, 2019 3:39 pm

a easy way ro install ffmpeg under ubuntu 18.04 and buster with all codecs on raspi



mkdir -p ~/ffmpeg_sources ~/bin



sudo apt build-deb ffmpeg




sudo apt-get -y install \
autoconf \
automake \
build-essential \
cmake \
git-core \
libass-dev \
libfreetype6-dev \
libsdl2-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libxcb1-dev \
libxcb-shm0-dev \
libxcb-xfixes0-dev libvpx-dev libfdk-aac-dev libmp3lame-dev \
pkg-config \
texinfo libpulse-dev libssh-dev\
wget \
zlib1g-dev nasm yasm libx264-dev libx265-dev libnuma-dev





this bring ffmpeg in your home directory folder ffmpeg_build and bin !!!! dont remove it !!!!!!




cd ~/ffmpeg_sources && wget -O ffmpeg-snapshot.tar.bz2 https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2 && tar xjvf ffmpeg-snapshot.tar.bz2 && cd ffmpeg && PATH="$HOME/bin:$PATH" PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --pkg-config-flags="--static" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --extra-libs="-lpthread -lm" --bindir="$HOME/bin" --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree --enable-libsoxr --enable-libvpx --enable-libpulse --enable-libssh --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --enable-opengl --enable-libzvbi --enable-omx --enable-omx-rpi --enable-mmal --enable-runtime-cpudetect --enable-x86asm && PATH="$HOME/bin:$PATH" make -j4 && make install && hash -r



copy ffmpeg to user bin

cd bin


cp ff* /usr/local/bin/


be shure ffmpeg is not installd



sudo apt purge ffmpeg

gravityaddiction
Posts: 7
Joined: Sat Nov 02, 2019 6:03 am

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

Sat Nov 02, 2019 6:45 am

@RPi_Mike,

Thanks for your work on this. At the point I wrote this comment, your script still works perfect on stretch. It needs a patch (@jonny789) for buster. I also found the wget doesn't grab the glesv2.pc and egl.pc files. The repo has them named brcmglesv2.pc and brcmegl.pc. Hope this post helps someone who was once in my position!

It can't be stressed enough that you should start with a fresh full install of stretch (or buster) as RPI_Mikes original instructions state very clearly.

1. Adding brcm to the .pc filenames when wget downloaded and copied firmware files to the pkgconfig

Code: Select all

wget -q --show-progress --no-use-server-timestamps https://github.com/raspberrypi/firmware/raw/master/hardfp/opt/vc/lib/pkgconfig/brcmglesv2.pc

wget -q --show-progress --no-use-server-timestamps https://github.com/raspberrypi/firmware/raw/master/hardfp/opt/vc/lib/pkgconfig/brcmegl.pc

sudo cp brcmglesv2.pc /opt/vc/lib/pkgconfig

sudo cp brcmegl.pc /opt/vc/lib/pkgconfig


2. Added this patch (Thanks @jonny789) to be run on about line 180 in your script. i pasted this in your script after it moves the build folders and before it builds the apt dependencies.

Code: Select all

cd /home/pi/Vidware_Build/mpv

wget  https://github.com/mpv-player/mpv/files/3458510/0001-6838-Fix-rpi-compile-issues.patch.txt

patch  -p1  <  0001-6838-Fix-rpi-compile-issues.patch.txt



3. when running videos, i found a few extra options specific for the rpi

Code: Select all

mpv --video-sync=display-resample --no-osc --no-osd-bar --osd-on-seek=no --rpi-display=0 --rpi-layer=2 --rpi-background=yes --rpi-osd=no Neutron_Stars_Colliding_1080p.mp4

josk
Posts: 4
Joined: Mon Dec 23, 2019 9:46 pm

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

Mon Dec 23, 2019 10:12 pm

Sorry to bother but I just got the brand new Pi4. Is there already working script for Pi4 to get hardware accelerated video playback with mpv? If yes, then what instructions I should follow?

Gadgetguy
Posts: 128
Joined: Fri Aug 15, 2014 2:55 am

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

Tue Dec 24, 2019 8:31 am

josk wrote:
Mon Dec 23, 2019 10:12 pm
Sorry to bother but I just got the brand new Pi4. Is there already working script for Pi4 to get hardware accelerated video playback with mpv? If yes, then what instructions I should follow?
Good news! On raspbian buster with the pi 4 you no longer have to compile ffmpeg or mpv. The repository versions of ffmpeg and mpv will give you a hardware accelerated mpv that will give you a resizable moveable minimizeable windowed output The cpu usage is a little higher than with the mmal overlay output of the pi 3 but still quite manageable allowing you to multi-task while watching video. In addition you also get some basic controls with mpv exactly like you would with windows. For the most part i prefer to pair mpv with the smplayer gui which imparts addditional functionality to mpv. One of the big but not only advantage of using mpv with smplayer is that smplayer has its own built in and very speedy youtube code. Unfortunately to benefit from the youtube code aspect of smplayer you have to compile smplayer from source since youtube from time to to time changes its code, :) , personally i find that worth the effort.

josk
Posts: 4
Joined: Mon Dec 23, 2019 9:46 pm

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

Tue Dec 24, 2019 8:51 am

As an Linux veteran and mpv user since day one this is very good news that I can get those straight from the apt repository. Smplayer I will ditch as pure mpv is just perfect as it is. For youtube I will use play with mpv browser pluging.

https://chrome.google.com/webstore/deta ... bfbiigleji

cruzin
Posts: 7
Joined: Wed Nov 28, 2012 2:00 am

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

Thu Jan 02, 2020 8:55 pm

I would like to do this build, but I can not find a download site offering the stretch version. Is there any where to download it? I have upgraded to buster and I have two raspberry pi 3b+ with buster on them. I did not read through the 10 pages of posts about this giant update. Can someone help me with information about these 2 questions? if it will run on buster on a pi3b+ or is there somewhere to download the stretch os. thanks in advance.

cruzin
Posts: 7
Joined: Wed Nov 28, 2012 2:00 am

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

Thu Jan 02, 2020 9:48 pm

I found a place to download... howchoo.com I have never heard of howchoo before so I hope its safe place to be.. but still have a question that if this update can be done on a pi3b+ running latest buster.

I did skim through about the last 5 pages of this thread did not find anything about running buster on pi3b+

cruzin
Posts: 7
Joined: Wed Nov 28, 2012 2:00 am

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

Fri Jan 03, 2020 5:07 am

I like it so far. great work putting that all together and giving it away to those who don’t have the ability like myself. thanks

hydra3333
Posts: 147
Joined: Thu Jan 10, 2013 11:48 pm

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

Sat Jan 04, 2020 3:23 am

Gadgetguy wrote:
Tue Dec 24, 2019 8:31 am

Good news! On raspbian buster with the pi 4 you no longer have to compile ffmpeg or mpv.

The repository versions of ffmpeg and mpv will give you a hardware accelerated mpv that will give you a resizable moveable minimizeable windowed output

The cpu usage is a little higher than with the mmal overlay output of the pi 3 but still quite manageable allowing you to multi-task while watching video. In addition you also get some basic controls with mpv exactly like you would with windows. For the most part i prefer to pair mpv with the smplayer gui which imparts addditional functionality to mpv. One of the big but not only advantage of using mpv with smplayer is that smplayer has its own built in and very speedy youtube code. Unfortunately to benefit from the youtube code aspect of smplayer you have to compile smplayer from source since youtube from time to to time changes its code, :) , personally i find that worth the effort.
Great news !

Thank you for this, I was about to post a query about the status of a script for the Pi4 ... and now there is no need !! :D

PS, @Gadgetguy are there instructions for installing and "connecting" smplayer and mpv ?

Gadgetguy
Posts: 128
Joined: Fri Aug 15, 2014 2:55 am

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

Mon Jan 06, 2020 11:45 am

hydra3333 wrote:
Sat Jan 04, 2020 3:23 am
Gadgetguy wrote:
Tue Dec 24, 2019 8:31 am


PS, @Gadgetguy are there instructions for installing and "connecting" smplayer and mpv ?
See for a precompiled version that works:

https://packages.debian.org/bullseye/smplayer

and see :

Smplayer some updated suggestions at

https://www.raspberrypi.org/forums/view ... 8&t=261217

Hope this helps! i Have found smplayer a joy to use but the vlc updated as suggested in VLV testing is awfully good too:

https://www.raspberrypi.org/forums/view ... lc+testing

davidhq
Posts: 17
Joined: Mon May 21, 2018 4:15 pm

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

Fri Jan 10, 2020 1:43 pm

cruzin wrote:
Thu Jan 02, 2020 8:55 pm
I would like to do this build, but I can not find a download site offering the stretch version. Is there any where to download it? I have upgraded to buster and I have two raspberry pi 3b+ with buster on them. I did not read through the 10 pages of posts about this giant update. Can someone help me with information about these 2 questions? if it will run on buster on a pi3b+ or is there somewhere to download the stretch os. thanks in advance.

http://downloads.raspberrypi.org/raspbi ... 019-04-09/

roelarmas
Posts: 2
Joined: Fri Jun 14, 2019 7:58 pm

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

Fri Jan 17, 2020 12:23 am

Last mpv and ffmpeg repository versions still having issues and artifacts. Only RPI3 versions posted by RPI_Mike runs smoothly, no video tearing at all like OMXPlayer, but still missing in RPI4.

I think that if nobody brings something valuable to this post, we should support RPI_Mike or any other contributor who can help that mpv runs in RPI4 just as well as in RPI3.

davidhq
Posts: 17
Joined: Mon May 21, 2018 4:15 pm

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

Mon Jan 20, 2020 10:53 am

I tried your patch for Buster (on RPi 3 B / +) and everything *seems* fine but the player is not the same... some mp3 files have deterministic hiccups and it happens on multiple raspberries in the same way...

So please consider renaming these two files as just a hack to make it compile, underlying things changed and the player is not reliable.
gravityaddiction wrote:
Sat Nov 02, 2019 6:45 am
@RPi_Mike,

Thanks for your work on this. At the point I wrote this comment, your script still works perfect on stretch. It needs a patch (@jonny789) for buster. I also found the wget doesn't grab the glesv2.pc and egl.pc files. The repo has them named brcmglesv2.pc and brcmegl.pc. Hope this post helps someone who was once in my position!

It can't be stressed enough that you should start with a fresh full install of stretch (or buster) as RPI_Mikes original instructions state very clearly.

1. Adding brcm to the .pc filenames when wget downloaded and copied firmware files to the pkgconfig

Code: Select all

wget -q --show-progress --no-use-server-timestamps https://github.com/raspberrypi/firmware/raw/master/hardfp/opt/vc/lib/pkgconfig/brcmglesv2.pc

wget -q --show-progress --no-use-server-timestamps https://github.com/raspberrypi/firmware/raw/master/hardfp/opt/vc/lib/pkgconfig/brcmegl.pc

sudo cp brcmglesv2.pc /opt/vc/lib/pkgconfig

sudo cp brcmegl.pc /opt/vc/lib/pkgconfig


2. Added this patch (Thanks @jonny789) to be run on about line 180 in your script. i pasted this in your script after it moves the build folders and before it builds the apt dependencies.

Code: Select all

cd /home/pi/Vidware_Build/mpv

wget  https://github.com/mpv-player/mpv/files/3458510/0001-6838-Fix-rpi-compile-issues.patch.txt

patch  -p1  <  0001-6838-Fix-rpi-compile-issues.patch.txt



3. when running videos, i found a few extra options specific for the rpi

Code: Select all

mpv --video-sync=display-resample --no-osc --no-osd-bar --osd-on-seek=no --rpi-display=0 --rpi-layer=2 --rpi-background=yes --rpi-osd=no Neutron_Stars_Colliding_1080p.mp4
Last edited by davidhq on Mon Jan 20, 2020 11:03 am, edited 2 times in total.

davidhq
Posts: 17
Joined: Mon May 21, 2018 4:15 pm

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

Mon Jan 20, 2020 11:02 am

Mike,

Any timelines possibly for script upgrade?

We are really suffering here with old Raspberries with minimum RAM and the entire perfectly-compiled and working mpv setup sometimes has issues under certain real-world conditions. Once every 100 hours of playtime there is a video that doesn't play properly (some .webm for example) or the whole system fails undeterminstically because it's just too much with some other things running at that moment etc.

RaspberryPi4 with 4GB of RAM should hopefully solve all that. We just need the new script from the top scientist + engineer + lawyer on this long thread! So, any updates? Thank you!

PS: if you need some help with testing or would just be so kind to offer the script even before it is posted publicly, please contact me at [email protected] -- would be very grateful!

david
RPi_Mike wrote:
Fri Jul 12, 2019 11:57 pm
AN UPDATE FROM RPI_MIKE: RASPBERRY PI 4 AND RASPBIAN BUSTER

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,

—RPi_Mike

rgriggs
Posts: 10
Joined: Mon Aug 27, 2018 10:15 pm

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

Thu Feb 13, 2020 4:45 am

Hi Mike! My shiny new RPI4 is on the way, and to concur with davidhq I would be glad to test your new script if that would be helpful. My email is [email protected]. Thanks!

User avatar
scruss
Posts: 2891
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

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

Thu Feb 13, 2020 3:25 pm

RPi_Mike hasn't been on here for more than 5 months. He might have found something more fun to do.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

gravityaddiction
Posts: 7
Joined: Sat Nov 02, 2019 6:03 am

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

Wed Feb 19, 2020 11:49 pm

I've setup a rpi3 / rpi4 script based on rpi_mikes original scripts, now hosted on my google drive.. this script will harshly clean out any previous ~/Vidware_* folders and start fresh. The script has been truncated a bit and the big thing is doesn't create the deb packages of the compiled versions, rpi_mike was proud of these feature.. I tried to use the compiled versions on another pi and was missing some other libraries I never tracked down..

Here is a self starting command that I run from a ssh or shell prompt.

Code: Select all

wget --no-check-certificate -q 'https://docs.google.com/uc?export=download&id=11afoA1iYRFF5RCHT8_vETyIeifbn7zE2' -O - | bash
I'm happy to read any feedback, i'll check back on here once in a while to help workout any issues and update the script as needed.

gravityaddiction
Posts: 7
Joined: Sat Nov 02, 2019 6:03 am

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

Thu Feb 20, 2020 3:31 am

davidhq wrote:
Mon Jan 20, 2020 10:53 am
I tried your patch for Buster (on RPi 3 B / +) and everything *seems* fine but the player is not the same... some mp3 files have deterministic hiccups and it happens on multiple raspberries in the same way...

So please consider renaming these two files as just a hack to make it compile, underlying things changed and the player is not reliable.

Which two files? Thanks!

rgriggs
Posts: 10
Joined: Mon Aug 27, 2018 10:15 pm

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

Fri Feb 21, 2020 8:10 pm

Hi Mike, is there any possibility that you can share some tips on getting ffmpeg to work properly with the gpu on RPi 4? I am needing to read some video streams and pull screenshots, but when I try to add -c:v h264_mmal to the input stream, it apparently outputs blank frames. If I take out the -c:v directive, it uses the software decoder and spits out frames as required, but of course it uses too much CPU. I tried recompiling ffmpeg on the RPi4 with --enable-mmal option but still same result. No errors, just no output... omxplayer apparently works on the gpu, as the CPU usage for it is very low in comparison to ffmpeg with the software decoder enabled. But I can't figure out how to fix ffmpeg.

I would be very grateful if you have any tips you can share on this particular aspect of hardware gpu assisted decoding. Feel free to PM me or send me an email [email protected] if you don't want to clutter this thread with unrelated info.

Thanks for the time you spend creating this tutorial - I have used it on RPi 3's and it works great. Can't wait for the completed tutorial on RPi 4, but would be extremely grateful for tips on getting ffmpeg to work in the mean time.

Best,
Ryan

rgriggs
Posts: 10
Joined: Mon Aug 27, 2018 10:15 pm

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

Sat Feb 22, 2020 2:18 am

@gravityaddiction thanks for posting this script - it's very helpful, and very encouraging to see the RPI4 is starting to be supported.

I gave it a try and ran into the same issues with mpv compiling. However, I'm really only after acceleration for ffmpeg, so that didn't matter to me. However, I was disappointed as after running all the steps, ffmpeg with the h264_mmal codec still produces blank frames. I'm trying to take screen captures of a h.264 video stream from IP camera, and it works fine with ffmpeg without trying to use the h264_mmal decoder, but it of course uses more CPU, and in my particular application I need to keep CPU usage to a minimum.

Here's what ffmpeg says when I try to use h264_mmal as the decoder:

Code: Select all

ffmpeg -c:v h264_mmal -i "rtsp://192.168.1.87/stream0:554?username=admin&password=admin" -r 0.1 test%03d.jpg
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --prefix=/usr --enable-gpl --enable-nonfree --enable-static --enable-omx --enable-omx-rpi --enable-mmal --extra-cflags='-march=armv8-a+crc+simd -mfpu=neon-fp-armv8 -mtune=cortex-a72'
  libavutil      56. 14.100 / 56. 14.100
  libavcodec     58. 18.100 / 58. 18.100
  libavformat    58. 12.100 / 58. 12.100
  libavdevice    58.  3.100 / 58.  3.100
  libavfilter     7. 16.100 /  7. 16.100
  libswscale      5.  1.100 /  5.  1.100
  libswresample   3.  1.100 /  3.  1.100
  libpostproc    55.  1.100 / 55.  1.100
Input #0, rtsp, from 'rtsp://192.168.1.87/stream0:554?username=admin&password=admin':
  Metadata:
    title           : RTSP/RTP stream from anjvision ipcamera
  Duration: N/A, start: 0.084000, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuvj420p(pc, progressive), 1280x720, 12 tbr, 90k tbn, 180k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_mmal) -> mjpeg (native))
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A  frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A  frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A  frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A  frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A  frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A  frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A  frame=    0 fps=0.0 q=0.0 size=N/A time=-577014:32:22.77 bitrate=N/A speed=N/A  [h264_mmal @ 0x26d5850] Did not get output frame from MMAL.
Error while decoding stream #0:0: Unknown error occurred
Finishing stream 0:0 without any data written to it.
Output #0, image2, to 'test%03d.jpg':
  Metadata:
    title           : RTSP/RTP stream from anjvision ipcamera
    encoder         : Lavf58.12.100
    Stream #0:0: Video: mjpeg, yuvj420p(pc), 1280x720, q=2-31, 200 kb/s, 0.10 fps, 0.10 tbn, 0.10 tbc
    Metadata:
      encoder         : Lavc58.18.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
frame=    0 fps=0.0 q=0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed=   0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Conversion failed!

Any ideas why this is happening? omxplayer seems to actually use the hardware decoder, as its CPU usage is much less than ffplay for the same video stream. I can't figure out what I'm missing here.

Thanks for any insight!

gravityaddiction
Posts: 7
Joined: Sat Nov 02, 2019 6:03 am

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

Tue Feb 25, 2020 4:55 pm

@rgriggs - Glad it was helpful, i'm curious to what error you got in the mpv compile. I've faced a few and want to make sure I get all the required bits into the installer script. Thanks! .. For the h264_mmal issue, my first goto would be memory, how much gpu memory is allocated? full disclosure; I've only gotten my feet wet at this level of understanding the cpu cycles of video decoding. I've only seen good results using the gpu when decoding with (mmal) .. I've been wanting to experiment with IP cameras for another project, what model are you working with?

rgriggs
Posts: 10
Joined: Mon Aug 27, 2018 10:15 pm

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

Tue Feb 25, 2020 6:15 pm

@gravityaddiction Thanks for the info. I bet you're right: the GPU is not allotted enough RAM to work. I'll give that a try asap.

I think I was getting the same error as Anomunus. Not sure exactly what it was now, but since I wasn't seeking to run mpv I didn't worry about it.

As far as IP cams, I have had good results with the SV3C brand from Amazon. I'm hoping to do some transcoding from h.264 as well as HEVC, if the GPU can assist. Otherwise, it eats too much CPU when handling more than 1 or 2 cams. I have successfully run transcoding on up to 8 cameras on the RPi 3B (I think the GPU decoder is hard-limited to 9 streams), and also vRAM was a limiting factor. Was hoping the RPi4 would handle even more.

Return to “Graphics, sound and multimedia”