[FFmpeg-user] Error while playing record audio from webcam

Vijay Rakesh Munganda vijayrakeshmunganda at gmail.com
Tue Jan 19 06:57:16 EET 2021

Hi All, 

I’m using below command to create video and audio files for real time streaming to the cloud.

ffmpeg -f alsa -channels 1 -thread_queue_size 1024 -i hw:1 -f video4linux2 -i /dev/video0 -c:a aac -ar 48k -t 0:10 -segment_time 00:00.08 -f stream_segment sample-%003d.aac -c:v h264 -force_key_frames "expr:gte(t,n_forced*0.08)" -pix_fmt yuv420p -s:v 640x480 -t 0:10 -r 25 -g 1 -segment_time 00:00.08 -f stream_segment frame-%003d.h264

When I use ffplay on video clips it is playing, but when I run audio clips I get different errors for different segmented output as follows, and some clips play for more than 13s when segment given as 80ms. 

Error: sample-000.aac: Invalid data found when processing input 0B f=0/0

[mpegts @ 0x7f6f30000b80] Format mpegts detected only with low score of 2, misdetection possible! 

[mpegts @ 0x7f6f30000b80] Could not detect TS packet size, defaulting to non-FEC/DVHS sample-001.aac: could not find codec parameters

Did I miss anything in the command? 

Thanks & Regards,
Vijay Rakesh

Thanks & Regards,
Vijay Rakesh

More information about the ffmpeg-user mailing list