vid.stab icon indicating copy to clipboard operation
vid.stab copied to clipboard

Windows Builds: Cannot parse localmotion!

Open jensMF opened this issue 3 years ago • 16 comments

Hi,

I tried to stabilize a video on windows 10. I tested the release and git builds from https://www.gyan.dev/ffmpeg/builds/ and the gpl and gpl-4.3 builds from https://github.com/BtbN/FFmpeg-Builds/releases. All gave me the same error: Cannot parse localmotion! Last message repeated 236 times and I could not see any differences between input and output video. I tested it with default options like so:

ffmpeg.exe -i input.MOV -an -vf vidstabdetect -f null -
ffmpeg.exe -i input.MOV -vf vidstabtransform=input='transforms.trf' output.mp4

I did the same in manjaro linux an it worked without any problem.

This is the manjaro version:

ffmpeg version n4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.1.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100

These are the windows 10 versions:

ffmpeg version 2020-11-25-git-3de3d2f5e2-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfigt-
libavutil      56. 60.100 / 56. 60.100
libavcodec     58.113.100 / 58.113.100
libavformat    58. 64.100 / 58. 64.100
libavdevice    58. 11.103 / 58. 11.103
libavfilter     7. 90.100 /  7. 90.100
libswscale      5.  8.100 /  5.  8.100
libswresample   3.  8.100 /  3.  8.100
libpostproc    55.  8.100 / 55.  8.100
ffmpeg version 2020-11-25-git-3de3d2f5e2-essentials_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfigd-
libavutil      56. 60.100 / 56. 60.100
libavcodec     58.113.100 / 58.113.100
libavformat    58. 64.100 / 58. 64.100
libavdevice    58. 11.103 / 58. 11.103
libavfilter     7. 90.100 /  7. 90.100
libswscale      5.  8.100 /  5.  8.100
libswresample   3.  8.100 /  3.  8.100
libpostproc    55.  8.100 / 55.  8.100
ffmpeg version 4.3.1-2020-11-19-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (Rev5, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfigt-
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100
ffmpeg version n4.3.1-26-gca55240b8c Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3-win32 (GCC) 20200320
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingwp2
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100

and

ffmpeg version N-100036-g3de3d2f5e2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3-win32 (GCC) 20200320
configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingwp2
libavutil      56. 60.100 / 56. 60.100
libavcodec     58.113.100 / 58.113.100
libavformat    58. 64.100 / 58. 64.100
libavdevice    58. 11.103 / 58. 11.103
libavfilter     7. 90.100 /  7. 90.100
libswscale      5.  8.100 /  5.  8.100
libswresample   3.  8.100 /  3.  8.100
libpostproc    55.  8.100 / 55.  8.100

jensMF avatar Nov 26 '20 22:11 jensMF

Thanks for reporting. This is connected to the new binary file format. Sorry that it causes trouble.

georgmartius avatar Nov 27 '20 08:11 georgmartius

Which hardware do you run it on?

georgmartius avatar Nov 27 '20 08:11 georgmartius

I am using a Lenovo Thinkpad T470s. It has an Intel Core i7-7500U DualCore, 16GB DDR4 RAM, a 512GB SSD and an Intel HD 620 shared graphic card.

My friend uses an AMD FX-4300 Quad-Core, 4GB DDR4 RAM and an ATI Radeon 3000.

jensMF avatar Nov 27 '20 15:11 jensMF

If I understand it correctly, it should be configurable with a commandline argument, but the argument 'fileformat' is not known by any of the versions I am testing.

static const char deshake_help[] = ""
  "Overview:\n"
  "    Deshakes a video clip. It only uses past information, such that it is less\n"
  "     powerful than the filters stabilize and transform. \n"
  "     It also generates a file with relative transform information\n"
  "     to be used by the transform filter separately."
  "Options\n"
  "    'fileformat'  the type of file format used to write the transforms\n"
  "                  1: ascii (human readable) file format 2: binary (smaller) file format\n"
  "    'smoothing' number of frames*2 + 1 used for lowpass filtering \n"
  "                used for stabilizing (def: 10)\n"
  "    'shakiness'   how shaky is the video and how quick is the camera?\n"
  "                  1: little (fast) 10: very strong/quick (slow) (def: 4)\n"
  "    'accuracy'    accuracy of detection process (>=shakiness)\n"
  "                  1: low (fast) 15: high (slow) (def: 4)\n"
  "    'stepsize'    stepsize of search process, region around minimum \n"
  "                  is scanned with 1 pixel resolution (def: 6)\n"
  "    'algo'        0: brute force (translation only);\n"
  "                  1: small measurement fields (def)\n"
  "    'mincontrast' below this contrast a field is discarded (0-1) (def: 0.3)\n"
  "    'result'      path to the file used to write the transforms\n"
  "                  (def:inputfile.stab)\n"
  "    'maxshift'    maximal number of pixels to translate image\n"
  "                  (def: -1 no limit)\n"
  "    'maxangle'    maximal angle in rad to rotate image (def: -1 no limit)\n"
  "    'crop'        0: keep border (def), 1: black background\n"
  "    'zoom'        percentage to zoom >0: zoom in, <0 zoom out (def: 2)\n"
  "    'optzoom'     0: nothing, 1: determine optimal zoom (def)\n"
  "    'interpol'    type of interpolation: 0: no interpolation, \n"
  "                  1: linear (horizontal), 2: bi-linear (def), \n"
  "                  3: bi-cubic\n"
  "    'sharpen'     amount of sharpening: 0: no sharpening (def: 0.8)\n"
  "                  uses filter unsharp with 5x5 matrix\n"
  "    'help'        print this help message\n";

jensMF avatar Nov 27 '20 20:11 jensMF

The flag is an internal flag that is not exposed to the FFmpeg interface. We need to fix the problem with the new file format.

georgmartius avatar Nov 27 '20 21:11 georgmartius

I‘ve seen the issue also on macOS on M1 (ARM) using a binary build of ffmpeg.

lindig avatar Feb 06 '21 23:02 lindig

As a note, I am not able to reproduce, tested on windows just now with both a build from gyan and one I just now compiled from the git HEADs of vid.stab and ffmpeg

1480c1 avatar Apr 16 '21 20:04 1480c1

I am using a build recently compiled from sources on Mac ARM (git-2021-03-26-cad3a5d) and it's not present any more.

lindig avatar Apr 17 '21 05:04 lindig

I still see the problem in John van Sieckle's ffmpeg static builds for amd64, both release 4.4 and git master from May 1st. It works fine with release 4.2.2 (which is before the change). I'm running this on a Lenovo Thinkpad T450s with an i5-5300U.

f0k avatar May 16 '21 09:05 f0k

I can confirm the problem still there.

built from vid.stab georgmartius/vid.stab@f9166e9b082242b622b5b456ef80cbdbd4042826 ffmpeg/ffmpeg@11b489d592553da3d5e61a83482ee188005b0da9

$ ffmpeg
ffmpeg version N-102557-g11b489d592-nonfree Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10-win32 (GCC) 20210110
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-doc --enable-nonfree --extra-version=nonfree --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --enable-libvmaf --enable-amf --enable-libaom --enable-avisynth --enable-libdav1d --enable-libdavs2 --enable-decklink --enable-ffnvcodec --enable-cuda-llvm --enable-libgme --enable-libass --enable-libbluray --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvpx --enable-libwebp --enable-libmfx --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libvidstab --enable-vulkan --enable-libglslang --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-libs=-lgomp
  libavutil      57.  0.100 / 57.  0.100
  libavcodec     59.  1.100 / 59.  1.100
  libavformat    59.  2.100 / 59.  2.100
  libavdevice    59.  0.100 / 59.  0.100
  libavfilter     8.  0.101 /  8.  0.101
  libswscale      6.  0.100 /  6.  0.100
  libswresample   4.  0.100 /  4.  0.100
  libpostproc    56.  0.100 / 56.  0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

exec:

ffmpeg -hide_banner -y -i unstab.mp4 \
      -vf vidstabdetect=stepsize=32:shakiness=10:accuracy=15:result=transforms.trf -f null -
ffmpeg -hide_banner -y -i unstab.mp4 \
      -vf vidstabtransform=input=transforms.trf:zoom=0:smoothing=10,unsharp=5:5:0.8:3:3:0.4 \
      -vcodec libx264 -tune film -acodec copy -preset slow  \
      stab.mp4

result:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'unstab.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2013-05-31T17:41:27.000000Z
  Duration: 00:00:14.51, start: 0.000000, bitrate: 2534 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2340 kb/s, 30 fps, 30 tbr, 60 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      creation_time   : 2013-05-31T17:41:27.000000Z
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
  Stream #0:1 -> #0:1 (aac (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[vidstabdetect @ 000000fbbbbfe7d8] Multithreading: use 9 threads
[vidstabdetect @ 000000fbbbbfe7d8] For high accuracy use lower stepsize  -- set to 6 nowFieldsize: 80, Maximal translation: 102 pixel
[vidstabdetect @ 000000fbbbbfe748] Number of used measurement fields: 60 out of 60
[vidstabdetect @ 000000fbbbbfe748] Fieldsize: 16, Maximal translation: 16 pixel
[vidstabdetect @ 000000fbbbbfe748] Number of used measurement fields: 760 out of 760
[Parsed_vidstabdetect_0 @ 0000028e4a5f8bc0] Video stabilization settings (pass 1/2):
[Parsed_vidstabdetect_0 @ 0000028e4a5f8bc0]      shakiness = 10
[Parsed_vidstabdetect_0 @ 0000028e4a5f8bc0]       accuracy = 15
[Parsed_vidstabdetect_0 @ 0000028e4a5f8bc0]       stepsize = 6
[Parsed_vidstabdetect_0 @ 0000028e4a5f8bc0]    mincontrast = 0.250000
[Parsed_vidstabdetect_0 @ 0000028e4a5f8bc0]         tripod = 0
[Parsed_vidstabdetect_0 @ 0000028e4a5f8bc0]           show = 0
[Parsed_vidstabdetect_0 @ 0000028e4a5f8bc0]         result = transforms.trf
Output #0, null, to 'pipe:':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf59.2.100
  Stream #0:0(und): Video: wrapped_avframe, yuv420p(progressive), 1280x720, q=2-31, 200 kb/s, 30 fps, 30 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc59.1.100 wrapped_avframe
  Stream #0:1(und): Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s (default)
    Metadata:
      creation_time   : 2013-05-31T17:41:27.000000Z
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
      vendor_id       : [0][0][0][0]
      encoder         : Lavc59.1.100 pcm_s16le
frame=  435 fps= 91 q=-0.0 Lsize=N/A time=00:00:14.51 bitrate=N/A speed=3.05x
video:187kB audio:2500kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'unstab.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2013-05-31T17:41:27.000000Z
  Duration: 00:00:14.51, start: 0.000000, bitrate: 2534 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 2340 kb/s, 30 fps, 30 tbr, 60 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      creation_time   : 2013-05-31T17:41:27.000000Z
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
      vendor_id       : [0][0][0][0]
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[Parsed_vidstabtransform_0 @ 0000022485ea8d00] Video transformation/stabilization settings (pass 2/2):
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     input     = transforms.trf
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     smoothing = 10
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     optalgo   = gauss
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     maxshift  = -1
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     maxangle  = -1.000000
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     crop      = Keep
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     relative  = True
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     invert    = False
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     zoom      = 0.000000
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     optzoom   = Static (1)
[Parsed_vidstabtransform_0 @ 0000022485ea8d00]     interpol  = Bi-Linear (2)
[vid.stab - serialization @ 000000661f7fdde8] Cannot parse localmotion!
    Last message repeated 132 times
[vidstabtransform @ 000000661f7fde68] Final zoom: 1.648024
[libx264 @ 000002248776b580] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000002248776b580] profile High, level 3.1, 4:2:0, 8-bit
[libx264 @ 000002248776b580] 264 - core 163 - H.264/MPEG-4 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html - options: cabac=1 ref=5 deblock=1:-1:-1 analyse=0x3:0x113 me=hex subme=8 psy=1 psy_rd=1.00:0.15 mixed_ref=1 me_range=16 chroma_me=1 trellis=2 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-3 threads=18 lookahead_threads=3 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=3 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=50 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 'stab.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf59.2.100
  Stream #0:0(und): Video: h264 (avc1 / 0x31637661), yuv420p(progressive), 1280x720, q=2-31, 30 fps, 15360 tbn (default)

    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc59.1.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      creation_time   : 2013-05-31T17:41:27.000000Z
      handler_name    : IsoMedia File Produced by Google, 5-11-2011
      vendor_id       : [0][0][0][0]
