[FFmpeg-user] Creation of timelapse video stops at 133080144 bytes
David Ulevitch
david at ulevitch.com
Wed Dec 19 07:33:11 EET 2018
I've solved my own issue. Replying for the archives benefit... ffmpeg does
not like jpg's of zero size in the pipeline.
Running:
$ find ./ -type f -iname '*.jpg' -size 0 -exec rm {}\;
and removing the few zero byte images has resolved my issue and now the
videos are building.
Thanks,
David
On Tue, Dec 18, 2018 at 9:10 PM David Ulevitch <david at ulevitch.com> wrote:
> Sorry for replying to my own thread but I have figured out I can't get my
> clip to have more than 7310 images in the input.
>
> Having trouble figuring out where this is being capped. There are 9000+
> images in the directory now.
>
> Thanks,
> David
>
>
> On Tue, Dec 18, 2018 at 9:10 AM David Ulevitch <david at ulevitch.com> wrote:
>
>> Hi ffmpeg-users,
>>
>> I have been creating a timelapse video of images pulled from a security
>> camera and all was going great until a few days ago when the ffmpeg process
>> completes (seemingly without error) but the video size is no longer growing
>> and the video length stops at 2:01, despite the input file count growing (1
>> new image per minute).
>>
>> Each output video file is now 133080144 bytes and never grows. Nothing
>> else has changed, I'm using pattern_type glob and the shell should have no
>> issue with 8000+ files on the command line.
>>
>> Here is my command to generate the video:
>>
>> #!/bin/sh
>> export TZ=America/Denver
>> date=$(date +"%Y-%m-%d_%H:%M");
>> ffmpeg -r 60 -pattern_type glob -i 'unifi/unifi*.jpg' -s hd1080 -movflags
>> +faststart -vcodec libx264 -loglevel quiet -y unifi-lot835-hd-$date.mp4
>>
>>
>> `ls 'unifi/unifi*.jpg' | wc` shows 8700+ files, and grows by 1 file each
>> minute. Yet the ffmpeg command now just stops at the same timelength and
>> filesize each time.
>>
>> Any ideas what limits I'm hitting or why it's no longer making the file
>> larger / longer? What else can I answer or look into to help debug this?
>>
>> I do get a lot of these, but the Internet seems to indicate I should
>> ignore them:
>>
>> Past duration 0.999992 too large 126341kB time=00:01:58.80
>> bitrate=8712.0kbits/s dup=1 drop=0
>> Last message repeated 6 times
>>
>>
>> I've attached the top x lines of the command without the quiet log level
>> below. I changed a few CLI flags when running outside the script as you'll
>> see, but the problem remains the same.
>>
>> Thanks,
>> David
>>
>> ------------- Debug stuff below -------
>>
>> Command Start Output
>> $ time ffmpeg -r 60 -pattern_type glob -i "unifi/unifi*.jpg" -movflags
>> +faststart -s hd1080 -vcodec libx264 unifi-lot835-hd-2018-12-18.mp4 && ln
>> -sf unifi-lot835-hd-2018-12-18.mp4 unifi-hd.mp4
>> ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg
>> developers
>> built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
>> configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1
>> --build-suffix=-ffmpeg --toolchain=hardened
>> --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu
>> --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping
>> --disable-decoder=libopenjpeg --disable-decoder=libschroedinger
>> --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa
>> --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
>> --enable-libcdio --enable-libflite --enable-libfontconfig
>> --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm
>> --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg
>> --enable-libopus --enable-libpulse --enable-librtmp
>> --enable-libschroedinger --enable-libshine --enable-libsnappy
>> --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
>> --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack
>> --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi
>> --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394
>> --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264
>> --enable-libopencv
>> libavutil 54. 31.100 / 54. 31.100
>> libavcodec 56. 60.100 / 56. 60.100
>> libavformat 56. 40.101 / 56. 40.101
>> libavdevice 56. 4.100 / 56. 4.100
>> libavfilter 5. 40.101 / 5. 40.101
>> libavresample 2. 1. 0 / 2. 1. 0
>> libswscale 3. 1.101 / 3. 1.101
>> libswresample 1. 2.101 / 1. 2.101
>> libpostproc 53. 3.100 / 53. 3.100
>> [mjpeg @ 0x1f44700] Changeing bps to 8
>> Input #0, image2, from 'unifi/unifi*.jpg':
>> Duration: 00:05:52.12, start: 0.000000, bitrate: N/A
>> Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown),
>> 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
>> File 'unifi-lot835-hd-2018-12-18.mp4' already exists. Overwrite ? [y/N] y
>> No pixel format specified, yuvj420p for H.264 encoding chosen.
>> Use -pix_fmt yuv420p for compatibility with outdated media players.
>> [libx264 @ 0x1f53d00] using SAR=1/1
>> [libx264 @ 0x1f53d00] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
>> AVX
>> [libx264 @ 0x1f53d00] profile High, level 4.2
>> [libx264 @ 0x1f53d00] 264 - core 148 r2643 5c65704 - H.264/MPEG-4 AVC
>> codec - Copyleft 2003-2015 - http://www.videolan.org/x264.html -
>> options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
>> psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1
>> cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=6
>> lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
>> bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
>> b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
>> scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
>> qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
>> Output #0, mp4, to 'unifi-lot835-hd-2018-12-18.mp4':
>> Metadata:
>> encoder : Lavf56.40.101
>> Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021),
>> yuvj420p(pc), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 60 fps, 15360 tbn, 60
>> tbc
>> Metadata:
>> encoder : Lavc56.60.100 libx264
>> Stream mapping:
>> Stream #0:0 -> #0:0 (mjpeg (native) -> h264 (libx264))
>> Press [q] to stop, [?] for help
>>
>> Command End Output:
>> [mp4 @ 0x1f56e60] Starting second pass: moving the moov atom to the
>> beginning of the file
>> frame= 7311 fps= 12 q=-1.0 Lsize= 129961kB time=00:02:01.81
>> bitrate=8739.7kbits/s dup=1 drop=0
>> video:129886kB audio:0kB subtitle:0kB other streams:0kB global
>> headers:0kB muxing overhead: 0.058151%
>> [libx264 @ 0x1f53d00] frame I:35 Avg QP:22.98 size:100271
>> [libx264 @ 0x1f53d00] frame P:4140 Avg QP:25.49 size: 26709
>> [libx264 @ 0x1f53d00] frame B:3136 Avg QP:26.96 size: 6033
>> [libx264 @ 0x1f53d00] consecutive B-frames: 24.8% 50.2% 11.9% 13.2%
>> [libx264 @ 0x1f53d00] mb I I16..4: 19.6% 77.3% 3.1%
>> [libx264 @ 0x1f53d00] mb P I16..4: 12.5% 15.7% 0.2% P16..4: 26.5%
>> 6.1% 4.8% 0.0% 0.0% skip:34.2%
>> [libx264 @ 0x1f53d00] mb B I16..4: 3.0% 3.8% 0.0% B16..8: 25.8%
>> 1.7% 0.3% direct: 2.0% skip:63.4% L0:44.4% L1:51.8% BI: 3.8%
>> [libx264 @ 0x1f53d00] 8x8 transform intra:55.8% inter:79.0%
>> [libx264 @ 0x1f53d00] coded y,uvDC,uvAC intra: 14.8% 21.2% 0.2% inter:
>> 13.4% 8.9% 0.0%
>> [libx264 @ 0x1f53d00] i16 v,h,dc,p: 28% 45% 15% 13%
>> [libx264 @ 0x1f53d00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 23% 48% 1% 1%
>> 1% 1% 1% 1%
>> [libx264 @ 0x1f53d00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 22% 26% 25% 4% 6%
>> 4% 6% 3% 5%
>> [libx264 @ 0x1f53d00] i8c dc,h,v,p: 61% 22% 17% 1%
>> [libx264 @ 0x1f53d00] Weighted P-Frames: Y:46.0% UV:16.5%
>> [libx264 @ 0x1f53d00] ref P L0: 50.1% 17.1% 18.2% 9.7% 4.9%
>> [libx264 @ 0x1f53d00] ref B L0: 64.0% 32.3% 3.6%
>> [libx264 @ 0x1f53d00] ref B L1: 94.1% 5.9%
>> [libx264 @ 0x1f53d00] kb/s:8732.19
>>
>> real 9m47.478s
>> user 26m48.400s
>> sys 0m20.144s
>>
>
More information about the ffmpeg-user
mailing list