Opened 11 years ago

Last modified 11 years ago

#2478 new defect

PTS: DTS: invalid, clipping when recording alsa

Reported by: Jean-Pierre Owned by:
Priority: normal Component: avdevice
Version: git-master Keywords: alsa
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

Summary of the bug: I am trying to capture S-VHS with a Dazzle DVC100 device.

I run a build without v4l2.
I capture 1 mn with a synchro A/V film. With VLC I get a good sync in direct play.

I get the following error when recording with ffmpeg:

$ ffmpeg -debug 1 -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -f v4l2 -channel 1 -input_format yuyv422 -i /dev/video0 -map 0:a -map 1:v -c:a pcm_s16le -c:v ffv1 /Store3/Test/pcm_ffv1_`date +%m%d_%H%M`.avi
ffmpeg version N-52061-g8137ea3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 13 2013 21:10:51 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
  configuration: --prefix=/opt/ffmpeg-opt/usr --enable-shared --bindir=/opt/ffmpeg-opt/usr/bin --datadir=/opt/ffmpeg-opt/usr/share/ffmpeg-opt --incdir=/opt/ffmpeg-opt/usr/include/ffmpeg-opt --libdir=/opt/ffmpeg-opt/usr/lib64 --mandir=/opt/ffmpeg-opt/usr/share/man --shlibdir=/opt/ffmpeg-opt/usr/lib64 --arch=x86_64 --optflags='-O2 -g' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --disable-libv4l2 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --build-suffix=1 --disable-doc --enable-runtime-cpudetect
  libavutil      52. 26.100 / 52. 26.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  2.100 / 55.  2.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 53.101 /  3. 53.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout' (set channel layout) with argument 'stereo'.
Reading option '-i' ... matched as input file with argument 'hw:0,0'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-channel' ... matched as AVOption 'channel' with argument '1'.
Reading option '-input_format' ... matched as AVOption 'input_format' with argument 'yuyv422'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:a'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:v'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'pcm_s16le'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'ffv1'.
Reading option '/Store3/Test/pcm_ffv1_0418_1024.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file hw:0,0.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Successfully parsed a group of options.
Opening an input file: hw:0,0.
[alsa @ 0x22f5220] All info found
Input #0, alsa, from 'hw:0,0':
  Duration: N/A, start: 1366277089.951533, bitrate: 1536 kb/s
    Stream #0:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x2316ec0] fd:4 capabilities:5020041
[video4linux2,v4l2 @ 0x2316ec0] Selecting input_channel: 1
[video4linux2,v4l2 @ 0x2316ec0] Current input_channel: 1, input_name: S-Video
[video4linux2,v4l2 @ 0x2316ec0] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x2316ec0] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x2316ec0] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x2316ec0] Current standard: PAL, id: 255, frameperiod: 1/25
[video4linux2,v4l2 @ 0x2316ec0] All info found
Input #1, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 1366277090.571670, bitrate: 165888 kb/s
    Stream #1:0, 1, 1/1000000: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576, 1/1000000, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: output file /Store3/Test/pcm_ffv1_0418_1024.avi.
