Hi All, recently turned my Pi 2 into a nice little media hub with the help of subsonic. Everything is pretty much working to spec, except it doesn't play.m4a files.
Some google has turned up this is likely due to the subsonic version of ffmpeg throwing up on the pi. In the linked forum the user says he put the ffmpeg form his /usr/bin directory into his subsonic transcode directory and everything worked. I ran ' ls /usr/bin grep ff' and didn't ffmpeg in there. Running 'sudo apt-get install ffmpeg' was also a dead end. Do I have to compile ffmpeg? Am I looking in the wrong places? (I'm also running Jessie Lite btw) Thanks for any help.
I'm pretty sure that ffmpeg has been deprecated for avconv most of the commands are the same if not atleast very similar. My advice would be to compile ffmpeg from scratch and use the libshine mp3 library. This library transcodes mp3s about 10 times faster on my bananapi and rpi. Don't do what I did and compile on the pi itself. It will take hours. (Mine took 7 in total including all libraries).
You should be able to cross compile, though never done this so I can't really advise. Edit: used this and used the libshine info from here:. There is also a rpi specific page but didn't look at it until I was finished, it mentions cross compiling:.
Ffmpeg (and avconv as they are essentially the same thing) uses different libraries to access different codecs. The default mp3 codec is LAME and it's excellent.
But it uses floating point instruc tions, the rpi cpu does not have a floating point unit and so it has to emulate the instructions which can make it very slow. Comparison from here:: Lame, 3m06s, 1.8x realtime: Shine, 1m35s, 3.6x realtime. If it works for you carry on, as lame is better quality anyway. But if it starts being painfully slow then be aware of shine.:).
Port 8090 # bind to all IPs aliased or not BindAddress 0.0.0.0 # max number of simultaneous clients MaxClients 10 # max bandwidth per-client (kb/s) MaxBandwidth 1000 # Suppress that if you want to launch ffserver as a daemon. NoDaemon File /tmp/feed1.ffm FileMaxSize 10M Feed feed1.ffm Format mpjpeg VideoFrameRate 4 VideoSize 600x480 VideoBitRate 80 # VideoQMin 1 # VideoQMax 100 VideoIntraOnly NoAudio Strict -1 Make execute file for easy command. Is this a tailored ffmpeg just for web video streaming for a fully functioning install of ffmpeg? I have several Raspberry Pi Zero W's with camera modules running as time lapse cameras collecting images around my home. Currently I run ffmpeg on my Mac Mini to convert the jpeg images to a video clip for the day.
This works fine. But I would like to automate the process and use a Raspberry Pi 3 to run ffmpeg via crontab to create the videos rather than manually running ffmpeg on my Mac. Will your build of ffmpeg allow me to do this?
Thanks, Mike. Nicely Explained! I got - 'Unable to find a suitable output format for 'Invalid argument' ERROR! Can you help? Command - $ ffserver -f /etc/ffserver.conf & ffmpeg -s 600x480 -f video4linux2 -i /dev/video0 Output-ffmpeg version N-90077-g56f77b0 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 4.9.2 (Raspbian 4.9.2-10) configuration: -arch=armel -target-os=linux -enable-gpl -enable-libx264 -enable-nonfree -enable-libtheora -enable-libvorbis libavutil 56.
7.101 libavcodec 58. 11.101 libavformat 58. 9.100 libavdevice 58.
1.100 libavfilter 7. 12.100 libswscale 5. 0.101 libswresample 3. 0.101 libpostproc 55.
0.100 ffserver version N-87073-g1c56bec Copyright (c) 2000-2017 the FFmpeg developers built with gcc 4.9.2 (Raspbian 4.9.2-10) configuration: libavutil 55. 74.100 libavcodec 57.103.101 / 57.103.101 libavformat 57. 78.100 libavdevice 57. 7.101 libavfilter 6.100.100 / 6.100.100 libswscale 4. 7.103 libswresample 2. 8.100 /etc/ffserver.conf:1: Port option is deprecated. Use HTTPPort instead.
/etc/ffserver.conf:3: BindAddress option is deprecated. Use HTTPBindAddress instead. /etc/ffserver.conf:9: NoDaemon option has no effect. You should remove it.
/etc/ffserver.conf:27: Setting default value for video bit rate tolerance = 20000. Use NoDefaults to disable it.
/etc/ffserver.conf:27: Setting default value for video rate control equation = tex^qComp. Use NoDefaults to disable it. /etc/ffserver.conf:27: Setting default value for video max rate = 30906320. Use NoDefaults to disable it. /etc/ffserver.conf:27: Setting default value for video buffer size = 160000. Use NoDefaults to disable it. video4linux2,v4l2 @ 0x1fe71f0 The V4L2 driver changed the video from 600x480 to 640x480 Input #0, video4linux2,v4l2, from '/dev/video0': Duration: N/A, start: 90, bitrate: 147456 kb/s Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc NULL @ 0x1fe8e60 Unable to find a suitable output format for 'Invalid argument 4- Exit 1 ffserver -f /etc/ffserver.conf.
In the past I’ve had to been required to install FFMPEG for applications such as Serviio or a website like Clipbucket. It can be quite stressful since you could get dependency issues if you tried reading any other tutorials online, since the worst nightmare is if something breaks when you have compiled software using wrong dependencies.
Please use our page. How to download jock jams volume 2 zip file to my device? Espn jock jams volume 1.
But this tutorial should ensure that it’ll work first time. UPDATE : I’ve since updated this tutorial to add two new codecs for FFMPEG. I’ve also changed the FFMPEG repository to the official one rather than VideoLan. I’ve tested this complete tutorial for my Raspberry Pi 3 and it works fine. Removing any existing dependencies It’s vital to uninstall everything we’re going to be compiling/installing just in case there have been custom compilations of software that might be corrupted or broken. I’ve had a few errors in the past which resulted in “ Illegal Instruction” when executing “ ffmpeg” in the terminal. Just copy and paste this into your terminal and hit enter.
Type y and hit enter when necessary. Sudo apt - get update; sudo apt - get upgrade; sudo apt - get install libmp3lame - dev; sudo apt - get install - y libopus - dev; sudo apt - get install autoconf; sudo apt - get install libtool; sudo apt - get install checkinstall; sudo apt - get install libssl - dev Downloading & Compiling FFMPEG AND It’s Modules Before we get started, we will be working inside a folder within the home directory. It is important not to remove this file in-case you want to uninstall anything later. Type the commands below in order and follow through. Pi @ Owens - Raspi: / src / FFmpeg $ And that’s it! You have now successfully installed FFMPEG on your Raspberry Pi!
? Summary The Raspberry Pi is a small credit-card sized computer. It’s very low powered and can be powered by a mini-usb cable and USB plug, such as a modern day phone charger. The Raspberry Pi (Model B) has a stock 700Mhz Armv6 processor and 512MB of RAM. The processor can be overclocked in the configuration to a maximum of 1Ghz ( WARNING – Overclocking the Pi may void your warranty and break it). When software utilises FFMPEG, you will see that it may bring the processor usage to 100% on the pi. This will cause the SoC to heat up rapidly unless you have a heatsink or some other form of cooling. At 100% CPU utilisation, the temperature without a heatsink can reach up to 80 Degrees Celsius!
Feel free to comment below and ask any questions! Hi Chris, Thank you! I really appreciate your comment. I received the same error when I tried installing it on my Raspberry Pi after reading countless tutorials. Unfortunately, I had to do a clean install and start again.
If it isn’t to much, backup everything, and wipe your SDCard, then apply the latest Debian version from the Raspberry Pi website. Once you’re logged into SSH with a fresh install, move everything back over to your Raspberry Pi (from which you backed up) then follow this tutorial again.
It should work straight away then. I believe the error is because it is still picking up the software packages on your system which you installed via apt-get from tutorials, or from compiling. When you uninstall a piece of software by doing “make uninstall” some files may still exist on the system, which has proven to be a nightmare. I hope I helped! Kind Regards, Owen. Hi Chris, Thank you once again, I really appreciate it! I went through the same problem when I was trying to install ffmpeg.
Luckily this solution worked for me, and I just didn’t touch it once it was done. I tried compiling ffmpeg again last night once I backed up, using libfaac, but it turned out that it caused the illegal instruction also. Its just trial and error, but it is annoying having to wait 2 hours for ffmpeg to compile to see if it worked or not. I’ll be adding a few lines in the beginning of the article when I get around to it, for making sure that some of the packages which aren’t working which people installed aren’t breaking ffmpeg. Thanks once again! Kind regards, Owen.
Hi, I get an error message when compiling x264 according to your instructions. Any idea what may cause it? /src/x264 $ make dependency file generation gcc -Wshadow -O3 -ffast-math -Wall -I.std=gnu99 -mcpu=cortex-a8 -mfpu=neon -I/usr/local/include -I/usr/local/include -fomit-frame-pointer -fno-tree-vectorize -c -o x264.o x264.c x264.c: In function ‘printcspnames’: x264.c:445:15: error: variable ‘i’ has initializer but incomplete type x264.c:445:27: error: storage size of ‘i’ isn’t known x264.c:445:5: error: ‘enum PixelFormat’ declared in ‘for’ loop initial declaration x264.c:445:27: warning: unused variable ‘i’ -Wunused-variable: recipe for target ‘x264.o’ failed make:. x264.o Error 1.
Is one of those tools I use when I just want to quickly hack together a video and don’t need fancy things like editing, titles, or a user-interface. Compiling, but compiling for the Raspberry Pi takes a little more patience and care. I also wanted to include support for H264 video, which needs to be installed before compiling FFMPEG. There are lots of examples on the web, but what worked for me was a combination of a few of them, so here’s what I did. Note many of these commands may require sudo appended before (commands like git,./configure, and make ). INSTALL H264 SUPPORT Run the following commands, one at a time.
My personal experience (yours may be different): I have compiled/installed OpenCV 2.x and 3.x on all versions of RPi expect the first generation A board. In all these cases except for the RPI 0 W, I relied on RDP (xrdp on RPi and Windows RDP client on the desktop). Long running sessions would be disconnected on the desktop but the RPi would chug along merrily and upon RDP re-connection I could see the “make” continuing. For the RPi 0 W, the board would trip at the 88% make mark consistently (for Open CV 3.2), so I resorted to SSH for this instance only and the “make” proceeded to completion.
Ffmpeg For Raspberry Pi
I guess it must be memory issue for this platform. I’ll try out your steps using RDP first. If it doesn’t work I will have to resort to SSH or even use the direct terminal connection for the first time (I bought the cable but I haven’t had a pressing need to try it out).
Thanks again for sharing and guiding us.
My installation of Debian Jessie is seemingly doing everything it can to prevent me from installing ffmpeg. I have read, but avconv is not an option and adding deb stable main non-free to my sources.list didn't really help. I did apt-get install libav-tools, thinking it would get rid of ffmpeg's dependency problems. Here's what trying to install ffmpeg gets me now: $ sudo apt-get install ffmpeg Reading package lists. Done Building dependency tree Reading state information.
Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. A simple option is to. Once you download and extract it you have several options to run it:.
Navigate to the directory containing the executable and run./ffmpeg -i. (note the./ prefix). Provide the full path to the executable, such as /home/user/Downloads/ffmpeg -i. Place it somewhere in your PATH, such as /bin.
Then run source /.profile or simply log out then log in. Now you can just run the ffmpeg command from anywhere without needing to use the two previous methods. The downloadable executable is compiled daily and is always more up-to-date the what is available in the repository. Why no one use original debian recommendation?? It is simple!
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |