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.mp4Probably because avconv immeditaley fill the screen with these messages :
But when I use the exact same audio device with arecord, there is absolutely no problem.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.
Why ?
Also, I tried to record audio using arecord and pipe it to avconv :
In this case, audio works *perfectly*.... But I got random audio offset async...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
What can I do ?
It is not a device problem nor a CPU problem (not 100%).