Applying option map (set input stream mapping) with argument 0:a.
Applying option map (set input stream mapping) with argument 1:v.
Applying option c:a (codec name) with argument pcm_s16le.
Applying option c:v (codec name) with argument ffv1.
Successfully parsed a group of options.
Opening an output file: /Store3/Test/pcm_ffv1_0418_1024.avi.
Successfully opened the file.
[graph 0 input from stream 0:0 @ 0x22f4c40] Setting 'time_base' to value '1/48000'
[graph 0 input from stream 0:0 @ 0x22f4c40] Setting 'sample_rate' to value '48000'
[graph 0 input from stream 0:0 @ 0x22f4c40] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 0:0 @ 0x22f4c40] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 0:0 @ 0x22f4c40] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[audio format for output stream 0:0 @ 0x22fc8e0] Setting 'sample_fmts' to value 's16'
[AVFilterGraph @ 0x2317f40] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
[graph 1 input from stream 1:0 @ 0x22fe600] Setting 'video_size' to value '720x576'
[graph 1 input from stream 1:0 @ 0x22fe600] Setting 'pix_fmt' to value '1'
[graph 1 input from stream 1:0 @ 0x22fe600] Setting 'time_base' to value '1/1000000'
[graph 1 input from stream 1:0 @ 0x22fe600] Setting 'pixel_aspect' to value '0/1'
[graph 1 input from stream 1:0 @ 0x22fe600] Setting 'sws_param' to value 'flags=2'
[graph 1 input from stream 1:0 @ 0x22fe600] Setting 'frame_rate' to value '25/1'
[graph 1 input from stream 1:0 @ 0x22fe600] w:720 h:576 pixfmt:yuyv422 tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0x22ff480] compat: called with args=[yuv420p|yuva420p|yuva422p|yuv444p|yuva444p|yuv440p|yuv422p|yuv411p|yuv410p|bgr0|bgra|yuv420p16le|yuv422p16le|yuv444p16le|yuv444p9le|yuv422p9le|yuv420p9le|yuv420p10le|yuv422p10le|yuv444p10le|gray16le|gray|gbrp9le|gbrp10le|gbrp12le|gbrp14le]
[format @ 0x22ff480] Setting 'pix_fmts' to value 'yuv420p|yuva420p|yuva422p|yuv444p|yuva444p|yuv440p|yuv422p|yuv411p|yuv410p|bgr0|bgra|yuv420p16le|yuv422p16le|yuv444p16le|yuv444p9le|yuv422p9le|yuv420p9le|yuv420p10le|yuv422p10le|yuv444p10le|gray16le|gray|gbrp9le|gbrp10le|gbrp12le|gbrp14le'
[auto-inserted scaler 0 @ 0x22ff2a0] Setting 'w' to value '0'
[auto-inserted scaler 0 @ 0x22ff2a0] Setting 'h' to value '0'
[auto-inserted scaler 0 @ 0x22ff2a0] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0x22ff2a0] w:0 h:0 flags:'0x4' interl:0
[format @ 0x22ff480] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x22fe460] query_formats: 4 queried, 3 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0x22ff2a0] picking yuv422p out of 26 ref:yuyv422 alpha:0
[auto-inserted scaler 0 @ 0x22ff2a0] w:720 h:576 fmt:yuyv422 sar:0/1 -> w:720 h:576 fmt:yuv422p sar:0/1 flags:0x4
[ffv1 @ 0x2319260] detected 8 logical cores
Output #0, avi, to '/Store3/Test/pcm_ffv1_0418_1024.avi':
  Metadata:
    ISFT            : Lavf55.2.100
    Stream #0:0, 0, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
    Stream #0:1, 0, 1/25: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 720x576, 1/25, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
  Stream #1:0 -> #0:1 (rawvideo -> ffv1)
Press [q] to stop, [?] for help
st:0 PTS: 1278403 DTS: 1278403 < 1278404 invalid, clipping bitrate=31462.5kbits/s    
st:0 PTS: 1298738 DTS: 1298738 < 1298739 invalid, clipping bitrate=31479.7kbits/s    
[avi @ 0x23181c0] st:0 PTS: 1298827 DTS: 1298827 < 1298828 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 1298828 DTS: 1298828 < 1298829 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 1298829 DTS: 1298829 < 1298830 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 1298830 DTS: 1298830 < 1298831 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 1298831 DTS: 1298831 < 1298832 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 1298832 DTS: 1298832 < 1298833 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 1298833 DTS: 1298833 < 1298834 invalid, clipping
st:0 PTS: 1325059 DTS: 1325059 < 1325060 invalid, clipping bitrate=31472.5kbits/s    
st:0 PTS: 1346723 DTS: 1346723 < 1346724 invalid, clipping bitrate=31507.5kbits/s    
st:0 PTS: 1399222 DTS: 1399222 < 1399223 invalid, clipping bitrate=31526.6kbits/s    
[avi @ 0x23181c0] st:0 PTS: 1399713 DTS: 1399713 < 1399714 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 1399714 DTS: 1399714 < 1399715 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 1409742 DTS: 1409742 < 1409743 invalid, clipping

....[cut]....

[avi @ 0x23181c0] st:0 PTS: 2735025 DTS: 2735025 < 2735026 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 2735026 DTS: 2735026 < 2735027 invalid, clipping
st:0 PTS: 2738455 DTS: 2738455 < 2738456 invalid, clipping bitrate=31798.0kbits/s    
[avi @ 0x23181c0] st:0 PTS: 2746286 DTS: 2746286 < 2746287 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 2750202 DTS: 2750202 < 2750203 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 2752656 DTS: 2752656 < 2752657 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 2757558 DTS: 2757558 < 2757559 invalid, clipping
st:0 PTS: 2759610 DTS: 2759610 < 2759611 invalid, clipping bitrate=31821.6kbits/s    
[avi @ 0x23181c0] st:0 PTS: 2761571 DTS: 2761571 < 2761572 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 2771378 DTS: 2771378 < 2771379 invalid, clipping
st:0 PTS: 2787546 DTS: 2787546 < 2787547 invalid, clipping bitrate=31802.0kbits/s    
[avi @ 0x23181c0] st:0 PTS: 2795875 DTS: 2795875 < 2795876 invalid, clipping
[avi @ 0x23181c0] st:0 PTS: 2805205 DTS: 2805205 < 2805206 invalid, clipping
st:0 PTS: 2833986 DTS: 2833986 < 2833987 invalid, clipping bitrate=31830.9kbits/s    
[avi @ 0x23181c0] st:0 PTS: 2835452 DTS: 2835452 < 2835453 invalid, clipping
frame= 1507 fps= 25 q=0.0 Lsize=  236861kB time=00:01:00.85 bitrate=31887.0kbits/s    
video:225091kB audio:11410kB subtitle:0 global headers:0kB muxing overhead 0.152210%
14915 frames successfully decoded, 0 decoding errors
Statistics: 10 seeks, 20959 writeouts

