Webcam recording with FFmpeg through USB over UTP - ffmpeg

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

Related

FFMPEG throws error while converting WEBM/MP4 audio files from MediaRecorder to MP3

I use MediaRecorder to record the audio from the browser and then upload it to my server (ARM-based Linux machine - AWS Lambda Function, if it matters). Based on the browser type, I get either an MP4 file (for the Safari browser) OR a WEBM file (for every other browser) from the MediaRecorder. The audio is converted to Base64 string and posted to my server with FFMPEG.
MediaRecorder implementation
const audioStream = await navigator.mediaDevices.getUserMedia(mediaConstraints);
const MediaRecorder = window['MediaRecorder'];
const mimeType = MediaRecorder.isTypeSupported('audio/webm') ? 'audio/webm' : 'audio/mp4';
const recordingFileExtension = MediaRecorder.isTypeSupported('audio/webm') ? 'webm' : 'mp4';
mediaRecorder = new MediaRecorder(audioStream, { mimeType });
mediaRecorder.ondataavailable = convertBlobAndUploadChunk;
mediaRecorder.start(30 * 1000); // timeslice needs to be in ms
// When user stops recording
mediaRecorder.stop();
audioStream.getTracks().forEach( t => { t.stop(); });
// To convert the audio blob to string
function convertBlobToBase64(blob) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(blob);
reader.onload = () => {
const tmpStr = reader.result.toString();
resolve(tmpStr.substring(tmpStr.indexOf('base64,') + 7));
};
reader.onerror = error => reject(error);
});
}
let blobCount = 0;
async function convertBlobAndUploadChunk(blobEvent) {
if (!blobEvent.data || blobEvent.data.size === 0) return;
blobCount++;
const recordData = JSON.stringify({
M: {
blobCount,
//some other meta data
},
D: await convertBlobToBase64(audioBlob),
});
await angularHttpClient.post(apiUrl, recordData, new HttpHeaders({
'Content-Type': 'application/json',
'x-api-key': apiKey,
})).toPromise();
}
On my server, I convert the WEBM/MP4 file to an MP3 file for better cross-browser compatibility and to enable scrubbing.
Backend Lambda Implementation
const FFMpegCommand = require('fluent-ffmpeg'); // v2.1.2
new FFMpegCommand()
.input(originalFile)
.on('end', (error, stdOut, stdError) => {
if (error) {
console.error(error);
}
})
.save(convertedFile);
This works perfectly fine 99.9% of the time but FFMPEG throws one of the following errors for 0.1% of the time:
Error 1: Invalid data found when processing input
error reading header
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the
FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
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
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7232f40] could not find corresponding trex (id 1)
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7232f40] could not find corresponding track id 0
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7232f40] trun track id unknown, no tfhd was found
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7232f40] error reading header
/tmp/long-filename-of-140chars-to-keep-files-unique.mp4: Invalid data found when processing input
EBML Header parsing failed
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
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
[matroska,webm # 0x7595f40] Format matroska,webm detected only with low score of 1, misdetection possible!
[matroska,webm # 0x7595f40] EBML header parsing failed
/tmp/long-filename-of-140chars-to-keep-files-unique.webm: Invalid data found when processing input
No specific details
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
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
/tmp/long-filename-of-140chars-to-keep-files-unique.webm: Invalid data found when processing input
Error 2: Output file #0 does not contain any stream
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
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
[mpegts # 0x5d19f40] Format mpegts detected only with low score of 2, misdetection possible!
[mpegts # 0x5d19f40] Could not detect TS packet size, defaulting to non-FEC/DVHS
Input #0, mpegts, from '/tmp/long-filename-of-140chars-to-keep-files-unique.webm':
Duration: N/A, bitrate: N/A
Output #0, mp3, to '/tmp/long-filename-of-140chars-to-keep-files-unique.mp3':
Output file #0 does not contain any stream
Thanks for reading, any help/suggestion is highly appreciated.
It's a little tricky to debug this without more code but I think Brad is on to something, sounds like the data isn't complete or mangled.
If it is corrupted data being ingested then you might want to consider putting something before the conversion to ensure that it is valid.
As a proof of concept I created this Dockerfile:
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y ffmpeg
COPY valid.sh /valid.sh
RUN chmod 755 valid.sh
ENTRYPOINT [ "/valid.sh" ]
and created a file called valid.sh:
#!/bin/bash
export INPUT_FILE
export OUTPUT_FILE
echo Looking for ${INPUT_FILE} exporting to $OUTPUT_FILE
/usr/bin/ffmpeg -v error -i /input/${INPUT_FILE} -f null - 2>errors.log
if [[ $(cat errors.log) ]]; then
echo "Errors found! Source video isn't valid."
exit 1
fi
/usr/bin/ffmpeg -i /input/${INPUT_FILE} -vn -ab 128k -ar 44100 -y /output/${OUTPUT_FILE};
To run it:
docker build -t test ./
docker run -it --env INPUT_FILE=broken.webm --env OUTPUT_FILE=test123.mp3 --rm --name test -v C:/Users/me/Desktop/example:/input -v C:/Users/me/Desktop/output:/output test:latest
If the webm file is invalid it returns:
Looking for broken.webm exporting to test123.mp3
Errors found! Source video isn't valid.`
... otherwise:
Looking for working.webm exporting to test123.mp3
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
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
Input #0, matroska,webm, from '/input/working.webm':
Metadata:
encoder : http://sourceforge.net/projects/yamka
creation_time : 2010-05-20T12:00:13.000000Z
Duration: 00:01:57.70, start: 0.000000, bitrate: 582 kb/s
Stream #0:0(eng): Video: vp8, yuv420p(progressive), 540x360, SAR 1:1 DAR 3:2, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
Stream #0:1(eng): Audio: vorbis, 44100 Hz, mono, fltp (default)
Stream mapping:
Stream #0:1 -> #0:0 (vorbis (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to '/output/test123.mp3':
Metadata:
TSSE : Lavf58.76.100
Stream #0:0(eng): Audio: mp3, 44100 Hz, mono, fltp, 128 kb/s (default)
Metadata:
encoder : Lavc58.134.100 libmp3lame
size= 1840kB time=00:01:57.71 bitrate= 128.1kbits/s speed= 209x
video:0kB audio:1840kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.024520%

FFmpeg gdigrab failed to capture image

Hi I am trying to capture desktop with ffmpeg gdigrab. I am using SSH connection to remotely use admin cmd on windows 10 pc. When i execute this command normally it works but remotely it doesnt.
ffmpeg -f gdigrab -framerate 30 -i desktop output.mkv
error message
ffmpeg version 4.4-essentials_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
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
[gdigrab # 000001f3e781e600] Capturing whole desktop as 1024x768x32 at (0,0)
[gdigrab # 000001f3e781e600] Failed to capture image (error 5)
[gdigrab # 000001f3e781e600] Could not find codec parameters for stream 0 (Video: bmp, none, 754987 kb/s): unspecified size
Consider increasing the value for the 'analyzeduration' (15000000) and 'probesize' (70000000) options
Input #0, gdigrab, from 'desktop':
Duration: N/A, bitrate: 754987 kb/s
Stream #0:0: Video: bmp, none, 754987 kb/s, 30 fps, 1000k tbr, 1000k tbn, 1000k tbc
Output #0, matroska, to 'pipe:':
Output file #0 does not contain any stream
I tried to increase analyzeduration and probesize to max integer but it doesnt help.

Download m3u8 video from a webpage

I want to download a video from a webpage. I found the m3u8 file and got the link, using them in FFmpeg, finally got something wrong.
Here is the capture of the beginning of the m3u8 file.
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-ALLOW-CACHE:YES
#EXT-X-TARGETDURATION:13
#EXTINF:10.080000,
https://ddcdn.jd.com/ddimg/jfs/t1/203028/24/17499/1876858/61a85ec0Ef32e255f/289bf6dd94343ed0.bmp
#EXTINF:10.000000,
https://ddcdn.jd.com/ddimg/jfs/t1/140366/35/22093/1147042/61a85ec0E850c8c8e/30b8a5e3032486ea.bmp
#EXTINF:10.000000,
https://ddcdn.jd.com/ddimg/jfs/t1/213475/10/6333/1554250/61a85ec0Ecc4703c3/39107a4d803fc188.bmp
#EXTINF:8.040000,
https://ddcdn.jd.com/ddimg/jfs/t1/205672/5/17259/1669682/61a85ec0Eff60ae58/fca014f8ef9bdcdc.bmp
#EXTINF:10.000000,
https://ddcdn.jd.com/ddimg/jfs/t1/217728/38/6334/1906374/61a85ec0Eeaf23ef5/d9ec645ad064f527.bmp
Here is what I input and output in the cmd.
Input
ffmpeg -i "https://hls.kmzhiqing.com/hls/m3u8/1452590c00595055de5750d1595519554f525372617d0d4061.m3u8" 1.mp4
Output
ffmpeg version N-100036-g3de3d2f5e2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3-win32 (GCC) 20200320
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 --enable-shared --disable-static --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-opencl --enable-libvmaf --enable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-ffnvcodec --enable-cuda-llvm --enable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --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. 60.100 / 56. 60.100
libavcodec 58.113.100 / 58.113.100
libavformat 58. 64.100 / 58. 64.100
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7. 90.100 / 7. 90.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
[hls # 000001d87d857740] Skip ('#EXT-X-VERSION:3')
[hls # 000001d87d857740] Skip ('#EXT-X-ALLOW-CACHE:YES')
[hls # 000001d87d857740] Opening 'https://ddcdn.jd.com/ddimg/jfs/t1/203028/24/17499/1876858/61a85ec0Ef32e255f/289bf6dd94343ed0.bmp' for reading
[hls # 000001d87d857740] Opening 'https://ddcdn.jd.com/ddimg/jfs/t1/140366/35/22093/1147042/61a85ec0E850c8c8e/30b8a5e3032486ea.bmp' for reading
[hls # 000001d87d857740] Could not find codec parameters for stream 0 (Video: bmp, none): unspecified size
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, hls, from 'https://hls.kmzhiqing.com/hls/m3u8/1452590c00595055de5750d1595519554f525372617d0d4061.m3u8':
Duration: 00:24:24.60, bitrate: N/A
Program 0
Metadata:
variant_bitrate : 0
Stream #0:0: Video: bmp, none, 25 tbr, 25 tbn, 25 tbc
Metadata:
variant_bitrate : 0
Output #0, mp4, to '1.mp4':
Output file #0 does not contain any stream
I found that the the link in the m3u8 file is a bmp file instead of mp4.
Does it matter????
Can anyone tell me how to download the mp4 video file?
Thank you for reading this!
Here try this:
-$ ffmpeg -i <http://url/.m3u8> -c copy -bsf:a aac_adtstoasc video_name.mp4

ffmpeg stream Windows 7 desktop to Youtube give invalid argument

I am experimenting with live streaming my Windows 7 desktop to YouTube.
Firstly the list of devices:
ffmpeg-N-100616-gca21cb1e36-win64-gpl\bin\ffmpeg.exe -list_devices true -f dshow -i dummy
Gives:
ffmpeg version N-100616-gca21cb1e36 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 9.3-win32 (GCC) 20200320
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --a
rch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv
--enable-zlib --enable-libxml2 --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-open
cl --enable-libvmaf --disable-vulkan --enable-libvorbis --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-li
bdavs2 --enable-ffnvcodec --enable-cuda-llvm --disable-libglslang --enable-libass --enable-libbluray --enable-libmp3lame --enable-li
bopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --en
able-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-li
bxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
libavutil 56. 63.100 / 56. 63.100
libavcodec 58.116.100 / 58.116.100
libavformat 58. 65.101 / 58. 65.101
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7. 95.100 / 7. 95.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
[dshow # 000000000052ca00] DirectShow video devices (some may be both video and audio devices)
[dshow # 000000000052ca00] "VF0700 Live! Cam Chat HD"
[dshow # 000000000052ca00] Alternative name "#device_pnp_\\?\usb#vid_041e&pid_4088&mi_00#7&b015b04&0&0000#{65e8773d-8f56-11d0-a3
b9-00a0c9223196}\global"
[dshow # 000000000052ca00] "UScreenCapture"
[dshow # 000000000052ca00] Alternative name "#device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\UScreenCapture"
[dshow # 000000000052ca00] "screen-capture-recorder"
[dshow # 000000000052ca00] Alternative name "#device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{4EA69364-2C8A-4AE6-A561-56E4B504
4439}"
[dshow # 000000000052ca00] DirectShow audio devices
[dshow # 000000000052ca00] "Microphone (VF0700 Live! Cam Ch"
[dshow # 000000000052ca00] Alternative name "#device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (VF0700 Live! Cam Ch"
[dshow # 000000000052ca00] "virtual-audio-capturer"
[dshow # 000000000052ca00] Alternative name "#device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{8E146464-DB61-4309-AFA1-3578E927
E935}"
dummy: Immediate exit requested
ffmpeg-N-100616-gca21cb1e36-win64-gpl\bin\ffmpeg.exe -list_devices true -f dshow -i dummy
gives:
ffmpeg version 4.3.1-2021-01-01-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enab
le-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libss
h --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-li
brav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --en
able-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-
amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libm
fx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-
libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable
-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[dshow # 0000000000485ac0] DirectShow video devices (some may be both video and audio devices)
[dshow # 0000000000485ac0] "VF0700 Live! Cam Chat HD"
[dshow # 0000000000485ac0] Alternative name "#device_pnp_\\?\usb#vid_041e&pid_4088&mi_00#7&b015b04&0&0000#{65e8773d-8f56-11d0-a3
b9-00a0c9223196}\global"
[dshow # 0000000000485ac0] "UScreenCapture"
[dshow # 0000000000485ac0] Alternative name "#device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\UScreenCapture"
[dshow # 0000000000485ac0] "screen-capture-recorder"
[dshow # 0000000000485ac0] Alternative name "#device_sw_{860BB310-5D01-11D0-BD3B-00A0C911CE86}\{4EA69364-2C8A-4AE6-A561-56E4B504
4439}"
[dshow # 0000000000485ac0] DirectShow audio devices
[dshow # 0000000000485ac0] "Microphone (VF0700 Live! Cam Ch"
[dshow # 0000000000485ac0] Alternative name "#device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Microphone (VF0700 Live! Cam Ch"
[dshow # 0000000000485ac0] "virtual-audio-capturer"
[dshow # 0000000000485ac0] Alternative name "#device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{8E146464-DB61-4309-AFA1-3578E927
E935}"
dummy: Immediate exit requested
Now trying to live stream with the command:
ffmpeg-N-100616-gca21cb1e36-win64-gpl\bin\ffmpeg.exe -f dshow -i video='screen-capture-recorder':audio='Microphone (VF0700 Live! Cam Ch' -r 24 -s 1920x1080 -qmin 3 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key'
I get:
ffmpeg version 4.3.1-2021-01-01-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enab
le-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libss
h --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-li
brav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --en
able-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-
amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libm
fx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-
libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb
--enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable
-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
leaving aero onGuessed Channel Layout for Input Stream #0.1 : stereo
Input #0, dshow, from 'video=screen-capture-recorder:audio=Microphone (VF0700 Live! Cam Ch':
Duration: N/A, start: 758394.360000, bitrate: N/A
Stream #0:0: Video: rawvideo, bgr0, 1920x1080, 30 fps, 30 tbr, 10000k tbn, 10000k tbc
Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
[NULL # 00000000006645c0] Unable to find a suitable output format for 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key
'
rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key: Invalid argument
[dshow # 0000000000607400] real-time buffer [screen-capture-recorder] [video input] too full or near too full (545% of size: 3041280
[rtbufsize parameter])! frame dropped!
Last message repeated 5 times
In short the errors are:
[NULL # 00000000006645c0] Unable to find a suitable output format for 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key
'
rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key: Invalid argument
[dshow # 0000000000607400] real-time buffer [screen-capture-recorder] [video input] too full or near too full (545% of size: 3041280
I have tried with and without the :1935 port number, with ffmpeg_x64.exe but no difference. Is the stream key the invalid argument or something else?
Figured it out with. The -f parameter is used to specif the input format dshow, but this parameter is also positionally dependent appliying to the input and/or output format if placed before the input and ouitput.
So the solution was to add the -f flv to the output as well:
ffmpeg-N-100616-gca21cb1e36-win64-gpl\bin\ffmpeg.exe -f dshow -i video='screen-capture-recorder':audio='Microphone (VF0700 Live! Cam Ch' -r 24 -s 1920x1080 -qmin 3 -f flv 'rtmp://a.rtmp.youtube.com:1935/live2/the-stream-key'
So, we are saying the input format is dshow by placing it before the -i flag, and the output is flv by placing it before the output (the stream channel).

USB webcam streaming in ARM board (i.MX6)

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.

Resources