Re: [FFmpeg-user] Unable to play recorded audio and video from webcam using ffmpeg

2021-01-11 Thread Vijay Rakesh Munganda
Hi All,

Kindly please anyone suggest me.

Thanks & Regards,
Vijay Rakesh

> On 11-Jan-2021, at 10:06, Vijay Rakesh Munganda 
>  wrote:
> 
> 
> Hi Moritz,
> 
>> Assuming ffmpeg actually segments like this (and not on keyframes): 
>> Individual
>> frames cannot normally be played, unless they are keyframes. You should
>> play the complete segment "playlist" as a whole. ffplay will have
>> trouble identifying the streams and codecs in such a short sample:
>> I have add keyframes 
> 
>  I have added the keyframes option in ffmpeg command as ffmpeg -f alsa 
> -thread_queue_size 1024 -i hw:0 -f video4linux2 -i /dev/video0 -c:a aac -ar 
> 48k -t 0:10 -segment_time 00:00.04 -f segment sample-%003d.aac -c:v h264 
> -force_key_frames "expr:gte(t,n_forced*0.04)" -pix_fmt yuv420p -s:v 640x480 
> -t 0:10 -r 25 -g 1 -segment_time 00:00.04 -f segment frame-%003d.h264. But 
> still I get an error as frame-001.h264: Invalid data found when processing 
> input.
> 
> Console Output:
> configuration: --prefix=/usr --extra-version=0ubuntu0.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
>   libavformat57. 83.100 / 57. 83.100
>   libavdevice57. 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
>   libpostproc54.  7.100 / 54.  7.100
> Guessed Channel Layout for Input Stream #0.0 : stereo
> Input #0, alsa, from 'hw:0':
>   Duration: N/A, start: 1610338632.931406, 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: 3405.427360, bitrate: 147456 kb/s
> Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 
> 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))
>   Stream #1:0 -> #1:0 (rawvideo (native) -> h264 (libx264))
> Press [q] to stop, [?] for help
> [alsa @ 0x55777d96fe00] ALSA buffer xrun.
> [segment @ 0x55777d983d80] Opening 'sample-000.aac' for writing
> Output #0, segment, to 'sample-%003d.aac':
>   Metadata:
> encoder : Lavf57.83.100
> Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
> Metadata:
>   encoder : Lavc57.107.100 aac
> [libx264 @ 0x55777d98fa20] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
> [libx264 @ 0x55777d98fa20] profile High, level 3.0
> [libx264 @ 0x55777d98fa20] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC 
> codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: 
> cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 
> psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=1 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=1 keyint_min=1 scenecut=40 
> intra_refresh=0 rc=crf mbtree=0 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 
> ip_ratio=1.40 aq=1:1.00
> [segment @ 0x55777d98dda0] Opening 'frame-000.h264' for writing
> Output #1, segment, to 'frame-%003d.h264':
>   Metadata:
> encoder : Lavf57.83.100
> Stream #1:0: Video: h264 (libx264), yuv420p, 640x480, q=-1--1, 25 fps, 25 
> tbn, 25 tbc
> Metadata:
>   encoder : Lavc57.107.100 libx264
> Side data:
>   cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
> [segment @ 0x55777d983d80] Opening 'sample-001.aac' for writing
> [segment @ 0x55777d98dda0] Opening 'frame-001.h264' for writing
> [segment @ 0x55777d98dda0] Opening 'frame-002.h264' for writing
> [segment @ 0x55777d98dda0] Opening 'frame-003.h264' for writing
> [segment @ 0x55777d98dda0] Opening 'frame-004.h264' for writing
> [segmen

Re: [FFmpeg-user] Unable to play recorded audio and video from webcam using ffmpeg

2021-01-10 Thread Vijay Rakesh Munganda
Hi Moritz,

Assuming ffmpeg actually segments like this (and not on keyframes):
> Individual
> frames cannot normally be played, unless they are keyframes. You should
> play the complete segment "playlist" as a whole. ffplay will have
> trouble identifying the streams and codecs in such a short sample:
> I have add keyframes
>

 I have added the keyframes option in ffmpeg command as *ffmpeg -f alsa
-thread_queue_size 1024 -i hw:0 -f video4linux2 -i /dev/video0 -c:a aac -ar
48k -t 0:10 -segment_time 00:00.04 -f segment sample-%003d.aac -c:v h264
-force_key_frames "expr:gte(t,n_forced*0.04)" -pix_fmt yuv420p -s:v 640x480
-t 0:10 -r 25 -g 1 -segment_time 00:00.04 -f segment frame-%003d.h264. *But
still I get an error as *frame-001.h264: Invalid data found when processing
input.*

*Console Output:*
configuration: --prefix=/usr --extra-version=0ubuntu0.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
  libavformat57. 83.100 / 57. 83.100
  libavdevice57. 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
  libpostproc54.  7.100 / 54.  7.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, alsa, from 'hw:0':
  Duration: N/A, start: 1610338632.931406, 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: 3405.427360, bitrate: 147456 kb/s
Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480,
147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> aac (native))
  Stream #1:0 -> #1:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[alsa @ 0x55777d96fe00] ALSA buffer xrun.