But there is a desync, audio is late by around 0.5s (0.5s at the beginning and still 0.5s after 1mn).

I did more tests with the following:

Audio codec Video codec Container Result

pcm_s16le ffv1 avi invalid, clipping / desync
flac ffv1 avi No error / desync
ac3 ffv1 avi No error / desync
mp3 ffv1 avi No error / desync
mp2 ffv1 avi No error / desync

pcm_s16le huffyuv avi invalid, clipping / desync
flac huffyuv avi No error / desync
ac3 huffyuv avi No error / desync
mp3 huffyuv avi No error / desync
mp2 huffyuv avi No error / desync

pcm_s16le ffv1 mkv No error / desync
flac ffv1 mkv No error / desync
ac3 ffv1 mkv No error / desync
mp3 ffv1 mkv No error / desync
mp2 ffv1 mkv No error / desync

pcm_s16le huffyuv mkv No error / desync
flac huffyuv mkv No error / desync
ac3 huffyuv mkv No error / desync
mp3 huffyuv mkv No error / desync
mp2 huffyuv mkv No error / desync

Seems that the desync is not related to the invalid, clipping.

If you need more info or tests don't hesitate to ask me.

Change History (11)

comment:1 by Carl Eugen Hoyos, 11 years ago

Description: modified (diff)

Does it help if you move the alsa input behind the v4l2 input?
(ffmpeg -f v4l2 -i ... -f alsa -i ...)

Last edited 11 years ago by Carl Eugen Hoyos (previous) (diff)

comment:2 by Jean-Pierre, 11 years ago

Please go directly to comment 3

$ ffmpeg -f v4l2 -debug 1 -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -channel 1 -input_format yuyv422 -i /dev/video0 -map 0:a -map 1:v -c:a pcm_s16le -c:v ffv1 /Store3/Test/pcm_ffv1_date +%m%d_%H%M.avi
ffmpeg version N-52061-g8137ea3 Copyright (c) 2000-2013 the FFmpeg developers

built on Apr 13 2013 21:10:51 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --prefix=/opt/ffmpeg-opt/usr --enable-shared --bindir=/opt/ffmpeg-opt/usr/bin --datadir=/opt/ffmpeg-opt/usr/share/ffmpeg-opt --incdir=/opt/ffmpeg-opt/usr/include/ffmpeg-opt --libdir=/opt/ffmpeg-opt/usr/lib64 --mandir=/opt/ffmpeg-opt/usr/share/man --shlibdir=/opt/ffmpeg-opt/usr/lib64 --arch=x86_64 --optflags='-O2 -g' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --disable-libv4l2 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --build-suffix=1 --disable-doc --enable-runtime-cpudetect
libavutil 52. 26.100 / 52. 26.100
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 2.100 / 55. 2.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 53.101 / 3. 53.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100

matched as AVOption 'debug' with argument '1'.

Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout' (set channel layout) with argument 'stereo'.
Reading option '-i' ... matched as input file with argument 'hw:0,0'.
Reading option '-channel' ... matched as AVOption 'channel' with argument '1'.
Reading option '-input_format' ... matched as AVOption 'input_format' with argument 'yuyv422'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:a'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:v'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'pcm_s16le'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'ffv1'.
Reading option '/Store3/Test/pcm_ffv1_0418_1539.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file hw:0,0.
Applying option f (force format) with argument v4l2.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Successfully parsed a group of options.
Opening an input file: hw:0,0.
[alsa @ 0x1f0d240] All info found
Input #0, alsa, from 'hw:0,0':

Duration: N/A, start: 1366295969.051482, bitrate: 1536 kb/s

Stream #0:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s

Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[AVIOContext @ 0x1f2cca0] Statistics: 1048576 bytes read, 0 seeks
/dev/video0: Invalid data found when processing input

and

$ ffmpeg -debug 1 -f v4l2 -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -channel 1 -input_format yuyv422 -i /dev/video0 -map 0:a -map 1:v -c:a pcm_s16le -c:v ffv1 /Store3/Test/pcm_ffv1_date +%m%d_%H%M.avi
ffmpeg version N-52061-g8137ea3 Copyright (c) 2000-2013 the FFmpeg developers

