Opened 4 years ago

Closed 4 years ago

#4352 closed defect (needs_more_info)

Too large number of skipped frames or invalid clipping

Reported by: le_cheveulu Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords: skipped frames invalid clipping
Cc: michael Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

First, excuse my english that is not good...

I try to record my USB HD webcam with ffmpeg under ubuntu 14.04 and I have some trouble.

With the command :

ffmpeg -y -f v4l2 -s 1280x720 -i /dev/video2 -vcodec copy test.avi

The record break down after about 30s with the message

"Too large number of skipped frames 201055 > 60000
av_interleaved_write_frame(): Invalid argument"

I tried with a buffsize

ffmpeg -y -f v4l2 -rtbufsize 1000000k -s 1280x720 -i /dev/video2 -vcodec copy test.avi

In this case the record don't break but there are many invalid clipping and produce many freeze in the video. The message in this case is :

ffmpeg version 1.2.6-7:1.2.6-1~trusty1 Copyright (c) 2000-2014 the FFmpeg developers

built on Apr 26 2014 18:52:58 with gcc 4.8 (Ubuntu 4.8.2-19ubuntu1)
configuration: --arch=amd64 --disable-stripping --enable-avresample --enable-pthreads --enable-runtime-cpudetect --extra-version='7:1.2.6-1~trusty1' --libdir=/usr/lib/x86_64-linux-gnu --prefix=/usr --enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r --enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-libcdio --enable-x11grab --enable-libx264 --shlibdir=/usr/lib/x86_64-linux-gnu --enable-shared --disable-static
libavutil 52. 18.100 / 52. 18.100
libavcodec 54. 92.100 / 54. 92.100
libavformat 54. 63.104 / 54. 63.104
libavdevice 53. 5.103 / 53. 5.103
libavfilter 3. 42.103 / 3. 42.103
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100

[video4linux2,v4l2 @ 0x1377660] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video2':

Duration: N/A, start: 3584.080259, bitrate: 147456 kb/s

Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, 147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc

Output #0, avi, to 'test.avi':

Metadata:

ISFT : Lavf54.63.104
Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720, q=2-31, 147456 kb/s, 10 fps, 20 tbn, 20 tbc

Stream mapping:

Stream #0:0 -> #0:0 (copy)

