Posts: 13
Joined: Wed Aug 10, 2016 5:16 pm

Avconv audio problem - not working ?

Wed Jan 17, 2018 4:51 pm


I use an old video device and try to save it using avconv.

Here is the command line :

Code: Select all

avconv -f video4linux2 -i /dev/video0 -f alsa -ac 2 -i hw:2,0 -vcodec h264_omx -b 10200k -acodec libmp3lame -ar 48000 -ac 1 -ab 192k -vf yadif -y test.mp4
The problem in this case is that audio is blinking (working/not working) randomly...
Probably because avconv immeditaley fill the screen with these messages :
ALSA buffer xrun.20 q=-0.0 size= 352kB time=1.05 bitrate=2742.6kbits/s
Non-monotonous DTS in output stream 0:1; previous: 50472, current: 50274; changing to 50473. This may result in incorrect timestamps in the output file.
But when I use the exact same audio device with arecord, there is absolutely no problem.
Why ?

Also, I tried to record audio using arecord and pipe it to avconv :
arecord -d 0 -c 2 -D hw:2,0 -v -r 48000 -t wav -f S16_LE -M -q | avconv -f video4linux2 -i /dev/video0 -ac 2 -i pipe:0 -vcodec h264_omx -b 10200k -acodec libmp3lame -ar 48000 -ac 1 -ab 192k -vf yadif -y test.mp4
In this case, audio works *perfectly*.... But I got random audio offset async...

What can I do ?

It is not a device problem nor a CPU problem (not 100%).

Return to “Troubleshooting”

Who is online

Users browsing this forum: thagrol and 59 guests