built on Apr 13 2013 21:10:51 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --prefix=/opt/ffmpeg-opt/usr --enable-shared --bindir=/opt/ffmpeg-opt/usr/bin --datadir=/opt/ffmpeg-opt/usr/share/ffmpeg-opt --incdir=/opt/ffmpeg-opt/usr/include/ffmpeg-opt --libdir=/opt/ffmpeg-opt/usr/lib64 --mandir=/opt/ffmpeg-opt/usr/share/man --shlibdir=/opt/ffmpeg-opt/usr/lib64 --arch=x86_64 --optflags='-O2 -g' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --disable-libv4l2 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --build-suffix=1 --disable-doc --enable-runtime-cpudetect
libavutil 52. 26.100 / 52. 26.100
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 2.100 / 55. 2.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 53.101 / 3. 53.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100

matched as AVOption 'debug' with argument '1'.

Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout' (set channel layout) with argument 'stereo'.
Reading option '-i' ... matched as input file with argument 'hw:0,0'.
Reading option '-channel' ... matched as AVOption 'channel' with argument '1'.
Reading option '-input_format' ... matched as AVOption 'input_format' with argument 'yuyv422'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:a'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:v'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'pcm_s16le'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'ffv1'.
Reading option '/Store3/Test/pcm_ffv1_0418_1539.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file hw:0,0.
Applying option f (force format) with argument v4l2.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Successfully parsed a group of options.
Opening an input file: hw:0,0.
[alsa @ 0x20592c0] All info found
Input #0, alsa, from 'hw:0,0':

Duration: N/A, start: 1366295990.719459, bitrate: 1536 kb/s

Stream #0:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s

Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[AVIOContext @ 0x2078da0] Statistics: 1048576 bytes read, 0 seeks
/dev/video0: Invalid data found when processing input

Last edited 11 years ago by Jean-Pierre (previous) (diff)

comment:3 by Jean-Pierre, 11 years ago

May be I didn't understand what you asked me. Another try:

ffmpeg -f v4l2 -channel 1 -input_format yuyv422 -i /dev/video0 -debug 1 -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -map 1:a -map 0:v -c:a pcm_s16le -c:v ffv1 /Store3/Test/pcm_ffv1_date +%m%d_%H%M.avi

I put the video input first, then audio and had to change the map.
Still the same error invalid, clipping

in reply to:  3 comment:4 by Carl Eugen Hoyos, 11 years ago

Replying to MrNice:

May be I didn't understand what you asked me. Another try:

ffmpeg -f v4l2 -channel 1 -input_format yuyv422 -i /dev/video0 -debug 1 -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -map 1:a -map 0:v -c:a pcm_s16le -c:v ffv1 /Store3/Test/pcm_ffv1_date +%m%d_%H%M.avi

I put the video input first, then audio and had to change the map.

(Unrelated: You could just remove the map options.)

Still the same error invalid, clipping

I wondered if the A/V sync issue is fixed now?

comment:5 by Jean-Pierre, 11 years ago

You are right, audio and video are perfectly sync when the command is in this order.
Thanks a lot for that.

Any idea for the DTS/PTS invalid, clipping ?

comment:6 by Jean-Pierre, 11 years ago

I did other try to confirm the PTS/DST invalid, clipping error.

$ ffmpeg -debug 1 -f v4l2 -channel 1 -input_format yuyv422 -i /dev/video0 -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -map 0:v -map 1:a -c:a pcm_s16le -c:v ffv1 /Store3/Test/pcm_ffv1_date +%m%d_%H%M.avi
ffmpeg version N-52061-g8137ea3 Copyright (c) 2000-2013 the FFmpeg developers

built on Apr 13 2013 21:10:51 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --prefix=/opt/ffmpeg-opt/usr --enable-shared --bindir=/opt/ffmpeg-opt/usr/bin --datadir=/opt/ffmpeg-opt/usr/share/ffmpeg-opt --incdir=/opt/ffmpeg-opt/usr/include/ffmpeg-opt --libdir=/opt/ffmpeg-opt/usr/lib64 --mandir=/opt/ffmpeg-opt/usr/share/man --shlibdir=/opt/ffmpeg-opt/usr/lib64 --arch=x86_64 --optflags='-O2 -g' --enable-bzlib --disable-crystalhd --enable-gnutls --enable-libass --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libx264 --disable-libv4l2 --enable-libxvid --enable-x11grab --enable-avfilter --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --build-suffix=1 --disable-doc --enable-runtime-cpudetect
libavutil 52. 26.100 / 52. 26.100
libavcodec 55. 2.100 / 55. 2.100
libavformat 55. 2.100 / 55. 2.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 53.101 / 3. 53.101
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100

