[FFmpeg-user] Capture from USB Dazzle: *** dropping frames

MrNice wxcvbn2006 at iol.ie
Thu Jul 30 13:21:51 CEST 2015


After 2 issues along this month (Statics when record with ffmpeg and
Could not write header for output file #0 (incorrect codec parameters ?))
my command is still not very good:

3 question about the following output:
- How to avoid
"*** dropping frame 9 from stream 0 at ts 7
*** dropping frame 14 from stream 0 at ts 12"
and more

- "Cliping frame in rate conversion by "
What does that mean? How to avoid?

- I use -ts mono2abs or -ts abs to sync audio and video. I don't see any
difference between them, only a message
"[video4linux2,v4l2 @ 0x1fc8f00] Detected monotonic timestamps, converting"
when mono2abs.
What is the best for my usage?

At this time, the output image is not good at all; It looks like a lot
of lines are missing, white areas are ribbed by black lines. I hope the
above fix will improve the image.

Thanks again.

JP


 ./ffmpeg -debug 1 -f pulse -ar 44100 -ac 2 -channel_layout stereo
-thread_queue_size 512 -i alsa_input.pci-0000_00_14.2.analog-stereo -f
v4l2 -ts mono2abs -channel 1 -pix_fmt yuyv422 -thread_queue_size 512 -i
/dev/video0 -c:v ffv1 -level 3 -pix_fmt yuv422p -c:a pcm_s16le
/Store3/Test/t_`date +%Y%m%d_%H%M`.mkv
ffmpeg version N-73832-g736a386 Copyright (c) 2000-2015 the FFmpeg
developers
  built with gcc 5.1.1 (GCC) 20150618 (Red Hat 5.1.1-4)
  configuration: --enable-libpulse --enable-gpl --enable-libx264
  libavutil      54. 28.100 / 54. 28.100
  libavcodec     56. 49.101 / 56. 49.101
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 25.100 /  5. 25.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
 matched as AVOption 'debug' with argument '1'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'pulse'.
Reading option '-ar' ... matched as option 'ar' (set audio sampling rate
(in Hz)) with argument '44100'.
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 '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument
'alsa_input.pci-0000_00_14.2.analog-stereo'.
Reading option '-f' ... matched as option 'f' (force format) with
argument 'v4l2'.
Reading option '-ts' ... matched as AVOption 'ts' with argument 'mono2abs'.
Reading option '-channel' ... matched as AVOption 'channel' with
argument '1'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuyv422'.
Reading option '-thread_queue_size' ... matched as option
'thread_queue_size' (set the maximum number of queued packets from the
demuxer) with argument '512'.
Reading option '-i' ... matched as input file with argument '/dev/video0'.
Reading option '-c:v' ... matched as option 'c' (codec name) with
argument 'ffv1'.
Reading option '-level' ... matched as AVOption 'level' with argument '3'.
Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
format) with argument 'yuv422p'.
Reading option '-c:a' ... matched as option 'c' (codec name) with
argument 'pcm_s16le'.
Reading option '/Store3/Test/t_20150730_1150.mkv' ... 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
alsa_input.pci-0000_00_14.2.analog-stereo.
Applying option f (force format) with argument pulse.
Applying option ar (set audio sampling rate (in Hz)) with argument 44100.
Applying option ac (set number of audio channels) with argument 2.
Applying option channel_layout (set channel layout) with argument stereo.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: alsa_input.pci-0000_00_14.2.analog-stereo.
[pulse @ 0x1fafdc0] All info found
Input #0, pulse, from 'alsa_input.pci-0000_00_14.2.analog-stereo':
  Duration: N/A, start: 1438253429.645509, bitrate: 1411 kb/s
    Stream #0:0, 1, 1/1000000: Audio: pcm_s16le, 44100 Hz, stereo, s16,
