Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Rodolfo Medina
Rodolfo Medina  writes:

> Leonardo via ffmpeg-user  writes:
>
>> Since you have an AMD cpu/apu, one last resort that I can think of is to
>> capture webcam with hardware acceleration.
>>
>>
>
>
> Nothing, the problem remains...  it gets stuck for some seconds...


The problem also occurs with another computer of mine, Intel, old:

$ cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model   : 28
model name  : Intel(R) Atom(TM) CPU N270   @ 1.60GHz
stepping: 2
microcode   : 0x212
cpu MHz : 1210.046
cache size  : 512 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 1
apicid  : 0
initial apicid  : 0
fdiv_bug: no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc 
arch_perfmon pebs bts cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 
xtpr pdcm movbe lahf_lm dtherm
bugs:
bogomips: 3192.03
clflush size: 64
cache_alignment : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model   : 28
model name  : Intel(R) Atom(TM) CPU N270   @ 1.60GHz
stepping: 2
microcode   : 0x212
cpu MHz : 1159.421
cache size  : 512 KB
physical id : 0
siblings: 2
core id : 0
cpu cores   : 1
apicid  : 1
initial apicid  : 1
fdiv_bug: no
f00f_bug: no
coma_bug: no
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc 
arch_perfmon pebs bts cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 
xtpr pdcm movbe lahf_lm dtherm
bugs:
bogomips: 3192.03
clflush size: 64
cache_alignment : 64
address sizes   : 32 bits physical, 32 bits virtual
power management:





$ ffmpeg -f alsa -i hw:0,0 -f video4linux2 -s 640x480 -i /dev/video0 out.mpg
ffmpeg version 4.1.4-1~deb10u1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8 (Debian 8.3.0-6)
  configuration: --prefix=/usr --extra-version='1~deb10u1' --toolchain=hardened 
--libdir=/usr/lib/i386-linux-gnu --incdir=/usr/include/i386-linux-gnu 
--arch=i386 --enable-gpl --disable-stripping --enable-avresample 
--disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa 
--enable-libaom --enable-libass --enable-libbluray --enable-libbs2b 
--enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy 
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora 
--enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx 
--enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 
--enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx 
--enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 
--enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r 
--enable-libx264 
--ignore-tests='hapenc-hap-none,hapenc-hapa-none,hapenc-hapq-none' 
--enable-shared
  libavutil  56. 22.100 / 56. 22.100
  libavcodec 58. 35.100 / 58. 35.100
  libavformat58. 20.100 / 58. 20.100
  libavdevice58.  5.100 / 58.  5.100
  libavfilter 7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc55.  3.100 / 55.  3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:0,0':
  Duration: N/A, start: 1595450904.939058, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Input #1, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 556.262393, bitrate: 147456 kb/s
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 
kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
File 'out.mpg' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo (native) -> mpeg1video (native))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp2 (native))
Press [q] to stop, [?] for help
[alsa @ 0x1464ac0] ALSA buffer xrun.
[mpeg @ 0x147a040] VBV buffer size not set, using default size of 230KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 

Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Rodolfo Medina
Leonardo via ffmpeg-user  writes:

> Since you have an AMD cpu/apu, one last resort that I can think of is to
> capture webcam with hardware acceleration.
>
>
> Extracted from https://trac.ffmpeg.org/wiki/Hardware/VAAPI
>
> Also, you need to verify what "-vaapi_device" is the correct one for your
> machine.
> The wiki has much more information.
>
>
> "Camera Capture
>
>
> Capture a raw stream from a V4L2 camera device and encode it as H.264:
>
>
> $ ffmpeg -vaapi_device /dev/dri/renderD128 -f v4l2 -video_size 1920x1080 -i
> /dev/video0 -vf 'format=nv12,hwupload' -c:v h264_vaapi output.mp4
>
>
> ... "


Nothing, the problem remains...  it gets stuck for some seconds...