[vidstabtransform @ 000000661f7fe8b8] not enough transforms found, use last transformation!
frame=  435 fps= 60 q=-1.0 Lsize=    4863kB time=00:00:14.51 bitrate=2745.3kbits/s speed=   2x
video:4507kB audio:340kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.338196%
[libx264 @ 000002248776b580] frame I:2     Avg QP:22.72  size: 85368
[libx264 @ 000002248776b580] frame P:159   Avg QP:23.67  size: 23021
[libx264 @ 000002248776b580] frame B:274   Avg QP:26.98  size:  2858
[libx264 @ 000002248776b580] consecutive B-frames:  6.7% 19.3% 26.2% 47.8%
[libx264 @ 000002248776b580] mb I  I16..4:  7.7% 81.7% 10.6%
[libx264 @ 000002248776b580] mb P  I16..4:  1.2%  3.2%  0.2%  P16..4: 50.4% 20.5% 10.6%  0.0%  0.0%    skip:13.8%
[libx264 @ 000002248776b580] mb B  I16..4:  0.1%  0.0%  0.0%  B16..8: 44.3%  3.1%  0.3%  direct: 0.7%  skip:51.4%  L0:36.3% L1:54.5% BI: 9.2%
[libx264 @ 000002248776b580] 8x8 transform intra:70.3% inter:61.0%
[libx264 @ 000002248776b580] direct mvs  spatial:97.4% temporal:2.6%
[libx264 @ 000002248776b580] coded y,uvDC,uvAC intra: 59.5% 74.7% 21.2% inter: 13.4% 17.0% 0.1%
[libx264 @ 000002248776b580] i16 v,h,dc,p: 10% 45% 14% 31%
[libx264 @ 000002248776b580] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  4% 19% 12%  7%  9%  6% 14%  8% 21%
[libx264 @ 000002248776b580] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  3% 17%  6%  7% 10%  6% 17%  9% 25%
[libx264 @ 000002248776b580] i8c dc,h,v,p: 44% 38%  8%  9%
[libx264 @ 000002248776b580] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 000002248776b580] ref P L0: 77.2% 11.6%  8.4%  0.9%  1.1%  0.8%
[libx264 @ 000002248776b580] ref B L0: 98.8%  1.0%  0.2%  0.0%
[libx264 @ 000002248776b580] ref B L1: 99.8%  0.2%
[libx264 @ 000002248776b580] kb/s:2545.82