[segment @ 0x55777d983d80] Opening 'sample-000.aac' for writing
Output #0, segment, to 'sample-%003d.aac':
  Metadata:
encoder : Lavf57.83.100
Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 128 kb/s
Metadata:
  encoder : Lavc57.107.100 aac
[libx264 @ 0x55777d98fa20] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2
[libx264 @ 0x55777d98fa20] profile High, level 3.0
[libx264 @ 0x55777d98fa20] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options:
cabac=1 ref=1 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=1
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=1
keyint_min=1 scenecut=40 intra_refresh=0 rc=crf mbtree=0 crf=23.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[segment @ 0x55777d98dda0] Opening 'frame-000.h264' for writing
Output #1, segment, to 'frame-%003d.h264':
  Metadata:
encoder : Lavf57.83.100
Stream #1:0: Video: h264 (libx264), yuv420p, 640x480, q=-1--1, 25 fps,
25 tbn, 25 tbc
Metadata:
  encoder : Lavc57.107.100 libx264
Side data:
  cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
[segment @ 0x55777d983d80] Opening 'sample-001.aac' for writing
[segment @ 0x55777d98dda0] Opening 'frame-001.h264' for writing
[segment @ 0x55777d98dda0] Opening 'frame-002.h264' for writing
[segment @ 0x55777d98dda0] Opening 'frame-003.h264' for writing
[segment @ 0x55777d98dda0] Opening 'frame-004.h264' for writing
[segment @ 0x55777d98dda0] Opening 'frame-005.h264' for writing
[segment @ 0x55777d98dda0] Opening 'frame-006.h264' for writingA dup=1
drop=0 speed=1.07x
...
[segment @ 0x55777d98dda0] Opening 'frame-018.h264' for writingA dup=5
drop=0 speed=0.714x
...
[segment @ 0x55777d98dda0] Opening 'frame-029.h264' for writingA dup=12
drop=0 speed=0.768x
...
[s

Re: [FFmpeg-user] Unable to play recorded audio and video from webcam using ffmpeg

2021-01-09 Thread Vijay Rakesh Munganda
Hi Moritz, 

> 
> "-segment_time 00:00.040"?
> Are you trying to create a segment for each single frame?
> 

No, I’m trying to create h264 video and aac audio of every 40ms continuously 
upto 10s. So that I can send these video and audio files as a fragments to the 
AWS kinesis video streams, at cloud end it will get combined for playing. When 
I use ffplay on these samples it plays video, but not audio 
https://github.com/awslabs/amazon-kinesis-video-streams-producer-c/tree/master/samples.
 I want to generate similar video and audio files from webcam. Since I’m new to 
ffmpeg I’m unable write correct ffmpeg command, kindly please suggest me. 

Thanks & Regards,
Vijay Rakesh

> On 09-Jan-2021, at 19:51, Moritz Barsnick  wrote:
> 
> Hi Vijay,
> 
>> On Sat, Jan 09, 2021 at 14:33:59 +0530, Vijay Rakesh Munganda wrote:
>> ffmpeg -f alsa -thread_queue_size 1024 -i hw:0 -f video4linux2 -i 
>> /dev/video0 -c:a aac -t 0:10 -segment_time 00:00.040
>> -f segment sample-%003d.aac -c:v libx264 -s:v 640x480 -t 0:10 -r 25 -g 1 
>> -segment_time 00:00.040 -f segment frame-%003d.h264
> 
> "-segment_time 00:00.040"?
> Are you trying to create a segment for each single frame?
> 
> Assuming ffmpeg actually segments like this (and not on keyframes): Individual
> frames cannot normally be played, unless they are keyframes. You should
> play the complete segment "playlist" as a whole. ffplay will have
> trouble identifying the streams and codecs in such a short sample:
> 
>> [h264 @ 0x7f122b80] Format h264 detected only with low score of 1, 
>> misdetection possible!
> [...]
>> [aac @ 0x7f0ce8000b80] Format aac detected only with low score of 1, 
>> misdetection possible!
> 
> The other errors likely also come from missing references.
> 
>> [aac @ 0x7f0ce8000b80] Estimating duration from bitrate, this may be 
>> inaccurate
>> Input #0, aac, from 'sample-000.aac':
>>  Duration: 00:00:00.04, bitrate: 109 kb/s
>>Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 109 kb/s
>>  13.16 M-A:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0
> 
> Please remember to always post the complete, uncut console output of
> the errored command, in this case ffplay. The output of ffmpeg would
> also have been helpful, but perhaps, in this case, your edited output
> may be enough.
> 
> Regards,
> Moritz
> ___
> 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".

Re: [FFmpeg-user] Unable to play recorded audio and video from webcam using ffmpeg

2021-01-09 Thread Moritz Barsnick
Hi Vijay,

On Sat, Jan 09, 2021 at 14:33:59 +0530, Vijay Rakesh Munganda wrote:
> ffmpeg -f alsa -thread_queue_size 1024 -i hw:0 -f video4linux2 -i /dev/video0 
> -c:a aac -t 0:10 -segment_time 00:00.040
> -f segment sample-%003d.aac -c:v libx264 -s:v 640x480 -t 0:10 -r 25 -g 1 
> -segment_time 00:00.040 -f segment frame-%003d.h264

"-segment_time 00:00.040"?
Are you trying to create a segment for each single frame?

Assuming ffmpeg actually segments like this (and not on keyframes): Individual
frames cannot normally be played, unless they are keyframes. You should
play the complete segment "playlist" as a whole. ffplay will have
trouble identifying the streams and codecs in such a short sample:

> [h264 @ 0x7f122b80] Format h264 detected only with low score of 1, 
> misdetection possible!
[...]
> [aac @ 0x7f0ce8000b80] Format aac detected only with low score of 1, 
> misdetection possible!

The other errors likely also come from missing references.

> [aac @ 0x7f0ce8000b80] Estimating duration from bitrate, this may be 
> inaccurate
> Input #0, aac, from 'sample-000.aac':
>   Duration: 00:00:00.04, bitrate: 109 kb/s
> Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 109 kb/s
>   13.16 M-A:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0

Please remember to always post the complete, uncut console output of
the errored command, in this case ffplay. The output of ffmpeg would
also have been helpful, but perhaps, in this case, your edited output
may be enough.

Regards,
Moritz
___
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] Unable to play recorded audio and video from webcam using ffmpeg