rodolfo
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Leonardo via ffmpeg-user

Since you have an AMD cpu/apu, one last resort that I can think of is to 
capture webcam with hardware acceleration.


Extracted from https://trac.ffmpeg.org/wiki/Hardware/VAAPI

Also, you need to verify what "-vaapi_device" is the correct one for your 
machine.
The wiki has much more information.


"Camera Capture


Capture a raw stream from a V4L2 camera device and encode it as H.264:


$ ffmpeg -vaapi_device /dev/dri/renderD128 -f v4l2 -video_size 1920x1080 -i 
/dev/video0 -vf 'format=nv12,hwupload' -c:v h264_vaapi output.mp4


... "


Kind regards,
Leonardo
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Rodolfo Medina
Leonardo via ffmpeg-user  writes:

> What is the output of
>
> $ cat /proc/cpuinfo
>
> ?


Here it is:

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 22
model   : 48
model name  : AMD A6-7310 APU with AMD Radeon R4 Graphics
stepping: 1
microcode   : 0x7030105
cpu MHz : 998.353
cache size  : 2048 KB
physical id : 0
siblings: 4
core id : 0
cpu cores   : 4
apicid  : 0
initial apicid  : 0
fpu : yes
fpu_exception   : yes
cpuid level : 13
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb 
rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid 
aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes 
xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a 
misalignsse 3dnowprefetch osvw ibs skinit wdt topoext perfctr_nb bpext ptsc 
perfctr_llc cpb hw_pstate ssbd vmmcall bmi1 xsaveopt arat npt lbrv svm_lock 
nrip_save tsc_scale flushbyasid decodeassists pausefilter pfthreshold 
overflow_recov
bugs: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 
spec_store_bypass
bogomips: 3992.78
TLB size: 1024 4K pages
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb acc_power [13]

processor   : 1
vendor_id   : AuthenticAMD
cpu family  : 22
model   : 48
model name  : AMD A6-7310 APU with AMD Radeon R4 Graphics
stepping: 1
microcode   : 0x7030105
cpu MHz : 1003.070
cache size  : 2048 KB
physical id : 0
siblings: 4
core id : 1
cpu cores   : 4
apicid  : 1
initial apicid  : 1
fpu : yes
fpu_exception   : yes
cpuid level : 13
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb 
rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid 
aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes 
xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a 
misalignsse 3dnowprefetch osvw ibs skinit wdt topoext perfctr_nb bpext ptsc 
perfctr_llc cpb hw_pstate ssbd vmmcall bmi1 xsaveopt arat npt lbrv svm_lock 
nrip_save tsc_scale flushbyasid decodeassists pausefilter pfthreshold 
overflow_recov
bugs: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 
spec_store_bypass
bogomips: 3992.78
TLB size: 1024 4K pages
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb acc_power [13]

processor   : 2
vendor_id   : AuthenticAMD
cpu family  : 22
model   : 48
model name  : AMD A6-7310 APU with AMD Radeon R4 Graphics
stepping: 1
microcode   : 0x7030105
cpu MHz : 998.310
cache size  : 2048 KB
physical id : 0
siblings: 4
core id : 2
cpu cores   : 4
apicid  : 2
initial apicid  : 2
fpu : yes
fpu_exception   : yes
cpuid level : 13
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb 
rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc cpuid extd_apicid 
aperfmperf pni pclmulqdq monitor ssse3 cx16 sse4_1 sse4_2 movbe popcnt aes 
xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a 
misalignsse 3dnowprefetch osvw ibs skinit wdt topoext perfctr_nb bpext ptsc 
perfctr_llc cpb hw_pstate ssbd vmmcall bmi1 xsaveopt arat npt lbrv svm_lock 
nrip_save tsc_scale flushbyasid decodeassists pausefilter pfthreshold 
overflow_recov
bugs: fxsave_leak sysret_ss_attrs null_seg spectre_v1 spectre_v2 
spec_store_bypass
bogomips: 3992.78
TLB size: 1024 4K pages
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts ttp tm 100mhzsteps hwpstate cpb acc_power [13]