matched as AVOption 'debug' with argument '1'.

Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-channel' ... matched as AVOption 'channel' with argument '1'.
Reading option '-input_format' ... matched as AVOption 'input_format' with argument 'yuyv422'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout' (set channel layout) with argument 'stereo'.
Reading option '-i' ... matched as input file with argument 'hw:0,0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:a'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'pcm_s16le'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'ffv1'.
Reading option '/Store3/Test/pcm_ffv1_0423_1621.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x2600e80] fd:4 capabilities:5020041
[video4linux2,v4l2 @ 0x2600e80] Selecting input_channel: 1
[video4linux2,v4l2 @ 0x2600e80] Current input_channel: 1, input_name: S-Video
[video4linux2,v4l2 @ 0x2600e80] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x2600e80] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x2600e80] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x2600e80] Current standard: PAL, id: 255, frameperiod: 1/25
[video4linux2,v4l2 @ 0x2600e80] All info found
Input #0, video4linux2,v4l2, from '/dev/video0':

Duration: N/A, start: 1366730482.825332, bitrate: 165888 kb/s

Stream #0:0, 1, 1/1000000: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576, 1/1000000, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc

Successfully opened the file.
Parsing a group of options: input file hw:0,0.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Successfully parsed a group of options.
Opening an input file: hw:0,0.
[alsa @ 0x2602ac0] All info found
Input #1, alsa, from 'hw:0,0':

Duration: N/A, start: 1366730482.829165, bitrate: 1536 kb/s

Stream #1:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s

Successfully opened the file.
Parsing a group of options: output file /Store3/Test/pcm_ffv1_0423_1621.avi.
Applying option map (set input stream mapping) with argument 0:v.
Applying option map (set input stream mapping) with argument 1:a.
Applying option c:a (codec name) with argument pcm_s16le.
Applying option c:v (codec name) with argument ffv1.
Successfully parsed a group of options.
Opening an output file: /Store3/Test/pcm_ffv1_0423_1621.avi.
Successfully opened the file.
[graph 0 input from stream 0:0 @ 0x2621400] Setting 'video_size' to value '720x576'
[graph 0 input from stream 0:0 @ 0x2621400] Setting 'pix_fmt' to value '1'
[graph 0 input from stream 0:0 @ 0x2621400] Setting 'time_base' to value '1/1000000'
[graph 0 input from stream 0:0 @ 0x2621400] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0x2621400] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x2621400] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x2621400] w:720 h:576 pixfmt:yuyv422 tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0x260a400] compat: called with args=[yuv420p|yuva420p|yuva422p|yuv444p|yuva444p|yuv440p|yuv422p|yuv411p|yuv410p|bgr0|bgra|yuv420p16le|yuv422p16le|yuv444p16le|yuv444p9le|yuv422p9le|yuv420p9le|yuv420p10le|yuv422p10le|yuv444p10le|gray16le|gray|gbrp9le|gbrp10le|gbrp12le|gbrp14le]
[format @ 0x260a400] Setting 'pix_fmts' to value 'yuv420p|yuva420p|yuva422p|yuv444p|yuva444p|yuv440p|yuv422p|yuv411p|yuv410p|bgr0|bgra|yuv420p16le|yuv422p16le|yuv444p16le|yuv444p9le|yuv422p9le|yuv420p9le|yuv420p10le|yuv422p10le|yuv444p10le|gray16le|gray|gbrp9le|gbrp10le|gbrp12le|gbrp14le'
[auto-inserted scaler 0 @ 0x2608e80] Setting 'w' to value '0'
[auto-inserted scaler 0 @ 0x2608e80] Setting 'h' to value '0'
[auto-inserted scaler 0 @ 0x2608e80] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0x2608e80] w:0 h:0 flags:'0x4' interl:0
[format @ 0x260a400] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x2600ba0] query_formats: 4 queried, 3 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0x2608e80] picking yuv422p out of 26 ref:yuyv422 alpha:0
[auto-inserted scaler 0 @ 0x2608e80] w:720 h:576 fmt:yuyv422 sar:0/1 -> w:720 h:576 fmt:yuv422p sar:0/1 flags:0x4
[graph 1 input from stream 1:0 @ 0x2609680] Setting 'time_base' to value '1/48000'
[graph 1 input from stream 1:0 @ 0x2609680] Setting 'sample_rate' to value '48000'
[graph 1 input from stream 1:0 @ 0x2609680] Setting 'sample_fmt' to value 's16'
[graph 1 input from stream 1:0 @ 0x2609680] Setting 'channel_layout' to value '0x3'
[graph 1 input from stream 1:0 @ 0x2609680] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[audio format for output stream 0:1 @ 0x2609200] Setting 'sample_fmts' to value 's16'
[AVFilterGraph @ 0x2609880] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
[ffv1 @ 0x2624540] detected 8 logical cores
Output #0, avi, to '/Store3/Test/pcm_ffv1_0423_1621.avi':

Metadata:

ISFT : Lavf55.2.100
Stream #0:0, 0, 1/25: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 720x576, 1/25, q=2-31, 200 kb/s, 25 tbn, 25 tbc
Stream #0:1, 0, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s

Stream mapping:

Stream #0:0 -> #0:0 (rawvideo -> ffv1)
Stream #1:0 -> #0:1 (pcm_s16le -> pcm_s16le)

Press [q] to stop, ? for help
st:0 PTS: 31659 DTS: 31659 < 31660 invalid, clipping:00.52 bitrate=32304.5kbits/s
[avi @ 0x2623dc0] st:0 PTS: 34594 DTS: 34594 < 34595 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 38009 DTS: 38009 < 38010 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 38495 DTS: 38495 < 38496 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 40451 DTS: 40451 < 40452 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 44851 DTS: 44851 < 44852 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 44852 DTS: 44852 < 44853 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 46318 DTS: 46318 < 46319 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 46319 DTS: 46319 < 46320 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 47783 DTS: 47783 < 47784 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 47784 DTS: 47784 < 47785 invalid, clipping
st:0 PTS: 50707 DTS: 50707 < 50708 invalid, clipping:01.04 bitrate=30989.3kbits/s
[avi @ 0x2623dc0] st:0 PTS: 52170 DTS: 52170 < 52171 invalid, clipping
[avi @ 0x2623dc0] st:0 PTS: 53141 DTS: 53141 < 53142 invalid, clipping

Audio codec, Video codec, Container, Result

There is invalid, clipping with
pcm_s16le ffv1 avi
pcm_s16le huffyuv avi
pcm_alaw ffv1 avi
pcm_f32le ffv1 avi
pcm_mulaw ffv1 avi

There is NO invalid, clipping message with the following
flac ffv1 avi
ac3 ffv1 avi
mp3 ffv1 avi
mp2 ffv1 avi

flac huffyuv avi
ac3 huffyuv avi
mp3 huffyuv avi
mp2 huffyuv avi

pcm_s16le ffv1 mkv
flac ffv1 mkv
ac3 ffv1 mkv
mp3 ffv1 mkv
mp2 ffv1 mkv

pcm_s16le huffyuv mkv
flac huffyuv mkv
ac3 huffyuv mkv
mp3 huffyuv mkv
mp2 huffyuv mkv

audio PCM and container AVI when associated give the message invalid, clipping.

what mean these messages.
I am ready to do more tests

comment:7 by Jean-Pierre, 11 years ago

I did other tests
ffmpeg-opt -debug 1 -vn -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -c:a pcm_s16le /Store3/Test/pcm_date +%m%d_%H%M.avi
ffmpeg-opt -debug 1 -vn -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -c:a pcm_s16le /Store3/Test/pcm_date +%m%d_%H%M.wav

and I got invalid, clipping and a very bad sound.

Moreover I tried the tests in the previous comment and these on another computer.
Everything is good, no clipping, good sound.
Maybe it's not a bug.

Sorry if I have caused you any inconvenience but I don't know why the message appears. Any idea?

comment:8 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavdevice
Keywords: alsa added
Version: unspecifiedgit-master

Does this issue also disappear if you remove setting SND_PCM_NONBLOCK flags in line 193 of libavdevice/alsa-audio-common.c ?

comment:9 by Carl Eugen Hoyos, 11 years ago

Summary: PTS: DTS: invalid, clipping with pcm audio codecPTS: DTS: invalid, clipping when recording alsa

comment:10 by Jean-Pierre, 11 years ago

I removed the line 193.
1st test, same command than comment 7

./ffmpeg -debug 1 -vn -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -c:a pcm_s16le out.wav
ffmpeg version N-53955-gd3e89f2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun 11 2013 15:29:15 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
  configuration: 
  libavutil      52. 35.100 / 52. 35.100
  libavcodec     55. 15.100 / 55. 15.100
  libavformat    55.  8.102 / 55.  8.102
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 75.101 /  3. 75.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
 matched as AVOption 'debug' with argument '1'.
Reading option '-vn' ... matched as option 'vn' (disable video) with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout' (set channel layout) with argument 'stereo'.
Reading option '-i' ... matched as input file with argument 'hw:0,0'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'pcm_s16le'.
Reading option 'out.wav' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file hw:0,0.
Applying option vn (disable video) with argument 1.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Successfully parsed a group of options.
Opening an input file: hw:0,0.
[alsa @ 0x1ec7d00] All info found
Input #0, alsa, from 'hw:0,0':
  Duration: N/A, start: 1371058668.112454, bitrate: 1536 kb/s
    Stream #0:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Successfully opened the file.