I don't see any differences between input and output video.

nanake avatar May 17 '21 03:05 nanake

I'm still getting this error.

I built ffmpeg from source, version N-103951-g2b2e9afdd2.

Lenovo ThinkPad X260, Linux (Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz, 8GB RAM)

saulortega avatar Oct 03 '21 19:10 saulortega

After 2 years, same error...

Version 4.1.4 works, version 4.4 throws "Cannot parse localmotion!" and doesn't stabilize. Same video, same command line, only the ffmpeg binaries are different.

Command lines:

ffmpeg -i "20220322_133352.mp4" -vf null,vidstabdetect=stepsize=6:shakiness=10:accuracy=15:result="20220322_133352.trf" -an -sn -f null -
ffmpeg -i "20220322_133352.mp4" -vf null,vidstabtransform=input="20220322_133352.trf":zoom=0:smoothing=50,unsharp=5:5:0.8:3:3:0.4,scale=404:720 -c:v libx265 -vtag hvc1 -preset medium -crf 24 -c:a libfdk_aac -profile:a aac_he -ar 44100 -b:a 48k -ac 1 -y "20220322_133352_out[stabilize,rotated][medium,24,48k,1].mkv"

Error:

[Parsed_vidstabtransform_1 @ 0000000003480e00] Video transformation/stabilization settings (pass 2/2):
[Parsed_vidstabtransform_1 @ 0000000003480e00]     input     = 20220322_133328.trf
[Parsed_vidstabtransform_1 @ 0000000003480e00]     smoothing = 50
[Parsed_vidstabtransform_1 @ 0000000003480e00]     optalgo   = gauss
[Parsed_vidstabtransform_1 @ 0000000003480e00]     maxshift  = -1
[Parsed_vidstabtransform_1 @ 0000000003480e00]     maxangle  = -1.000000
[Parsed_vidstabtransform_1 @ 0000000003480e00]     crop      = Keep
[Parsed_vidstabtransform_1 @ 0000000003480e00]     relative  = True
[Parsed_vidstabtransform_1 @ 0000000003480e00]     invert    = False
[Parsed_vidstabtransform_1 @ 0000000003480e00]     zoom      = 0.000000
[Parsed_vidstabtransform_1 @ 0000000003480e00]     optzoom   = Static (1)
[Parsed_vidstabtransform_1 @ 0000000003480e00]     interpol  = Bi-Linear (2)
[vid.stab - serialization @ 000000000034e0d8] Cannot parse localmotion!
    Last message repeated 256 times
