USB webcam streaming in ARM board (i.MX6) - ffmpeg

I want to streaming the camera via NETWORK. I have connected the USB webcam to i.MX6 board and want to stream in Ubuntu14.04/16.04 via network.
Incidentally, I have installed the gstreamer and ffmpeg tools for this in i.MX6 board.
Also I am able to stream USB webcam within Ubuntu14.04 PC using the following ffmpeg commands. But it's also not working if I use ffplay in other Ubuntu16.04 and I am not sure why (both are same ffmpeg versions).
ffmpeg -f v4l2 -i /dev/video0 -preset ultrafast -vcodec libx264 -tune zerolatency -b 900k -f mpegts udp://192.168.0.37:1234
ffplay udp://192.168.0.37:1234
Ubuntu 16.06: (NOT WORKING)
tus#titus-PC:~/workdir$ ffplay udp://192.168.0.105:1234
ffplay version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2003-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
Ubuntu 14.04: (WORKING)
titus#titus-laptop:~$
titus#titus-laptop:~$ ffplay udp://127.0.0.1:1234
ffplay version 3.3.2 Copyright (c) 2003-2017 the FFmpeg developers
built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
[h264 # 0xb0621660] non-existing PPS 0 referenced sq= 0B f=0/0
Last message repeated 1 times
[h264 # 0xb0621660] decode_slice_header error
[h264 # 0xb0621660] non-existing PPS 0 referenced
[h264 # 0xb0621660] decode_slice_header error
[h264 # 0xb0621660] non-existing PPS 0 referenced
[h264 # 0xb0621660] decode_slice_header error
[h264 # 0xb0621660] non-existing PPS 0 referenced
[h264 # 0xb0621660] decode_slice_header error
[h264 # 0xb0621660] no frame!
[h264 # 0xb0621660] non-existing PPS 0 referenced sq= 0B f=0/0
1751.47 M-V: -0.021 fd= 0 aq= 0KB vq= 11KB sq= 0B f=0/0
1751.63 M-V: -0.020 fd= 0 aq= 0KB vq= 11KB sq= 0B f=0/0
1751.80 M-V: -0.020 fd= 0 aq= 0KB vq= 11KB sq= 0B f=0/0
Finally I want to stream with different ARM boards. Am also not able to build ffplay command. Same issue with raspberry pi too. I am doing something wrong or misunderstood something here?

You want to stream the live USB camera feed from iMX6 to PC. Assuming I understood correctly, running the following pipeline on iMX6
gst-launch-1.0 imxv4l2src device=/dev/video3 ! videoconvert ! queue ! vpuenc_h264 ! rtph264pay ! udpsink host=10.18.0.125 port=5004
and by running the following pipeline on my PC
gst-launch-1.0 udpsrc port=5004 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, payload=(int)96, encoding-name=(string)H264" ! rtph264depay ! avdec_h264 ! xvimagesink
I can view the USB camera stream on PC.

Related

Webcam recording with FFmpeg through USB over UTP

I'm trying to record my webcam with FFmpeg.
I listed the devices with this line:
ffmpeg -list_devices true -f dshow -i dummy
And I test the settings with this one:
ffplay -loglevel verbose -f dshow -rtbufsize 100M -video_size 1280x720 -framerate 60 -video_device_number 0 -audio_device_number 0 -i video="C922 Pro Stream Webcam":audio="Microphone (C922 Pro Stream Web"
The first command outputs this:
ffmpeg version n4.4-10-g75c3969292 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10-win32 (GCC) 20210408
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[dshow # 000000000035a000] DirectShow video devices (some may be both video and audio devices)
[dshow # 000000000035a000] "C922 Pro Stream Webcam"
[dshow # 000000000035a000] Alternative name "#device_pnp_\\?\usb#vid_046d&pid_085c&mi_00#9&1da24ac&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow # 000000000035a000] DirectShow audio devices
[dshow # 000000000035a000] "Microphone (C922 Pro Stream Web"
[dshow # 000000000035a000] Alternative name "#device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (C922 Pro Stream Web"
[dshow # 000000000035a000] "Microphone (Realtek High Defini"
[dshow # 000000000035a000] Alternative name "#device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (Realtek High Defini"
dummy: Immediate exit requested
And the second one this:
ffplay version n4.4-10-g75c3969292 Copyright (c) 2003-2021 the FFmpeg developers
built with gcc 10-win32 (GCC) 20210408
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Initialized direct3d renderer.
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
dshow passing through packet of type video size 170103 timestamp 2074640340000 orig timestamp 2074640336004 graph timestamp 2074640340000 diff 3996 C922 Pro Stream Webcam
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
dshow passing through packet of type video size 166381 timestamp 2074640500000 orig timestamp 2074640502670 graph timestamp 2074640500000 diff -2670 C922 Pro Stream Webcam
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
dshow passing through packet of type video size 173348 timestamp 2074640820000 orig timestamp 2074640816017 graph timestamp 2074640820000 diff 3983 C922 Pro Stream Webcam
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
...
However, if I use a USB cable extender (USB over UTP - This thing consist of two parts: the first one has a male, the second one a female USB A, and they are linked through RJ45 sockets and a Cat5e UTP cable), it does not work at all. The first command prints the same:
ffmpeg version n4.4-10-g75c3969292 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10-win32 (GCC) 20210408
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[dshow # 000000000039a000] DirectShow video devices (some may be both video and audio devices)
[dshow # 000000000039a000] "C922 Pro Stream Webcam"
[dshow # 000000000039a000] Alternative name "#device_pnp_\\?\usb#vid_046d&pid_085c&mi_00#9&1da24ac&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow # 000000000039a000] DirectShow audio devices
[dshow # 000000000039a000] "Microphone (C922 Pro Stream Web"
[dshow # 000000000039a000] Alternative name "#device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (C922 Pro Stream Web"
[dshow # 000000000039a000] "Microphone (Realtek High Defini"
[dshow # 000000000039a000] Alternative name "#device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (Realtek High Defini"
dummy: Immediate exit requested
But the second fails with "Could not set video options":
ffplay version n4.4-10-g75c3969292 Copyright (c) 2003-2021 the FFmpeg developers
built with gcc 10-win32 (GCC) 20210408
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-vulkan --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libgme --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Initialized direct3d renderer.
nan : 0.000 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
[dshow # 00000000004de180] Could not set video options
video=C922 Pro Stream Webcam:audio=Microphone (C922 Pro Stream Web: I/O error
What can be the problem? Is it the extender cable? What are FFmpeg's requirement on USB cables (and extenders)?
This is not a software/configuration issue - it's purely electrical one. I assume you have passive USB over Ethernet adapters which only convert the wiring without touching signal itself. 5-10 meters is realistic maximum you can expect from that kind of cable (I tested for myself using iPhone and Mac Mini).
Active USB over Ethernet adapters might help. They work in entirely different way and they are completely transparent to both host and guest device - no additional configuration needed.
For details about limitations of USB cables see this answer https://superuser.com/a/64747/416084

How to get ffmpeg to fail if stdin stream has errors?

I've got some code that outputs rawvideo to ffmpeg via pipe, which then overlays a png over it. If the code exits with an error, ffmpeg keeps going forever, I don't know how to stop it :( Any ideas? Here's an example:
set -o pipefail
(echo "error!!"; exit 1) | \
ffmpeg -f rawvideo -c:v rawvideo -s 1280x720 -pix_fmt bgra -i - \
-i my_icon.png \
-filter_complex "[0][1]overlay=50:50" \
out.mp4
Note ffmpeg DOES show an error message, but still does not stop, stuck in 'frame 0' forever, with a strange time attribute e.g. time:-577014:32:22.77:
[rawvideo # 0x563fc94427c0] Packet too small (8)
Error while decoding stream #0:0: Invalid data found when processing input
Finishing stream 0:0 without any data written to it.:32:22.77 bitrate= -0.0kbits/s speed=N/A
frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
ffmpeg version information as requested in comments:
ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100

FFMPEG Output to DeckLink Duo 2

Im trying to use FFMPEG to stream out to my Decklink duo 2 but im unable to do so.
Heres the command that im trying:
ffmpeg -f decklink -i "DeckLink Duo (1)#5"
-pix_fmt uyvy422 -r 25000/1000 "DeckLink Duo (3)"
I tried just sending color bars as an output but it still doesnt work
Command:
ffmpeg -f lavfi -i color=color=red -t 10000 "DeckLink Duo (3)"
Both Result:
ffmpeg version N-82794-g3ab1311 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-dxva2 --enable-libmfx --enable-nvenc
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass
--enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg
--enable-libopus --enable-librtmp --enable-libschroedinger
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora
--enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg
--enable-lzma --enable-decklink --enable-zlib
libavutil 55. 42.100 / 55. 42.100
libavcodec 57. 67.100 / 57. 67.100
libavformat 57. 58.102 / 57. 58.102
libavdevice 57. 2.100 / 57. 2.100
libavfilter 6. 68.100 / 6. 68.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Input #0, lavfi, from 'color=color=red':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
[NULL # 00000000025745a0] Unable to find a suitable output format for 'DeckLink Duo (3)'
DeckLink Duo (3): Invalid argument
Any Suggestions or help to solve this is much appreciated.
As the documentation says "DeckLink is very picky about the formats it supports. Pixel format is always uyvy422, framerate, field order and video size must be determined for your device with -list_formats 1. Audio sample rate is always 48 kHz.", see https://www.ffmpeg.org/ffmpeg-devices.html#decklink-1. So you need to add the resolution and make sure it is supported.
For the Duo 2 or Quad 2, You need to confirm in Desktop Video utility that you have assigned an SDI port to the channel, otherwise it may be in key/fill mode. This can be found in the third tab called "Connectors". If you can't select one (happens on device (2) or (4) if 1 or 3 are set to key/fill mode, you go back to 1 or 3 and change them to use a single connector.
That was the cause of my I/O error trying to use chanel (3).

ffmpeg isn't accepting "%d" format?

So, I have a directory full of files named motor_animate_000.gif, motor_animate_001.gif, etc.
I run:
ffmpeg -r 30 -i motor_animate_%03d.gif -r 30 motor.mpg
I expect to get a file called motor.mpg, but instead I get the usual bunch of printout, ending with:
motor_animate_%03d.gif: No such file or directory
What? This worked in Ubuntu 14.04, but doesn't work now. What I'm doing appears to be consistent with the ffmpeg man page. I'm now officially clueless. Thanks in advance.
Here's what I get when I try the alternate suggested below:
tim#Servo:~/Documents/Movies/dcmotor/animation$ ffmpeg -f image2 -framerate 30 -i motor_animate_%03d.gif motor.mpg
ffmpeg version 2.8.10-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[image2 # 0x20bd420] Could not find codec parameters for stream 0 (Video: none, none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
motor_animate_%03d.gif: could not find codec parameters
Input #0, image2, from 'motor_animate_%03d.gif':
Duration: 00:00:04.03, start: 0.000000, bitrate: N/A
Stream #0:0: Video: none, none, 30 fps, 30 tbr, 30 tbn, 30 tbc
No decoder for stream #0:0, filtering impossible
Error opening filters!
The gif demuxer does not support a series of input files. You'll need to manually tell it to use the image file demuxer instead:
ffmpeg -f image2 -framerate 30 -i motor_animate_%03d.gif motor.mpg
The image file demuxer uses -framerate instead of -r.
You don't need to declare frame rate twice if you want to output to be the same as the input, so I removed the output -r.

ffmpeg cannot recognize the '-af' option

The ffmpeg cannot recognize the '-af' option. How can I fix this?
$ ffmpeg -i 01.wav -af pan=1:c0=c1 01mono.wav
ffmpeg version 0.10.12-7:0.10.12-1~precise1 Copyright (c) 2000-2014 the FFmpeg developers
built on Apr 26 2014 09:49:36 with gcc 4.6.3
configuration: --arch=amd64 --disable-stripping --enable-pthreads --enable-runtime-cpudetect --extra-version='7:0.10.12-1~precise1' --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
libavutil 51. 35.100 / 51. 35.100
libavcodec 53. 61.100 / 53. 61.100
libavformat 53. 32.100 / 53. 32.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 61.100 / 2. 61.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 6.100 / 0. 6.100
libpostproc 52. 0.100 / 52. 0.100
[wav # 0x19dd680] max_analyze_duration 5000000 reached at 5015510
Input #0, wav, from '01.wav':
Duration: 00:40:20.40, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s16, 1411 kb/s
Unrecognized option 'af'
Failed to set value 'pan=1:c0=c1' for option 'af'
Your ffmpeg is too old. See the FFmpeg Download page and get a static build, or refer to a compile guide. FFmpeg development is very active, so it is recommended to always use a recent build.

Resources