I'm generating thumbnails for a videos that are available from s3 and need to minimize traffic.
Frame is going to be from the first couple seconds of the video so the question: is there a way to get frame without passing the full file through network?
At the moment I'm passing video url to ffmpeg but seems like it downloads the whole file, not only first couple seconds.
ffmpeg -ss 0 -noaccurate_seek -i {srcPresignedUrl} -vframes 1 -q:v 2 {outputFileName}
I tried downloading first 10mb of the file and passing it, this works for some mp4 files, but fails on mov:
ffmpeg.exe -ss 0 -i source.mov -vframes 1 -q:v 2 thumb.jpg
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.1 (GCC) 20200726
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
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
[mov,mp4,m4a,3gp,3g2,mj2 # 0000017582ffff40] moov atom not found
source.mov: Invalid data found when processing input
That's true. Some mp4 files are streaming-ready, but often they are not. The trick is that the moov atom (in simple English, the table of contents of the video file) is normally prepared during the file encoding and attached to the end. There are different ways to move this information to the head of the stream (see Post processing in ffmpeg to move 'moov atom' in MP4 files (qt-faststart)), but this requires rebuilding the video.
Related
I want to replace the audio stream in a Video-DVD. But I have problems with the replace of the audio stream.
The DVD-VOB have 3 streams.
Stream 0 is dvd_nav_packet.
Stream 1 is the video.
Stream 2 is the audio.
I also tryed to change the exportinformation for ffmepg with -map 0:d and -map 0:d:1. Also with and without from the codec Infos -f vob -target ntsc-dvd -vcodec copy -acodec copy. And update ffmpeag/use older versions. But I only get error messages.
ffmpeg is startet with a vb.net Programm which which decide which video need a new audio file.
Can somebody tell me what I do wrong?
ffmpeg.exe -i "F:\VIDEO_TS\VTS_01_1.VOB" -i "%CD%\tfpat.mp2" -map 0:0 -map 0:1 -map 1:0 -f vob -target ntsc-dvd -vcodec copy -acodec copy "C:\Users\Timo\AppData\Local\Microsoft\Windows\Burn\Burn\VIDEO_TS\VTS_01_1.VOB"
ffmpeg version N-88514-gd5995c531d Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.2.0 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx
libavutil 56. 0.100 / 56. 0.100
libavcodec 58. 1.100 / 58. 1.100
libavformat 58. 0.102 / 58. 0.102
libavdevice 58. 0.100 / 58. 0.100
libavfilter 7. 0.101 / 7. 0.101
libswscale 5. 0.101 / 5. 0.101
libswresample 3. 0.101 / 3. 0.101
libpostproc 55. 0.100 / 55. 0.100
Input #0, mpeg, from 'F:\VIDEO_TS\VTS_01_1.VOB':
Duration: 00:01:51.17, start: 0.300300, bitrate: 7273 kb/s
Stream #0:0[0x1bf]: Data: dvd_nav_packet
Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 32:27 DAR 16:9], 6800 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:2[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 320 kb/s
[ac3 # 037ee700] Estimating duration from bitrate, this may be inaccurate
Input #1, ac3, from 'D:\SkyDrive\Projekte\AtmosFX_Syncro_Projekt\AtmosFX-Translator\AlteVersionen\Version 2\tfpat.mp2':
Duration: 00:01:51.26, start: 0.000000, bitrate: 320 kb/s
Stream #1:0: Audio: ac3, 48000 Hz, stereo, fltp, 320 kb/s
File 'C:\Users\Timo\AppData\Local\Microsoft\Windows\Burn\Burn\VIDEO_TS\VTS_01_1.VOB' already exists. Overwrite ? [y/N] y
[dvd # 037fbd20] Invalid media type data for output stream #0
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Stream #1:0 -> #0:2 (copy)
Last message repeated 1 times
FFmpeg will not copy over the existing navigation packet, so skip it.
ffmpeg.exe -i "F:\VIDEO_TS\VTS_01_1.VOB" -i "%CD%\tfpat.mp2" -map 0:v -map 1:a -f vob -target ntsc-dvd -vcodec copy -acodec copy "C:\Users\Timo\AppData\Local\Microsoft\Windows\Burn\Burn\VIDEO_TS\VTS_01_1.VOB"
Recently, I see this error very often. Does anyone know what the error is and how to fix ? Please check full ffmpeg output here ( I already update openssl latest version from yum )
ffmpeg version N-93715-gd0e4d04 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)
configuration: --prefix= ....
Input #0, mpegts, from '/tmp/4028813_video_0.ts':
Duration: 00:04:08.19, start: 1.410111, bitrate: 1504 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 608x1080 [SAR 1:1 DAR 76:135], 30 fps, 30 tbr, 90k tbn, 60 tbc
Stream #0:1[0x101](eng): Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 121 kb/s
[ sh: 2019-05-06 9:39:46 ]
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, flv, to 'rtmps://live-api-s.facebook.com:443/rtmp/289693778580218?s_bl=1&s_sw=0&s_vt=api-s&a=Abxj1aU9OTqh0RtS':
Metadata:
comment : gs4028813
encoder : Lavf58.27.103
Stream #0:0: Video: h264 (High) ([7][0][0][0] / 0x0007), yuv420p(tv, bt709, progressive), 608x1080 [SAR 1:1 DAR 76:135], q=2-31, 3000 kb/s, 30 fps, 30 tbr, 1k tbn, 30 tbc
Stream #0:1(eng): Audio: aac (LC) ([10][0][0][0] / 0x000A), 44100 Hz, stereo, fltp, 128 kb/s
Metadata:
encoder : Lavc58.52.100 aac
[ sh: 2019-05-06 9:39:47 ]size= 169kB time=00:00:00.52 bitrate=2643.9kbits/s speed=1.03x
......
[ sh: 2019-05-06 9:40:10 ]size= 3386kB time=00:00:22.72 bitrate=1220.7kbits/s speed=0.999x
[ sh: 2019-05-06 9:40:11 ]size= 3842kB time=00:00:25.32 bitrate=1242.9kbits/s speed= 1x
[tls # 0x30ab3c0] error:00000000:lib(0):func(0):reason(0)82 bitrate=1247.3kbits/s speed= 1x
av_interleaved_write_frame(): Input/output error
[flv # 0x3030f80] Failed to update header with correct duration.
[flv # 0x3030f80] Failed to update header with correct filesize.
Error writing trailer of rtmps://live-api-s.facebook.com:443/rtmp/289693778580218?s_bl=1&s_sw=0&s_vt=api-s&a=Abxj1aU9OTqh0RtS: Input/output error
frame= 776 fps= 30 q=-1.0 Lsize= 3932kB time=00:00:25.82 bitrate=1247.3kbits/s speed= 1x
video:3530kB audio:406kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[tls # 0x30ab3c0] error:1409F07F:SSL routines:ssl3_write_pending:bad write retry
This error normally indicates a bug in the program calling OpenSSL. When an application using OpenSSL attempts to write application data to an SSL/TLS connection using the "SSL_write" function it may be unable to complete the write in one go (for example because the underlying network buffers are full). In this case a recoverable "retry" error occurs. The application is supposed to retry the write with exactly the same data as last time. If the calling application retries the write with different data then you get the "bad write retry" message (a fatal error). As to how to fix it that unfortunately depends on identifying the bug in the calling application and ensuring that retries are only ever performed with exactly the same data.
ffmpeg h.246 plays locally in Safari, but not when hosted on s3 bucket.
I thought it was therefore a problem with S3, however a friend has sent me an .mp4 of the same file converted with Zencoder's service and this works perfectly, which surely means it must be a problem with my encoding settings in ffmpeg?
I'm using the settings recommended for maximum compatibility:
ffmpeg -an -i mov-input-02.mov -vcodec libx264 -filter:v scale="1400:trunc(ow/a/2)*2" -movflags +faststart -pix_fmt yuv420p -profile:v baseline mov-output-02-1400.mp4
Additionally, the .webm files I'm converting with ffmpeg all work perfectly in Chrome, Firefox, Opera etc.!
I would really appreciate any thoughts.
The video that works from Zencoder has this metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1mp42
creation_time : 2018-06-01T11:24:54.000000Z
Duration: 00:00:10.97, start: 0.000000, bitrate: 396 kb/s
Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709), 1800x1200 [SAR 1:1 DAR 3:2], 394 kb/s, 30 fps, 30 tbr, 30 tbn, 60 tbc (default)
Metadata:
creation_time : 2018-06-01T11:24:49.000000Z
While my videos from ffmpeg which don't work have this metadata:
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.12.100
Duration: 00:00:10.97, start: 0.000000, bitrate: 184 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 1400x932 [SAR 699:700 DAR 3:2], 182 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
timecode : 00:00:00:01
Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
Metadata:
handler_name : TimeCodeHandler
timecode : 00:00:00:01
Unsupported codec with id 0 for input stream 1
Here's the full output from conversion:
Tempuras-iMac:2018.06.05 tempura$ ffmpeg -an -i mov-input-01.mov -vcodec l Tempuras-iMac:2018.06.05 tempura$ ffmpeg -an -i mov-input-02.mov -vcodec libx264 -filter:v scale="1400:trunc(ow/a/2)*2" -movflags +faststart -pix_fmt yuv420p -profile:v baseline -level 3 mov-output-02-1400.mp4
ffmpeg version 4.0 Copyright (c) 2000-2018 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.0 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-gpl --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'mov-input-02.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2018-05-09T09:59:58.000000Z
Duration: 00:00:10.97, start: 0.000000, bitrate: 114375 kb/s
Stream #0:0(eng): Video: qtrle (rle / 0x20656C72), rgb24(progressive), 2700x1800, 113610 kb/s, SAR 1:1 DAR 3:2, 30 fps, 30 tbr, 30 tbn, 30 tbc (default)
Metadata:
creation_time : 2018-05-09T09:59:58.000000Z
handler_name : Apple Alias Data Handler
encoder : Animation
timecode : 00:00:00:01
Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
Metadata:
creation_time : 2018-05-09T09:59:58.000000Z
handler_name : Apple Alias Data Handler
timecode : 00:00:00:01
Stream mapping:
Stream #0:0 -> #0:0 (qtrle (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 # 0x7fac39004200] using SAR=699/700
[libx264 # 0x7fac39004200] frame MB size (88x59) > level limit (1620)
[libx264 # 0x7fac39004200] MB rate (155760) > level limit (40500)
[libx264 # 0x7fac39004200] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 # 0x7fac39004200] profile Constrained Baseline, level 3.0
[libx264 # 0x7fac39004200] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'mov-output-02-1400.mp4':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
encoder : Lavf58.12.100
Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1400x932 [SAR 699:700 DAR 3:2], q=-1--1, 0.03 fps, 15360 tbn, 30 tbc (default)
Metadata:
creation_time : 2018-05-09T09:59:58.000000Z
handler_name : Apple Alias Data Handler
timecode : 00:00:00:01
encoder : Lavc58.18.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[mp4 # 0x7fac39003000] Starting second pass: moving the moov atom to the beginning of the file
frame= 329 fps= 42 q=-1.0 Lsize= 248kB time=00:00:10.93 bitrate= 185.5kbits/s speed= 1.4x
video:245kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.042892%
[libx264 # 0x7fac39004200] frame I:2 Avg QP:15.82 size: 34370
[libx264 # 0x7fac39004200] frame P:327 Avg QP:16.88 size: 555
[libx264 # 0x7fac39004200] mb I I16..4: 76.8% 0.0% 23.2%
[libx264 # 0x7fac39004200] mb P I16..4: 0.5% 0.0% 0.2% P16..4: 0.7% 0.2% 0.1% 0.0% 0.0% skip:98.3%
[libx264 # 0x7fac39004200] coded y,uvDC,uvAC intra: 14.3% 0.1% 0.1% inter: 0.2% 0.0% 0.0%
[libx264 # 0x7fac39004200] i16 v,h,dc,p: 57% 39% 3% 0%
[libx264 # 0x7fac39004200] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41% 24% 20% 2% 3% 3% 2% 3% 1%
[libx264 # 0x7fac39004200] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 # 0x7fac39004200] kb/s:182.53
I've been currently trying to set up an encoding process from RTSP to HLS using FFmpeg, with success for most streams.
However, for streams/cameras with digest authentication, FFmpeg seems to fail with a classic 401 Unauthorized, as such:
ffmpeg -loglevel debug -i "rtsp://user:password#192.168.0.1/stream" /folder/output.m3u8
Giving:
ffmpeg version N-85750-ga75ef15 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --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-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-zlib
libavutil 55. 61.100 / 55. 61.100
libavcodec 57. 93.100 / 57. 93.100
libavformat 57. 72.101 / 57. 72.101
libavdevice 57. 7.100 / 57. 7.100
libavfilter 6. 88.100 / 6. 88.100
libswscale 4. 7.101 / 4. 7.101
libswresample 2. 8.100 / 2. 8.100
libpostproc 54. 6.100 / 54. 6.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input url with argument 'rtsp://username:password#192.168.0.1/stream'.
Reading option '/folder/output.m3u8' ... matched as output url.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input url rtsp://username:password#192.168.0.1/stream2.
Successfully parsed a group of options.
Opening an input file: rtsp://username:password#192.168.0.1/stream.
[tcp # 00000000025c3900] No default whitelist set
[rtsp # 00000000025c2560] method OPTIONS failed: 401 Unauthorized
[rtsp # 00000000025c2560] CSeq: 2
WWW-Authenticate: Digest realm="Use 'live' as User Name", nonce="2ae726f5557769220b780deb4f562226", algorithm=MD5, qop="auth"
rtsp://user:password#192.168.0.1/stream: Server returned 401 Unauthorized (authorization failed)
I've checked that the camera is accessible and the input URI works in VLC. The camera I'm trying to obtain the stream from is a Bosch one.
I've searched and searched over the Internet but I didn't find any concrete solution to this.
Any ideas?
maybe rtsp default port->554
ffmpeg -loglevel debug -i "rtsp://user:password#192.168.0.1/stream" /folder/output.m3u8
correct :
ffmpeg -loglevel debug -i "rtsp://user:password#192.168.0.1:554/stream" /folder/output.m3u8
I am trying the following command, so that my webcam shows a video when i access it from network or android emulator.
I am using archlinux. I have installed v4l2loopback-dkms. and added the module to the kernel. then i launched
gst-launch-0.10 filesrc location=/home/simha/1.3gp ! decodebin2 ! ffmpegcolorspace ! videoscale ! ffmpegcolorspace ! v4l2sink device=/dev/video0
but no sucess.
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0: Device '/dev/video0' is not a output device.
Additional debug info:
v4l2_calls.c(528): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Sink:v4l2sink0:
Capabilities: 0x85200001
Setting pipeline to NULL ...
Freeing pipeline ...
Also tried:
ffmpeg -f x11grab -r 15 -s 1280x720 -i :0.0+0,0 -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0
but not working
ffmpeg version 2.8 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-shared --enable-version3 --enable-x11grab
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
Input #0, x11grab, from ':0.0+0,0':
Duration: N/A, start: 1456374857.672770, bitrate: N/A
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1280x720, 15 fps, 15 tbr, 1000k tbn, 15 tbc
[v4l2 # 0x55f5129180a0] ioctl(VIDIOC_G_FMT): Invalid argument
Output #0, v4l2, to '/dev/video0':
Metadata:
encoder : Lavf56.40.101
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 1280x720, q=2-31, 200 kb/s, 15 fps, 15 tbn, 15 tbc
Metadata:
encoder : Lavc56.60.100 rawvideo
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> rawvideo (native))
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
You might be using the wrong driver for your webcam.
Use the lsusb command to identify your webcam. Then find out what driver you need to get it working. You can find out more information about this by reading the Webcam Arch Wiki Page