[vidstabtransform @ 000000000034e118] Final zoom: 0.218258

Build that throws the error:

ffmpeg version n4.4-ffmpeg-windows-build-helpers Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (GCC)
  configuration: --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/foxunix/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libopenjpeg --enable-libopenh264 --enable-liblensfun --enable-libvmaf --enable-libsrt --enable-libxml2 --enable-opengl --enable-libdav1d --enable-cuda-llvm --enable-libsvthevc --enable-libsvtav1 --enable-libaom --enable-libvpx --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-avisynth --enable-libaribb24 --enable-libxvid --enable-libdavs2 --enable-libxavs2 --enable-libxavs --extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static --disable-shared --prefix=/home/foxunix/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32 --enable-nonfree --enable-libfdk-aac --enable-decklink

Build that works:

ffmpeg version n4.1.4-ffmpeg-windows-build-helpers Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.0 (GCC)
  configuration: --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86_64 --target-os=mingw32 --cross-prefix=/home/foxgr/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/bin/x86_64-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libzimg --enable-libzvbi --enable-libmysofa --enable-libaom --enable-libopenjpeg --enable-libopenh264 --enable-liblensfun --enable-libvmaf --enable-libsrt --enable-demuxer=dash --enable-libxml2 --enable-nvenc --enable-nvdec --extra-libs=-lharfbuzz --extra-libs=-lm --extra-libs=-lpthread --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DCACA_STATIC --enable-amf --enable-libmfx --enable-gpl --enable-avisynth --enable-frei0r --enable-filter=frei0r --enable-librubberband --enable-libvidstab --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxavs --enable-avresample --extra-cflags='-mtune=generic' --extra-cflags=-O3 --enable-static --disable-shared --prefix=/home/foxgr/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-x86_64/x86_64-w64-mingw32 --enable-nonfree --enable-decklink --enable-libfdk-aac