2021-01-09 Thread Vijay Rakesh Munganda
Hi Carl,

Just now gone through the documentation, and got know -r used for FPS. So I had 
made changes and executed the command as follows, 
but I got the same following errors while playing using ffplay. Kindly please 
help me in this regard.

Command:
ffmpeg -f alsa -thread_queue_size 1024 -i hw:0 -f video4linux2 -i /dev/video0 
-c:a aac -t 0:10 -segment_time 00:00.040 
-f segment sample-%003d.aac -c:v libx264 -s:v 640x480 -t 0:10 -r 25 -g 1 
-segment_time 00:00.040 -f segment frame-%003d.h264

Video Error:
frame-000.h264: Invalid data found when processing input 0B f=0/0   
nan:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0 
frame-001.h264:
[h264 @ 0x7f122b80] Format h264 detected only with low score of 1, 
misdetection possible!
[h264 @ 0x7f12200022c0] non-existing PPS 0 referenced0B f=0/0   
[h264 @ 0x7f12200022c0] non-existing PPS 0 referenced0B f=0/0   
[h264 @ 0x7f12200022c0] decode_slice_header error
[h264 @ 0x7f12200022c0] no frame!
[h264 @ 0x7f122b80] decoding for stream 0 failed
[h264 @ 0x7f122b80] Could not find codec parameters for stream 0 (Video: 
h264, none): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, h264, from 'frame-001.h264':
  Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264, none, 25 tbr, 1200k tbn, 50 tbc
[h264 @ 0x7f1220005d20] non-existing PPS 0 referenced
[h264 @ 0x7f1220005d20] decode_slice_header error

Audio Error: (Audio should play for 40ms, but window pop-up plays for 13.16s)
[aac @ 0x7f0ce8000b80] Format aac detected only with low score of 1, 
misdetection possible!
[aac @ 0x7f0ce8000b80] Estimating duration from bitrate, this may be inaccurate
Input #0, aac, from 'sample-000.aac':
  Duration: 00:00:00.04, bitrate: 109 kb/s
Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp, 109 kb/s
  13.16 M-A:  0.000 fd=   0 aq=0KB vq=0KB sq=0B f=0/0  

