ffmpeg and v4l2 devices

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ffmpeg and v4l2 devices

william keeling
Can you not user 2 v4l2 devices at once as input? I have a Pi with 2 camera and I am trying to take input from both concurrently.

/dev/video0 and /dev/video1 work when used one at a time.

pi@picam2:~ $ /usr/bin/arecord -D dmic_sv -c2 -r 44100 -f S32_LE |
> /usr/local/bin/ffmpeg -y  -thread_queue_size 10240 -f v4l2 -i /dev/video0 \
>     -thread_queue_size 10240 -f v4l2 -i /dev/video1 -ac:2 2 -thread_queue_size 10240 -i - \
>     -filter_complex "[0][1] overlay=5:main_h-overlay_h-5" -acodec aac -f flv -ar 44100 -f flv test.mp4
Recording WAVE 'stdin' : Signed 32 bit Little Endian, Rate 44100 Hz, Stereo
ffmpeg version N-96343-g029cc9883f Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 8 (Raspbian 8.3.0-6+rpi1)
  configuration: --enable-network --enable-protocol=tcp --enable-protocol=udp --enable-demuxer=rtsp --enable-decoder=h264 --enable-gpl --enable-libx264 --enable-nonfree --enable-decoder=h264_mmal --enable-encoder=h264_omx --enable-mmal --enable-omx --enable-omx-rpi --enable-libfreetype
  libavutil      56. 38.100 / 56. 38.100
  libavcodec     58. 65.103 / 58. 65.103
  libavformat    58. 35.102 / 58. 35.102
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 71.100 /  7. 71.100
  libswscale      5.  6.100 /  5.  6.100
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 270.532881, bitrate: 283115 kb/s
    Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1024x768, 283115 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[video4linux2,v4l2 @ 0x260d190] ioctl(VIDIOC_STREAMON): Invalid argument
/dev/video1: Invalid argument



_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".