processor   : 3
vendor_id   : AuthenticAMD
cpu family  : 22
model   : 48
model name  : AMD A6-7310 APU with AMD Radeon R4 Graphics
stepping: 1
microcode   : 0x7030105
cpu MHz : 998.258
cache size  : 2048 KB
physical id : 0
siblings: 4
core id : 3
cpu cores   : 4
apicid  : 3
initial apicid  : 3
fpu : yes
fpu_exception   : yes
cpuid level : 13
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb 
rdtscp lm constant_tsc rep_good acc_power nopl nonstop_tsc 

Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Leonardo via ffmpeg-user
What is the output of

$ cat /proc/cpuinfo

?


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Rodolfo Medina
Leonardo via ffmpeg-user  writes:

> Hello,
>
> as an alternative, you can display your webcam at screen with mplayer
>
> $ mplayer tv:// -tv
> driver=v4l2:width=640:height=480:device=/dev/video0:fps=30:outfmt=yuy2
> -noborder -geometry 640x480+0+0
>
> and record your screen+audio with ffmpeg (here I'm using pulseaudio because of
> the "noise-reduction")
>
>
> $ ffmpeg -thread_queue_size 1024 -f pulse -sample_rate 44100 -i default
> -video_size 640x480 -probesize 10M -framerate 30 -thread_queue_size 512 -f
> x11grab -i :0.0 -c:a aac -b:a 128k -c:v libx264 -vf "format=yuv420p" -crf 0
> -preset ultrafast output.mp4
>
> You can use
>
> $ uvcdynctrl -f
>
> to identify which resolution/fps your webcam supports and edit commands above
> to your needs.


Thank you, Leonardo...  but the problem remains: when I watch the resulting
video, it freezes for many seconds at start...

$ uvcdynctrl -f
Listing available frame formats for device video0:
Pixel format: YUYV (YUYV 4:2:2; MIME type: video/x-raw-yuv)
  Frame size: 640x480
Frame rates: 30, 30
  Frame size: 320x240
Frame rates: 30
  Frame size: 160x120
Frame rates: 30
  Frame size: 640x480
Frame rates: 30, 30



$ mplayer tv:// -tv 
driver=v4l2:width=640:height=480:device=/dev/video0:fps=30:outfmt=yuy2 
-noborder -geometry 640x480+0+0
MPlayer 1.3.0 (Debian), built with gcc-8 (C) 2000-2016 MPlayer Team
do_connect: could not connect to socket
connect: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing tv://.
TV file format detected.
Selected driver: v4l2
 name: Video 4 Linux 2 input
 author: Martin Olschewski 
 comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was 
used instead.
Selected device: BZ IR: BZ IR
 Capabilities:  video capture  streaming
 supported norms:
 inputs: 0 = Camera 1;
 Current input: 0
 Current format: YUYV
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Inappropriate ioctl for device
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
==
Opening video decoder: [raw] RAW Uncompressed Video
Movie-Aspect is undefined - no prescaling applied.
VO: [vdpau] 640x480 => 640x480 Packed YUY2 
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==
Audio: no sound
Starting playback...
V:   0.0 154/154 ??% ??% ??,?% 0 0 



$ ffmpeg -thread_queue_size 1024 -f pulse -sample_rate 44100 -i default 
-video_size 640x480 -probesize 10M -framerate 30 -thread_queue_size 512 -f 
x11grab -i :0.0 -c:a aac -b:a 128k -c:v libx264 -vf "format=yuv420p" -crf 0 
-preset ultrafast output.mp4
ffmpeg version 4.1.4-1+b2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Debian 9.2.1-1)
  configuration: --prefix=/usr --extra-version=1+b2 --toolchain=hardened 
--libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu 
--arch=amd64 --enable-gpl --disable-stripping --enable-avresample 
--disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa 
--enable-libaom --enable-libass --enable-libbluray --enable-libbs2b 
--enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy 
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora 
--enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx 
--enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 
--enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx 
--enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 
--enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r 
--enable-libx264 --enable-shared
  libavutil  56. 22.100 / 56. 22.100
  libavcodec 58. 35.100 / 58. 35.100
  libavformat58. 20.100 / 58. 20.100
  libavdevice58.  5.100 / 58.  5.100
  libavfilter 7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc55.  3.100 / 55.  3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'default':
  Duration: N/A, start: 1595442907.483712, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Input #1, x11grab, from ':0.0':
  Duration: N/A, start: 1595442908.796004, bitrate: N/A
Stream #1:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 640x480, 30 fps, 30 
tbr, 1000k tbn, 1000k tbc
File 'output.mp4' already exists. Overwrite 

Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Leonardo via ffmpeg-user
Hello,

as an alternative, you can display your webcam at screen with mplayer

$ mplayer tv:// -tv 
driver=v4l2:width=640:height=480:device=/dev/video0:fps=30:outfmt=yuy2 
-noborder -geometry 640x480+0+0

and record your screen+audio with ffmpeg (here I'm using pulseaudio because of 
the "noise-reduction")


$ ffmpeg -thread_queue_size 1024 -f pulse -sample_rate 44100 -i default 
-video_size 640x480 -probesize 10M -framerate 30 -thread_queue_size 512 -f 
x11grab -i :0.0 -c:a aac -b:a 128k -c:v libx264 -vf "format=yuv420p" -crf 0 
-preset ultrafast output.mp4

You can use

$ uvcdynctrl -f

to identify which resolution/fps your webcam supports and edit commands above 
to your needs.

Kind regards,
Leonardo
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Rodolfo Medina
Carl Zwanzig  writes:

> On 7/22/2020 6:22 AM, Rodolfo Medina wrote:
>> Same problem also with simply:
>>
>>   $ ffmpeg -f alsa -i hw:1,0 -f video4linux2 -i /dev/video0 out.mpg
>>
>> , and audio completely out of sync...
>
> And complete command output is still missing (it's always helpful)
>
> Since this works--
> mencoder tv:// -tv driver=v4l2:width=640:height=480 [...]
>
> The computer you're using may not have enough resources to process those large
> frames. If the native resolution of the devices is 3200x2400, that's
> 23MB/frame, and encoding often needs to keep a few in memory at once. As you
> tried in mencover, dial down the capture size in ffmpeg and see if that work.



Same problem also with: -s 640x480

$ ffmpeg -f alsa -i hw:1,0 -f video4linux2 -s 640x480 -i /dev/video0 out.mpg > 
log
ffmpeg version 4.1.4-1+b2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9 (Debian 9.2.1-1)
  configuration: --prefix=/usr --extra-version=1+b2 --toolchain=hardened 
--libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu 
--arch=amd64 --enable-gpl --disable-stripping --enable-avresample 
--disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa 
--enable-libaom --enable-libass --enable-libbluray --enable-libbs2b 
--enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy 
--enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora 
--enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx 
--enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 
--enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx 
--enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 
--enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r 
--enable-libx264 --enable-shared
  libavutil  56. 22.100 / 56. 22.100
  libavcodec 58. 35.100 / 58. 35.100
  libavformat58. 20.100 / 58. 20.100
  libavdevice58.  5.100 / 58.  5.100
  libavfilter 7. 40.101 /  7. 40.101
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale  5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc55.  3.100 / 55.  3.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:1,0':
  Duration: N/A, start: 1595439555.172771, bitrate: 1536 kb/s
Stream #0:0: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Input #1, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 23292.147778, bitrate: 147456 kb/s
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 
kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
File 'out.mpg' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo (native) -> mpeg1video (native))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> mp2 (native))
Press [q] to stop, [?] for help
[alsa @ 0x55b787639980] ALSA buffer xrun.
[mpeg @ 0x55b787656ec0] VBV buffer size not set, using default size of 230KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 'out.mpg':
  Metadata:
