Hot answers tagged

7

Most probably, bottle neck in this case is CPU speed to process the feed. I use Rpi for some basic image processing based automation work and here is what I've noticed. Rpi 1 hardly gives 5 fps at max @ 640x480. Blame single core @ 700 Mhz Rpi 2 gives about 14 - 16 fps at 640x480. (Quad core @ 900 Mhz) I've used Odriod-C1 (SBC mostly similar to Rpi 2 - ...


4

You are on the right track by using mmal hardware decoding and the mpv-build repo (which makes things a lot easier). I found out a config that works pretty well for me, although it's specifically tuned to work explicitly without X11 via an ssh environment within the linux framebuffer. (I think all of this will work for anyone though). So to fully answer the ...


4

There's no way to do this without using an external converter. The BCM2837 chip doesn't support an HD-SDI formatted output, which is fundamentally different to an HDMI formatted output. There's no way to passively convert between the two, so you'll need to use some kind of active external device to run the conversion.


3

You can't specify multiple inputs for FFMPEG like that. You can, however, use the concat option, as described in FFMPEG's documentation. There are different forms depending on whether you're joining files with different codecs or not. It's worth reading all of the documentation - there are more than a few caveats and options in there. Files with the same ...


3

The problem libx264 supports multiple "pixel formats", so ffmpeg will automatically attempt to use whatever most closely matches the input. However, some players can't decode anything other than yuv(j)420p. The solution Add -vf format=yuv420p (or the alias -pix_fmt yuv420p) output options to your encoding command. See Encoding for Dumb Players in the ...


3

You can play the file that is output by raspivid in mplayer. You can also try on another computer using VLC. All you doing with ffmpeg is copying the data stream from the source to destination. You can simply this by renaming the extension from .h264 to .mp4, but you may as well amend raspivid extension to use .mp4 Extensions do not govern what data lies ...


3

I managed to both download the binary, and install from source, but installing from source is extremely extremely difficult, contrary to what people say, as it requires a cross compiler. Also, before proceeding, bear in mind that this synchronizing script is written in python, so it is not very good. Downloading Binary: This is the easiest way to do it, but ...


3

The problem is that the raspberry pi camera module does not, in fact, produce 25 frames per second. Instead, the frequency determined by the oscillator within is more like 24.8 Hz, which, at increasing video length, produces unexpected surplus of frames. The current solution is to consider the frame rate of video input as 25.375 FPS (or roughly so), so the ...


3

concat demuxer You can use the concat demuxer to do this without needing to re-encode. First make a text file: file '/path/to/video_01.mp4' inpoint 30 outpoint 35 file '/path/to/video_02.mp4' inpoint 2 outpoint 6 file '/path/to/video_03.mp4' inpoint 128 outpoint 142 file '/path/to/video_04.mp4' inpoint 48 outpoint 51 file '/path/to/video_05.mp4' inpoint ...


3

The Pi3 has more CPU power than the A20 and bit more than the BananaPi. But in order to monitor 8 different cameras, it may not be enough, even if it is only for simple motion detection. Implementations like OpenCV can run on the CPU, but they can also run on the GPU, so the last part of your question should be expanded to what proper hardware would be able ...


3

You need to select the input and output format. The v4l2 driver and the Pi Camera can stream video directly compressed with h264, which is convenient. By not specifying any format, you get some raw video format which then gets encoded by ffmpeg in h264 (this usually takes a lot of CPU and time). The command would be ffmpeg -f v4l2 -input_format h264 -i /...


3

Short answer run: sudo apt-get install libasound2-dev before attempting to configure and compile ffmpeg or anything where you need alsa support. Process for resolving similar build dependencies: Returning to this build/install method: $ cd /usr/src $ sudo git clone git://source.ffmpeg.org/ffmpeg.git $ cd ffmpeg/ $ sudo ./configure && sudo make &...


3

The most widely used architecture name for the armv7 instruction set is armhf. See this, this and this. ffmpeg has a build for armhf listed on the page you linked, your problem is the Linux distribution that is not supporting the new armv7 instruction set, i am not an openSUSE specialist but you can give this guide a try, or of course change to another ...


3

"+rpt1" indicates a package that has been modified by raspberry pi trading ltd. To find out exactly what they have changed you would have to look at the changelog in the package and/or download the source packages and debdiff them, but an educated guess is that they have modified it to enable some raspberry pi specific functionality. Per debian version ...


2

Well, I found a pretty decent solution. I basically use both together. I think the reason why ffmpeg was so slow, is that it already starts encoding before the recording even finishes. So let's say, a couple of frames were captured from the webcam so far, and ffmpeg already starts encoding those. On a regular computer, this would mean that it finishes more ...


2

I think you have to change the input_format to "yuyv422". Try this: ffmpeg -f video4linux2 -input_format yuyv422 -i /dev/video0 -c:v copy -output.avi or ffmpeg -f video4linux2 -input_format yuyv422 -i /dev/video0 -c:v copy -output.mpg


2

The source lines that are printing the error are here in libav Digging further, you can see that -12 corresponds to ENOMEM, returned here in lavfilters-ffmpeg i.e. it practically does if (!buffer) return AVERROR(ENOMEM) Given this happens after 30 to 60 minutes and you're executing this on a Pi, is it possible you are actually running out of memory? What ...


2

Another method similar to the one mentioned by @thingian is apt-cache policy package_name It will show something like this: pi@raspberrypi:~ $ apt-cache policy emacs emacs: Installed: 46.1 Candidate: 46.1 Version table: *** 46.1 0 500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages 100 /var/lib/dpkg/status As ...


2

The -i flag just defines an infiles. You need to define what you are going to do with those infiles, rather than simply exporting them into your outfile. In view of that, according to ffmpeg documentation, the best method is to start by creating a file with your video in-files in it. Here's an example (just call the file mylist.txt): #this is a comment ...


2

So, I went home and tried the new command with success. The only issue now is some buffering on the YouTube side, which is out of the scope of this question. The below command works fine, replace "REMOVED" with your YouTube channel ID. sudo /opt/vc/bin/raspivid -o - -t 0 -fps 15 -h 720 -w 1280 -rot 270 | /usr/src/ffmpeg/ffmpeg -ar 44100 -ac 2 -acodec ...


2

try to quote target url: cd /opt/vc/bin/ && sudo /opt/vc/bin/raspivid -o - -t 0 -fps 30 -h 720 -w 1280 -b 4000000 -rot 270 -vs | /root/ffmpeg/ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero -f h264 -i - -vcodec copy -acodec aac -ab 128k -g 120 -strict experimental -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/*YOUR KEY HERE*"


2

I managed to get it to work on YouTube Live with the following command: ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero \ -f v4l2 -input_format h264 -i /dev/video0 -codec:v copy \ -acodec aac -ab 128k -g 50 -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/REMOVED I can set the resolution by doing: v4l2-ctl ...


2

Here is how I pipe my HIK IP camera to youtube. This does NOT include audio, and is NOT a USB camera, but perhaps it helps [NOTE: Youtube requires an audio stream, even with a video only stream]. (this is an old script, I have better BASH coding standards today). #! /bin/bash YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # Server URL KEY="USERNAME.xxxx-...


2

Your Raspbian must be old Raspbian Jessie (backports), Raspbian Stretch, and newer use ffmpeg from FFmpeg. Anything older uses the dead counterfeit "ffmpeg" from the Libav fork, and/or avconv which is also from Libav. If your Raspbian doesn't provide ffmpeg, or you don't want to use the old Libav stuff, you can simply download a binary of ffmpeg for armel, ...


1

If you do not want flash and want something modern for the Raspberry Pi with adaptive audio/video streaming to web browser in the fastest possible way (< 150ms), the only solution is UV4L, which works out-of-the-box (just install and use). You can set the min, start, max bitrate as options in the configuration file. For it to be played in the same ...


1

It was a DV webcam: apt-get install dvgrab dvgrab - | mplayer -j They may be modules to install or load too (e.g modprobe raw1394)


1

You are setting up stdout and stderr as pipes for the ffmpeg process, but never read them. If ffmpeg is producing any output at all then it will start to fill up the stdout and stderr buffers. The kernel buffers input/output to programs to stop them blocking for any read/write but they are of limited size. This is not normally an issue but in your case you ...


1

I use this camera "H.264 2MP 1080P USB2.0 1/2.9" Sony IMX322 Low illumination 0.01lux", Link. I struggle a lot to find the best options for recording Video+Audio toghter, finally I use this: ffmpeg -ar 44100 -ac 1 -f alsa -i hw:1 -f v4l2 -c:v h264 -r 30 -s 1920x1080 -itsoffset 0.5 -i /dev/video0 -t 15 -copyinkf -codec:v copy -codec:a aac -ab 128k -g 10 ...


1

Try sudo apt-cache show libavcodec-dev


1

So I figured out! I hope it will help for the someone who is facing the same issue. Solution: open /etc/apt/sources.conf: sudo nano /etc/apt/sources.conf add the following line: deb http://ftp.debian.org/debian/ stretch main contrib non-free save it (Ctrl+o) close it (Ctrl+x). Now can install libavformat by: sudo apt-get install libavformat-dev If ...


Only top voted, non community-wiki answers of a minimum length are eligible