Press [q] to stop, ? for help
frame= 7 fps=0.0 q=-1.0 size= 12606kB time=00:00:00.65 bitrate=158869.9kbitframe= 12 fps= 12 q=-1.0 size= 21606kB time=00:00:01.15 bitrate=153907.9kbitframe= 17 fps= 11 q=-1.0 size= 30606kB time=00:00:01.65 bitrate=151953.2kbitframe= 22 fps= 11 q=-1.0 size= 39606kB time=00:00:02.15 bitrate=150907.6kbitframe= 27 fps= 11 q=-1.0 size= 48606kB time=00:00:02.65 bitrate=150256.6kbitframe= 32 fps= 11 q=-1.0 size= 57606kB time=00:00:03.15 bitrate=149812.3kbitframe= 37 fps= 10 q=-1.0 size= 66606kB time=00:00:03.65 bitrate=149489.7kbitframe= 42 fps= 10 q=-1.0 size= 75606kB time=00:00:04.15 bitrate=149244.8kbitframe= 47 fps= 10 q=-1.0 size= 84606kB time=00:00:04.65 bitrate=149052.6kbitframe= 52 fps= 10 q=-1.0 size= 93606kB time=00:00:05.15 bitrate=148897.7kbitframe= 57 fps= 10 q=-1.0 size= 102606kB time=00:00:05.65 bitrate=148770.2kbitframe= 62 fps= 10 q=-1.0 size= 111607kB time=00:00:06.20 bitrate=147464.6kbitframe= 67 fps= 10 q=-1.0 size= 120607kB time=00:00:06.70 bitrate=147464.1kbitframe= 72 fps= 10 q=-1.0 size= 129607kB time=00:00:07.20 bitrate=147463.6kbitframe= 77 fps= 10 q=-1.0 size= 138607kB time=00:00:07.70 bitrate=147463.2kbitframe= 82 fps= 10 q=-1.0 size= 147607kB time=00:00:08.20 bitrate=147462.8kbitframe= 87 fps= 10 q=-1.0 size= 156607kB time=00:00:08.70 bitrate=147462.5kbitframe= 92 fps= 10 q=-1.0 size= 165607kB time=00:00:09.20 bitrate=147462.2kbitframe= 97 fps= 10 q=-1.0 size= 174607kB time=00:00:09.70 bitrate=147462.0kbitframe= 102 fps= 10 q=-1.0 size= 183607kB time=00:00:10.20 bitrate=147461.7kbitframe= 107 fps= 10 q=-1.0 size= 192607kB time=00:00:10.70 bitrate=147461.5kbitframe= 112 fps= 10 q=-1.0 size= 201607kB time=00:00:11.20 bitrate=147461.3kbitframe= 117 fps= 10 q=-1.0 size= 210607kB time=00:00:11.70 bitrate=147461.2kbitframe= 123 fps= 10 q=-1.0 size= 221407kB time=00:00:12.30 bitrate=147461.0kbitframe= 128 fps= 10 q=-1.0 size= 230408kB time=00:00:12.80 bitrate=147460.8kbitframe= 133 fps= 10 q=-1.0 size= 239408kB time=00:00:13.30 bitrate=147460.7kbitframe= 138 fps= 10 q=-1.0 size= 248408kB time=00:00:13.80 bitrate=147460.6kbitframe= 143 fps= 10 q=-1.0 size= 257408kB time=00:00:14.30 bitrate=147460.5kbitframe= 148 fps= 10 q=-1.0 size= 266408kB time=00:00:14.80 bitrate=147460.3kbitframe= 153 fps= 10 q=-1.0 size= 275408kB time=00:00:15.30 bitrate=147460.2kbitframe= 158 fps= 10 q=-1.0 size= 284408kB time=00:00:15.80 bitrate=147460.2kbitframe= 163 fps= 10 q=-1.0 size= 293408kB time=00:00:16.30 bitrate=147460.1kbitframe= 168 fps= 10 q=-1.0 size= 302408kB time=00:00:16.80 bitrate=147460.0kbitframe= 173 fps= 10 q=-1.0 size= 311408kB time=00:00:17.30 bitrate=147459.9kbitframe= 178 fps= 10 q=-1.0 size= 320408kB time=00:00:17.85 bitrate=147046.8kbitframe= 183 fps= 10 q=-1.0 size= 329408kB time=00:00:18.35 bitrate=147058.0kbitframe= 188 fps= 10 q=-1.0 size= 338408kB time=00:00:18.85 bitrate=147068.6kbitframe= 193 fps= 10 q=-1.0 size= 347409kB time=00:00:19.35 bitrate=147078.6kbitframe= 198 fps= 10 q=-1.0 size= 356409kB time=00:00:19.85 bitrate=147088.1kbitframe= 203 fps= 10 q=-1.0 size= 365409kB time=00:00:20.35 bitrate=147097.2kbitframe= 208 fps= 10 q=-1.0 size= 374409kB time=00:00:20.85 bitrate=147105.8kbitframe= 213 fps= 10 q=-1.0 size= 383409kB time=00:00:21.35 bitrate=147114.1kbitframe= 218 fps= 10 q=-1.0 size= 392409kB time=00:00:21.85 bitrate=147121.9kbitframe= 223 fps= 10 q=-1.0 size= 401409kB time=00:00:22.35 bitrate=147129.4kbitframe= 228 fps= 10 q=-1.0 size= 410409kB time=00:00:22.85 bitrate=147136.6kbitframe= 233 fps= 10 q=-1.0 size= 419409kB time=00:00:23.35 bitrate=147143.5kbitframe= 238 fps= 10 q=-1.0 size= 428409kB time=00:00:23.85 bitrate=147150.1kbitframe= 243 fps= 10 q=-1.0 size= 437409kB time=00:00:24.35 bitrate=147156.4kbitframe= 248 fps= 10 q=-1.0 size= 446409kB time=00:00:24.85 bitrate=147162.4kbitframe= 253 fps= 10 q=-1.0 size= 455410kB time=00:00:25.35 bitrate=147168.2kbitframe= 258 fps= 10 q=-1.0 size= 464410kB time=00:00:25.85 bitrate=147173.8kbitframe= 263 fps= 10 q=-1.0 size= 473410kB time=00:00:26.35 bitrate=147179.2kbitframe= 268 fps= 10 q=-1.0 size= 482410kB time=00:00:26.85 bitrate=147184.4kbitframe= 274 fps= 10 q=-1.0 size= 493210kB time=00:00:27.45 bitrate=147190.3kbitframe= 279 fps= 10 q=-1.0 size= 502210kB time=00:00:27.95 bitrate=147195.1kbitframe= 284 fps= 10 q=-1.0 size= 511210kB time=00:00:28.45 bitrate=147199.7kbitframe= 289 fps= 10 q=-1.0 size= 520210kB time=00:00:28.95 bitrate=147204.2kbitframe= 294 fps= 10 q=-1.0 size= 529210kB time=00:00:29.45 bitrate=147208.5kbitframe= 299 fps= 10 q=-1.0 size= 538210kB time=00:00:30.00 bitrate=146967.3kbitframe= 304 fps= 10 q=-1.0 size= 547210kB time=00:00:30.50 bitrate=146975.3kbitframe= 309 fps= 10 q=-1.0 size= 556210kB time=00:00:31.00 bitrate=146983.1kbitframe= 314 fps= 10 q=-1.0 size= 565210kB time=00:00:31.50 bitrate=146990.6kbitframe= 319 fps= 10 q=-1.0 size= 574211kB time=00:00:32.00 bitrate=146997.9kbitframe= 324 fps= 10 q=-1.0 size= 583211kB time=00:00:32.50 bitrate=147005.0kbitframe= 329 fps= 10 q=-1.0 size= 592211kB time=00:00:33.00 bitrate=147011.8kbitframe= 334 fps= 10 q=-1.0 size= 601211kB time=00:00:33.50 bitrate=147018.5kbitframe= 339 fps= 10 q=-1.0 size= 610211kB time=00:00:34.00 bitrate=147024.9kbitframe= 344 fps= 10 q=-1.0 size= 619211kB time=00:00:34.50 bitrate=147031.2kbitframe= 349 fps= 10 q=-1.0 size= 628211kB time=00:00:35.00 bitrate=147037.3kbitframe= 354 fps=9.9 q=-1.0 size= 637211kB time=00:00:35.50 bitrate=147043.2kbitframe= 362 fps= 10 q=-1.0 size= 651611kB time=00:00:36.30 bitrate=147052.3kbitframe= 367 fps= 10 q=-1.0 size= 660611kB time=00:00:36.80 bitrate=147057.8kbitframe= 372 fps= 10 q=-1.0 size= 669611kB time=00:00:37.30 bitrate=147063.2kbitframe= 378 fps= 10 q=-1.0 size= 680411kB time=00:00:37.90 bitrate=147069.4kbitframe= 383 fps= 10 q=-1.0 size= 689412kB time=00:00:38.40 bitrate=147074.5kbitframe= 388 fps= 10 q=-1.0 size= 698412kB time=00:00:38.90 bitrate=147079.4kbitframe= 393 fps= 10 q=-1.0 size= 707412kB time=00:00:39.40 bitrate=147084.2kbitframe= 398 fps= 10 q=-1.0 size= 716412kB time=00:00:39.90 bitrate=147088.9kbitframe= 404 fps=9.7 q=-1.0 size= 727212kB time=00:00:42.55 bitrate=140007.6kbitst:0 PTS: 815 DTS: 815 < 855 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 817 DTS: 817 < 856 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 819 DTS: 819 < 857 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 821 DTS: 821 < 858 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 823 DTS: 823 < 859 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 825 DTS: 825 < 860 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 827 DTS: 827 < 861 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 829 DTS: 829 < 862 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 831 DTS: 831 < 863 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 834 DTS: 834 < 864 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 836 DTS: 836 < 865 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 838 DTS: 838 < 866 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 840 DTS: 840 < 867 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 842 DTS: 842 < 868 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 844 DTS: 844 < 869 invalid, clipping
frame= 421 fps= 10 q=-1.0 size= 757812kB time=00:00:43.50 bitrate=142712.6kbitst:0 PTS: 846 DTS: 846 < 870 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 848 DTS: 848 < 871 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 850 DTS: 850 < 872 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 852 DTS: 852 < 873 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 854 DTS: 854 < 874 invalid, clipping
frame= 426 fps= 10 q=-1.0 size= 766812kB time=00:00:43.75 bitrate=143582.3kbitst:0 PTS: 856 DTS: 856 < 875 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 858 DTS: 858 < 876 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 860 DTS: 860 < 877 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 862 DTS: 862 < 878 invalid, clipping
[avi @ 0x135c540] st:0 PTS: 864 DTS: 864 < 879 invalid, clipping

Could you help me please. I don't understand what happened.

Change History (3)

comment:1 Changed 4 years ago by michael

  • Priority changed from critical to normal

ffmpeg 1.2 is a bit old, can you try with latest?

comment:2 Changed 4 years ago by michael

Also, is there anything running on the box that adjust/syncs the system time ? like ntpd ?

comment:3 Changed 4 years ago by michael

  • Cc michael added
  • Resolution set to needs_more_info
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.