encoder : Lavf58.20.100
Stream #0:0: Video: mpeg1video, yuv420p(progressive), 640x480, q=2-31, 200 
kb/s, 30 fps, 90k tbn, 30 tbc
Metadata:
  encoder : Lavc58.35.100 mpeg1video
Side data:
  cpb: bitrate max/min/avg: 0/0/20 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16, 384 kb/s
Metadata:
  encoder : Lavc58.35.100 mp2
[video4linux2,v4l2 @ 0x55b787653d00] Thread message queue blocking; consider 
raising the thread_queue_size option (current value: 8)
[alsa @ 0x55b787639980] Thread message queue blocking; consider raising the 
thread_queue_size option (current value: 8)
frame=  991 fps= 32 q=7.5 size=2382kB time=00:00:32.96 bitrate=
592.0kbits/s dup=200 drop=0 speed=1.07x 


thank you..,

rodolfo
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Carl Zwanzig

On 7/22/2020 6:22 AM, Rodolfo Medina wrote:

Same problem also with simply:

  $ ffmpeg -f alsa -i hw:1,0 -f video4linux2 -i /dev/video0 out.mpg

, and audio completely out of sync...


And complete command output is still missing (it's always helpful)

Since this works--
mencoder tv:// -tv driver=v4l2:width=640:height=480 [...]

The computer you're using may not have enough resources to process those 
large frames. If the native resolution of the devices is 3200x2400, that's 
23MB/frame, and encoding often needs to keep a few in memory at once. As you 
tried in mencover, dial down the capture size in ffmpeg and see if that work.


z!
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Webcam capture

2020-07-22 Thread Rodolfo Medina
Paul B Mahol  writes:

> On 7/20/20, Rodolfo Medina  wrote:
>> Hi all.
>>
>> When capturing video from webcam, with:
>>
>>  $ ffmpeg -f video4linux2 -s 3200x2400 -i /dev/video0 -vb 20M out.mpg
>
> 3200x2400  is very big resolution


Same problem also with simply:

 $ ffmpeg -f alsa -i hw:1,0 -f video4linux2 -i /dev/video0 out.mpg

, and audio completely out of sync...

Thanks,

Rodolfo
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] Webcam capture

2020-07-20 Thread Paul B Mahol
On 7/20/20, Rodolfo Medina  wrote:
> Hi all.
>
> When capturing video from webcam, with:
>
>  $ ffmpeg -f video4linux2 -s 3200x2400 -i /dev/video0 -vb 20M out.mpg

3200x2400  is very big resolution

>
> , out.mpg stops, freezes, gets stuck at the beginning for a few seconds.
> Only
> at the beginning and only for a few seconds.  I thought the problem was
> related
> to the cheap low-quality webcam but it completely disappears when I do
> instead:
>
>  $ mencoder tv:// -tv
> driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:alsa:adevice=hw.1,0
> -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi
>
> So what could the cause be of the problem with ffmpeg?
>
> Thanks for any help.
>
> Rodolfo
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-user] Webcam capture

2020-07-20 Thread Rodolfo Medina
Hi all.

When capturing video from webcam, with:

 $ ffmpeg -f video4linux2 -s 3200x2400 -i /dev/video0 -vb 20M out.mpg

, out.mpg stops, freezes, gets stuck at the beginning for a few seconds.  Only
at the beginning and only for a few seconds.  I thought the problem was related
to the cheap low-quality webcam but it completely disappears when I do instead:

 $ mencoder tv:// -tv 
driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:alsa:adevice=hw.1,0
 -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi

So what could the cause be of the problem with ffmpeg?

Thanks for any help.

Rodolfo
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".