1411 kb/s
Successfully opened the file.
Parsing a group of options: input file /dev/video0.
Applying option f (force format) with argument v4l2.
Applying option pix_fmt (set pixel format) with argument yuyv422.
Applying option thread_queue_size (set the maximum number of queued
packets from the demuxer) with argument 512.
Successfully parsed a group of options.
Opening an input file: /dev/video0.
[video4linux2,v4l2 @ 0x1fc8f00] fd:6 capabilities:85220001
[video4linux2,v4l2 @ 0x1fc8f00] Selecting input_channel: 1
[video4linux2,v4l2 @ 0x1fc8f00] Current input_channel: 1, input_name:
S-Video, input_std: ffffff
[video4linux2,v4l2 @ 0x1fc8f00] Querying the device for the current
frame size
[video4linux2,v4l2 @ 0x1fc8f00] Setting frame size to 720x576
[video4linux2,v4l2 @ 0x1fc8f00] The V4L2 driver is using the interlaced mode
[video4linux2,v4l2 @ 0x1fc8f00] Current standard: PAL, id: ff,
frameperiod: 1/25
[video4linux2,v4l2 @ 0x1fc8f00] Detected monotonic timestamps, converting
[video4linux2,v4l2 @ 0x1fc8f00] All info found
Input #1, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 1438253430.837295, bitrate: 165888 kb/s
    Stream #1:0, 1, 1/1000000: Video: rawvideo, 1 reference frame (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/t_20150730_1150.mkv.
Applying option c:v (codec name) with argument ffv1.
Applying option pix_fmt (set pixel format) with argument yuv422p.
Applying option c:a (codec name) with argument pcm_s16le.
Successfully parsed a group of options.
Opening an output file: /Store3/Test/t_20150730_1150.mkv.
Successfully opened the file.
detected 8 logical cores
[graph 0 input from stream 1:0 @ 0x1f91860] Setting 'video_size' to
value '720x576'
[graph 0 input from stream 1:0 @ 0x1f91860] Setting 'pix_fmt' to value '1'
[graph 0 input from stream 1:0 @ 0x1f91860] Setting 'time_base' to value
'1/1000000'
[graph 0 input from stream 1:0 @ 0x1f91860] Setting 'pixel_aspect' to
value '0/1'
[graph 0 input from stream 1:0 @ 0x1f91860] Setting 'sws_param' to value
'flags=2'
[graph 0 input from stream 1:0 @ 0x1f91860] Setting 'frame_rate' to
value '25/1'
[graph 0 input from stream 1:0 @ 0x1f91860] w:720 h:576 pixfmt:yuyv422
tb:1/1000000 fr:25/1 sar:0/1 sws_param:flags=2
[format @ 0x1fa6220] compat: called with args=[yuv422p]
[format @ 0x1fa6220] Setting 'pix_fmts' to value 'yuv422p'
[auto-inserted scaler 0 @ 0x1f93be0] Setting 'flags' to value '0x4'
[auto-inserted scaler 0 @ 0x1f93be0] w:iw h:ih flags:'0x4' interl:0
[format @ 0x1fa6220] auto-inserting filter 'auto-inserted scaler 0'
between the filter 'Parsed_null_0' and the filter 'format'
[AVFilterGraph @ 0x1f91a40] query_formats: 4 queried, 2 merged, 1
already done, 0 delayed
[auto-inserted scaler 0 @ 0x1f93be0] 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 0:0 @ 0x1f91d60] Setting 'time_base' to value
'1/44100'
[graph 1 input from stream 0:0 @ 0x1f91d60] Setting 'sample_rate' to
value '44100'
[graph 1 input from stream 0:0 @ 0x1f91d60] Setting 'sample_fmt' to
value 's16'
[graph 1 input from stream 0:0 @ 0x1f91d60] Setting 'channel_layout' to
value '0x3'
[graph 1 input from stream 0:0 @ 0x1f91d60] tb:1/44100 samplefmt:s16
samplerate:44100 chlayout:0x3
[audio format for output stream 0:1 @ 0x1f9c340] Setting 'sample_fmts'
to value 's16'
[AVFilterGraph @ 0x1f915c0] query_formats: 4 queried, 9 merged, 0
already done, 0 delayed
Output #0, matroska, to '/Store3/Test/t_20150730_1150.mkv':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0, 0, 1/1000: Video: ffv1, 1 reference frame (FFV1 /
0x31564646), yuv422p, 720x576, 1/25, q=2-31, 200 kb/s, 25 fps, 1k tbn,
25 tbc
    Metadata:
      encoder         : Lavc56.49.101 ffv1
    Stream #0:1, 0, 1/1000: Audio: pcm_s16le ([1][0][0][0] / 0x0001),