lmagyar avatar Mar 25 '22 22:03 lmagyar

Build v32 from https://www.gyan.dev/ffmpeg/builds/ (ffmpeg 5.1) works on Windows 10 for me. But I had to generate the transforms file with the new version, too (running on a trf file from ffmpeg 4.3.1 I had before was not working).

peci1 avatar Aug 06 '22 13:08 peci1

Dear all, this error is stil unsolved on W10. However, the same ffmpeg version works on W11. So, it is somehow related to the system, it works on W11, does not work on W10. All W.. are with latest updates.

Pavel-Pe avatar Oct 20 '23 08:10 Pavel-Pe

ffmpeg v6.0.1 on Mac M2 suffers from this problem as well.

And there's no option to choose the ASCII fileformat, it always generates the new binary fileformat - causing the second pass to always fail with error message "Cannot parse localmotion"

ffmpeg version 6.0 Copyright (c) 2000-2023 the FFmpeg developers built with Apple clang version 14.0.3 (clang-1403.0.22.14.1) configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/6.0_1 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libaribb24 --enable-libbluray --enable-libdav1d --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libsvtav1 --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-videotoolbox --enable-audiotoolbox --enable-neon

sufehmi avatar Oct 30 '23 05:10 sufehmi

just to highlight here and help anyone else having this error: @truboxl last comment on issue #17795 fixed the error for me using Windows [version 10.0.18363.418] with FFMPEG git-f5f414d9c4-full_build from gyan.dev

basically add fileformat=1 to force saving as old text file format.

mateusdnc avatar Dec 26 '23 23:12 mateusdnc