Parsing a group of options: output file out.wav.
Applying option c:a (codec name) with argument pcm_s16le.
Successfully parsed a group of options.
Opening an output file: out.wav.
File 'out.wav' already exists. Overwrite ? [y/N] y
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x1ec1300] Setting 'time_base' to value '1/48000'
[graph 0 input from stream 0:0 @ 0x1ec1300] Setting 'sample_rate' to value '48000'
[graph 0 input from stream 0:0 @ 0x1ec1300] Setting 'sample_fmt' to value 's16'
[graph 0 input from stream 0:0 @ 0x1ec1300] Setting 'channel_layout' to value '0x3'
[graph 0 input from stream 0:0 @ 0x1ec1300] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[audio format for output stream 0:0 @ 0x1ec17c0] Setting 'sample_fmts' to value 's16'
[AVFilterGraph @ 0x1ec78c0] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
Output #0, wav, to 'out.wav':
  Metadata:
    ISFT            : Lavf55.8.102
    Stream #0:0, 0, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
[alsa @ 0x1ec7d00] ALSA buffer xrun.
size=    2520kB time=00:00:16.37 bitrate=1260.8kbits/s    
video:0kB audio:2520kB subtitle:0 global headers:0kB muxing overhead 0.003100%
315 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x1ee3be0] Statistics: 4 seeks, 318 writeouts

Sound has what I call "tics" after some "bips"

2nd test, same command than comment 6

$ ./ffmpeg -debug 1 -f v4l2 -channel 1 -input_format yuyv422 -i /dev/video0 -f alsa -ac 2 -channel_layout stereo -i hw:0,0 -map 0:v -map 1:a -c:a pcm_s16le -c:v ffv1 out.avi
ffmpeg version N-53955-gd3e89f2 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun 11 2013 15:29:15 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
  configuration: 
  libavutil      52. 35.100 / 52. 35.100
  libavcodec     55. 15.100 / 55. 15.100
  libavformat    55.  8.102 / 55.  8.102
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 75.101 /  3. 75.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'v4l2'.
Reading option '-channel' ... matched as AVOption 'channel' with argument '1'.
Reading option '-input_format' ... matched as AVOption 'input_format' with argument 'yuyv422'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-f' ... matched as option 'f' (force format) with argument 'alsa'.
Reading option '-ac' ... matched as option 'ac' (set number of audio channels) with argument '2'.
Reading option '-channel_layout' ... matched as option 'channel_layout' (set channel layout) with argument 'stereo'.
Reading option '-i' ... matched as input file with argument 'hw:0,0'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '0:v'.
Reading option '-map' ... matched as option 'map' (set input stream mapping) with argument '1:a'.
Reading option '-c:a' ... matched as option 'c' (codec name) with argument 'pcm_s16le'.
Reading option '-c:v' ... matched as option 'c' (codec name) with argument 'ffv1'.
Reading option 'out.avi' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Successfully parsed a group of options.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x18c2420] fd:3 capabilities:5020041
[video4linux2,v4l2 @ 0x18c2420] Selecting input_channel: 1
[video4linux2,v4l2 @ 0x18c2420] Current input_channel: 1, input_name: S-Video
[video4linux2,v4l2 @ 0x18c2420] Querying the device for the current frame size
[video4linux2,v4l2 @ 0x18c2420] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x18c2420] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x18c2420] Current standard: PAL, id: 255, frameperiod: 1/25
[video4linux2,v4l2 @ 0x18c2420] All info found
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 1371059054.306878, bitrate: 165888 kb/s
    Stream #0:0, 1, 1/1000000: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 720x576, 1/1000000, 165888 kb/s, 25 fps, 25 tbr, 1000k tbn, 1000k tbc
Successfully opened the file.
Parsing a group of options: input file hw:0,0.
Applying option f (force format) with argument alsa.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Successfully parsed a group of options.
Opening an input file: hw:0,0.
[alsa @ 0x18c4100] All info found
Input #1, alsa, from 'hw:0,0':
  Duration: N/A, start: 1371059054.309044, bitrate: 1536 kb/s
    Stream #1:0, 1, 1/1000000: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s
