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 - ...
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 ...
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 ...
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.
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 ...
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 ...
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.
Add -vf format=yuv420p (or the alias -pix_fmt yuv420p) output options to your encoding command.
See Encoding for Dumb Players in the ...
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 ...
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.
This is the easiest way to do it, but ...
You can use the concat demuxer to do this without needing to re-encode.
First make a text file:
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 ...
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 /...
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 &...
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 ...
"+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 ...
My rep is too low to comment.
Have you tried lowering the video size, say starting at 320x240? I've streamed video from a Zero W before but never at the resolution you're using. That video size could require up to 15MB/s, see RaspiCam documentation.
Even at modest bitrates I've had the camera lock up and/or the Pi crashes and needs power cycling. I suspect ...
I think you have to change the input_format to "yuyv422".
ffmpeg -f video4linux2 -input_format yuyv422 -i /dev/video0 -c:v copy -output.avi
ffmpeg -f video4linux2 -input_format yuyv422 -i /dev/video0 -c:v copy -output.mpg
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 ...
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 ...
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:
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).
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # Server URL
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
*** 46.1 0
500 http://mirrordirector.raspbian.org/raspbian/ jessie/main armhf Packages
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
So I figured out! I hope it will help for the someone who is facing the same issue.
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 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 ...
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 ...
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 ...