44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc56.49.101 pcm_s16le
Stream mapping:
  Stream #1:0 -> #0:0 (rawvideo (native) -> ffv1 (native))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Cliping frame in rate conversion by 0.000008
Cliping frame in rate conversion by 0.199837
[matroska @ 0x1fcab00] Writing block at offset 819, size 83036, pts 0,
dts 0, duration 40, keyframe 1
[matroska @ 0x1fcab00] Writing block at offset 83863, size 65472, pts 0,
dts 0, duration 371, keyframe 1
[matroska @ 0x1fcab00] Writing block at offset 149343, size 81397, pts
40, dts 40, duration 40, keyframe 0
Cliping frame in rate conversion by 0.399422
[matroska @ 0x1fcab00] Writing block at offset 230748, size 81759, pts
80, dts 80, duration 40, keyframe 0
Past duration 0.600410 too large
[matroska @ 0x1fcab00] Writing block at offset 312515, size 81599, pts
120, dts 120, duration 40, keyframe 0
Past duration 0.801323 too large
[matroska @ 0x1fcab00] Writing block at offset 394122, size 81301, pts
160, dts 160, duration 40, keyframe 0
Past duration 0.998497 too large
[matroska @ 0x1fcab00] Writing block at offset 475431, size 81452, pts
200, dts 200, duration 40, keyframe 0
[matroska @ 0x1fcab00] Writing block at offset 556891, size 81042, pts
240, dts 240, duration 40, keyframe 0
[matroska @ 0x1fcab00] Writing block at offset 637941, size 81261, pts
280, dts 280, duration 40, keyframe 0
[matroska @ 0x1fcab00] Writing block at offset 719210, size 81158, pts
320, dts 320, duration 40, keyframe 0
Past duration 0.799187 too large
*** dropping frame 9 from stream 0 at ts 7
[matroska @ 0x1fcab00] Writing block at offset 800376, size 81406, pts
360, dts 360, duration 40, keyframe 0
Past duration 0.999138 too large
[matroska @ 0x1fcab00] Writing block at offset 881790, size 46472, pts
371, dts 371, duration 263, keyframe 1
[matroska @ 0x1fcab00] Writing block at offset 928270, size 81340, pts
400, dts 400, duration 40, keyframe 0
[matroska @ 0x1fcab00] Writing block at offset 1009618, size 81437, pts
440, dts 440, duration 40, keyframe 0
[matroska @ 0x1fcab00] Starting new cluster at offset 1091063 bytes, pts
480dts 480
[matroska @ 0x1fcab00] Writing block at offset 1091079, size 83065, pts
480, dts 480, duration 40, keyframe 1
[matroska @ 0x1fcab00] Writing block at offset 1174152, size 81809, pts
520, dts 520, duration 40, keyframe 0
Past duration 0.799995 too large
*** dropping frame 14 from stream 0 at ts 12
[matroska @ 0x1fcab00] Writing block at offset 1255969, size 81417, pts
560, dts 560, duration 40, keyframe 0
Past duration 0.801720 too large   1306kB time=00:00:01.00
bitrate=10645.9kbits/s dup=0 drop=2
[matroska @ 0x1fcab00] Writing block at offset 1337394, size 81669, pts
600, dts 600, duration 40, keyframe 0
[matroska @ 0x1fcab00] Writing block at offset 1419071, size 65472, pts
634, dts 634, duration 371, keyframe 1
[matroska @ 0x1fcab00] Writing block at offset 1484551, size 81655, pts
640, dts 640, duration 40, keyframe 0
[matroska @ 0x1fcab00] Writing block at offset 1566214, size 81405, pts
680, dts 680, duration 40, keyframe 0
[matroska @ 0x1fcab00] Writing block at offset 1647627, size 81449, pts
720, dts 720, duration 40, keyframe 0
Past duration 0.800545 too large
*** dropping frame 19 from stream 0 at ts 17
[matroska @ 0x1fcab00] Writing block at offset 1729084, size 81378, pts
760, dts 760, duration 40, keyframe 0
Past duration 0.803871 too large
[matroska @ 0x1fcab00] Writing block at offset 1810470, size 81230, pts
800, dts 800, duration 40, keyframe 0
[matroska @ 0x1fcab00] Writing block at offset 18917


More information about the ffmpeg-user mailing list