Successfully opened the file.
Parsing a group of options: output file out.avi.
Applying option map (set input stream mapping) with argument 0:v.
Applying option map (set input stream mapping) with argument 1:a.
Applying option c:a (codec name) with argument pcm_s16le.
Applying option c:v (codec name) with argument ffv1.
Successfully parsed a group of options.
Opening an output file: out.avi.
File 'out.avi' already exists. Overwrite ? [y/N] y
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 0:0 @ 0x18a5280] Setting 'video_size' to value '720x576'
[graph 0 input from stream 0:0 @ 0x18a5280] Setting 'pix_fmt' to value '1'
[graph 0 input from stream 0:0 @ 0x18a5280] Setting 'time_base' to value '1/1000000'
[graph 0 input from stream 0:0 @ 0x18a5280] Setting 'pixel_aspect' to value '0/1'
[graph 0 input from stream 0:0 @ 0x18a5280] Setting 'sws_param' to value 'flags=2'
[graph 0 input from stream 0:0 @ 0x18a5280] Setting 'frame_rate' to value '25/1'
[graph 0 input from stream 0:0 @ 0x18a5280] w:720 h:576 pixfmt:yuyv422 tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0x18a6880] compat: called with args=[yuv420p|yuva420p|yuva422p|yuv444p|yuva444p|yuv440p|yuv422p|yuv411p|yuv410p|bgr0|bgra|yuv420p16le|yuv422p16le|yuv444p16le|yuv444p9le|yuv422p9le|yuv420p9le|yuv420p10le|yuv422p10le|yuv444p10le|gray16le|gray|gbrp9le|gbrp10le|gbrp12le|gbrp14le]
[format @ 0x18a6880] Setting 'pix_fmts' to value 'yuv420p|yuva420p|yuva422p|yuv444p|yuva444p|yuv440p|yuv422p|yuv411p|yuv410p|bgr0|bgra|yuv420p16le|yuv422p16le|yuv444p16le|yuv444p9le|yuv422p9le|yuv420p9le|yuv420p10le|yuv422p10le|yuv444p10le|gray16le|gray|gbrp9le|gbrp10le|gbrp12le|gbrp14le'
[auto-inserted scaler 0 @ 0x18a5fe0] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0x18a5fe0] w:iw h:ih flags:'0x4' interl:0
[format @ 0x18a6880] auto-inserting filter 'auto-inserted scaler 0' between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x18ab7e0] query_formats: 4 queried, 3 merged, 1 already done, 0 delayed
[auto-inserted scaler 0 @ 0x18a5fe0] picking yuv422p out of 26 ref:yuyv422 alpha:0
[auto-inserted scaler 0 @ 0x18a5fe0] w:720 h:576 fmt:yuyv422 sar:0/1 -> w:720 h:576 fmt:yuv422p sar:0/1 flags:0x4
[graph 1 input from stream 1:0 @ 0x18a9dc0] Setting 'time_base' to value '1/48000'
[graph 1 input from stream 1:0 @ 0x18a9dc0] Setting 'sample_rate' to value '48000'
[graph 1 input from stream 1:0 @ 0x18a9dc0] Setting 'sample_fmt' to value 's16'
[graph 1 input from stream 1:0 @ 0x18a9dc0] Setting 'channel_layout' to value '0x3'
[graph 1 input from stream 1:0 @ 0x18a9dc0] tb:1/48000 samplefmt:s16 samplerate:48000 chlayout:0x3
[audio format for output stream 0:1 @ 0x18aa380] Setting 'sample_fmts' to value 's16'
[AVFilterGraph @ 0x18abb60] query_formats: 4 queried, 9 merged, 0 already done, 0 delayed
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf55.8.102
    Stream #0:0, 0, 1/25: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 720x576, 1/25, q=2-31, 200 kb/s, 25 tbn, 25 tbc
    Stream #0:1, 0, 1/48000: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> ffv1)
  Stream #1:0 -> #0:1 (pcm_s16le -> pcm_s16le)
Press [q] to stop, [?] for help
[alsa @ 0x18c4100] ALSA buffer xrun.
*** drop!34 fps= 33 q=-1.0 size=   12461kB time=00:00:06.64 bitrate=15373.7kbits/s    
*** drop!10 fps= 29 q=-1.0 size=   20059kB time=00:00:09.68 bitrate=16975.1kbits/s dup=0 drop=1    
*** drop!74 fps= 28 q=-1.0 size=   26097kB time=00:00:12.24 bitrate=17466.0kbits/s dup=0 drop=2    
*** drop!50 fps= 28 q=-1.0 size=   33596kB time=00:00:15.28 bitrate=18011.9kbits/s dup=0 drop=3    
*** drop!26 fps= 27 q=-1.0 size=   40997kB time=00:00:18.32 bitrate=18332.3kbits/s dup=0 drop=4    
*** drop!89 fps= 27 q=-1.0 size=   47234kB time=00:00:20.84 bitrate=18567.1kbits/s dup=0 drop=5    
*** drop!66 fps= 27 q=-1.0 size=   54545kB time=00:00:23.92 bitrate=18680.5kbits/s dup=0 drop=6    
frame=  575 fps= 26 q=-1.0 Lsize=   55804kB time=00:00:24.28 bitrate=18828.2kbits/s dup=0 drop=7    
video:51696kB audio:4072kB subtitle:0 global headers:0kB muxing overhead 0.064798%
1091 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x18ea9c0] Statistics: 10 seeks, 2242 writeouts

Sound has what I call "tics" after some "bips"
and frames are dropped.

comment:11 by Jean-Pierre, 11 years ago

Hi cehoyos,
I am still waiting for your answer and to go further.

Note: See TracTickets for help on using tickets.