Thanks & Regards,
Vijay Rakesh. 

> On 09-Jan-2021, at 10:43, Vijay Rakesh Munganda 
>  wrote:
> 
> Hi Carl,
> 
> Thanks for the reply.  -f 25 for encoding the video in 25 FPS (because 1000 
> milliseconds / 40 milliseconds = 25 frames) and tell FFmpeg to use every 
> frame as a key frame (-g 1).
> 
> Thanks & Regards,
> Vijay Rakesh
> 
>>> On 09-Jan-2021, at 01:04, Carl Eugen Hoyos  wrote:
>>> 
>> 
>> 
>>> Am 08.01.2021 um 17:17 schrieb Vijay Rakesh Munganda 
>>> :
>>> 
>>> ffmpeg -f alsa -thread_queue_size 1024 -i hw:0 -f video4linux2 -i 
>>> /dev/video0 -c:a aac -t 0:10 -segment_time 00:00.040 -f segment 
>>> sample-%003d.aac -c:v libx264 -t -f 25 -g 1 0:10 -segment_time 00:00.040 -f 
>>> segment frame-%003d.h264
>> 
>> Complete, uncut console output missing.
>> -f 25 looks wrong, did you mean -r 25?
>> 
>> Carl Eugen
>> ___
>> 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".

Re: [FFmpeg-user] Unable to play recorded audio and video from webcam using ffmpeg

2021-01-08 Thread Vijay Rakesh Munganda
Hi Carl,

Thanks for the reply.  -f 25 for encoding the video in 25 FPS (because 1000 
milliseconds / 40 milliseconds = 25 frames) and tell FFmpeg to use every frame 
as a key frame (-g 1).

Thanks & Regards,
Vijay Rakesh

> On 09-Jan-2021, at 01:04, Carl Eugen Hoyos  wrote:
> 
> 
> 
>> Am 08.01.2021 um 17:17 schrieb Vijay Rakesh Munganda 
>> :
>> 
>> ffmpeg -f alsa -thread_queue_size 1024 -i hw:0 -f video4linux2 -i 
>> /dev/video0 -c:a aac -t 0:10 -segment_time 00:00.040 -f segment 
>> sample-%003d.aac -c:v libx264 -t -f 25 -g 1 0:10 -segment_time 00:00.040 -f 
>> segment frame-%003d.h264
> 
> Complete, uncut console output missing.
> -f 25 looks wrong, did you mean -r 25?
> 
> Carl Eugen
> ___
> 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".

Re: [FFmpeg-user] Unable to play recorded audio and video from webcam using ffmpeg

2021-01-08 Thread Carl Eugen Hoyos


> Am 08.01.2021 um 17:17 schrieb Vijay Rakesh Munganda 
> :
> 
> ffmpeg -f alsa -thread_queue_size 1024 -i hw:0 -f video4linux2 -i /dev/video0 
> -c:a aac -t 0:10 -segment_time 00:00.040 -f segment sample-%003d.aac -c:v 
> libx264 -t -f 25 -g 1 0:10 -segment_time 00:00.040 -f segment frame-%003d.h264

Complete, uncut console output missing.
-f 25 looks wrong, did you mean -r 25?

Carl Eugen
___
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] Unable to play recorded audio and video from webcam using ffmpeg

2021-01-08 Thread Vijay Rakesh Munganda
Hi, 

I’m trying to record audio and video from webcam with ffmpeg using below 
command, but I’m unable to play all generated files using ffplay. 

Command: 

ffmpeg -f alsa -thread_queue_size 1024 -i hw:0 -f video4linux2 -i /dev/video0 
-c:a aac -t 0:10 -segment_time 00:00.040 -f segment sample-%003d.aac -c:v 
libx264 -t -f 25 -g 1 0:10 -segment_time 00:00.040 -f segment frame-%003d.h264

Error: 

 Audio Error:Format mpegts detected only with low score of 2, misdetection 
possible! Could not detect TS packet size, defaulting to 
non-FEC/DVHSsample-005.aac: could not find codec parameters Format aac detected 
only with low score of 1, misdetection possible! Estimating duration from 
bitrate, this may be inaccurate

Video Error:
frame-006.h264: Invalid data found when processing input=0/0

Kindly please suggest me. 

Thanks & Regards,
Vijay Rakesh
___
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".