2

I am trying to create a video output from multiple video cameras.

Following the example given here Presenting more than 2 videos using FFmpeg and other similar examples.

but Im getting the error

Output pad "default" for the filter "src" of type "buffer" not connected to any destination

when i run

ffmpeg -i /dev/video1 -i /dev/video0 -filter_complex "[0:0]pad=iw*2:ih[a];[a][1:0]overlay=w[b];[b][2:0]overlay=w:h" -shortest output.mp4

Im not really sure what this means or how to fix it.

Any help would be greatly appreciated! Thanks.

Community
  • 1
  • 1
Crunchie
  • 197
  • 1
  • 3
  • 9

1 Answers1

1

When using the "padding" option, you have to specify which is the size of the output image and where you want to put the input image

 [0:0]pad=iw*2:ih:0:0

tested under windows 7 with file of same size

 ffmpeg -i out.avi -i out.avi -filter_complex "[0:0]pad=iw*2:ih:0:0[a];[a][1:0]overlay=w" -shortest output.mp4

and with WebCam Cap (vfwcap) and a still picture (as i have only o=1 WebCam). BTW you can see how to scale one the source to fit in the target (just in case your source have different resolution)

 ffmpeg -y -f vfwcap -r 10 -i 0 -loop 1 -i photo.jpg  -filter_complex "[0:0]pad=iw*2:ih:0:0[a];[1:0]scale=640:480[b];[a][b]overlay=w" -shortest output.mp4

under Linux:

 ffmpeg -i /dev/video1 -i /dev/video0 -filter_complex "[0:0]pad=iw*2:ih:0:0[[a];a][1:0]overlay=w" -shortest output.mp4

if it doesn't work test a simple record of video 1 and after of video 0 and check their properties (type, resolution, fps).

 ffmpeg -i /dev/video1 -shortest output1.mp4
 ffmpeg -I output1.mp4

If you still have issue, update your question with ffmpeg console output (as text) for video and video 0 capture and also of the call with the overlay

alexbuisson
  • 7,699
  • 3
  • 31
  • 44
  • Hey Sorry should of specified i need to use linux, this works great in windows but still getting the same error in linux (mint) – Crunchie Jul 26 '13 at 04:54
  • Hi, I updated my answer with an example for Linux . If you still have issue try to follow the investigation method I describe, it could help. – alexbuisson Jul 26 '13 at 06:54
  • Thanks for your help, realised I had an older version of ffmpeg install so got the latest release and all is working fine now. Silly me. – Crunchie Jul 27 '13 at 04:06