slackspace-io / gopro-max-video-tools

Scripts for working with GoPro Max videos on Linux
14 stars 5 forks source link

Error initializing complex filters. Invalid argument #2

Open ivangayton opened 2 years ago

ivangayton commented 2 years ago

Hi, thanks for publishing this! I have a team in Kenya creating 360-degree videos for a community mapping project, and I'm trying to decode them so I can feed them into photogrammetry software to create 3D models from them using OpenDroneMap and ODMax, a little utility my friends built to extract cubic faces and GPS positions.

ODMax does not, at this time, properly extract the weirdly encoded GoPro video to working 360, so I'm trying to adapt your script.

Whilst runing it locally, I'm encountering an error (full output at the end; here's just the error):

Error initializing complex filters.
Option not found

A few possibilities: early on there seems to be a warning [mov,mp4,m4a,3gp,3g2,mj2 @ 0x556ad5f1e540] Using non-standard frame rate 29/1. I suppose that might have something to do with it?

However, doing a web search for the exact error message seems to kick up a few issues with FFMPEG that might be relevant, such as this or this, which seem to be centered around quoting/escaping issues. Have you encountered anything like that? Do you have any immediate insights? (I'll continue investigating; I'm certainly not expecting you to jump immediately to my rescue, but if you do happen to have a quick guess as to what I'm doing wrong and can save me some investigation time, I'd greatly appreciate it!)

ivan@ivan-hc:~/Documents/git/gopro-max-video-tools$ ./ffmpeg-convert.sh '/home/ivan/Documents/Maps/Nakuru_Kenya/GoPro_Max_trial_videos/GS010035.360' 
ffmpeg version 4.2.7-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
  configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x556ad5f1e540] Using non-standard frame rate 29/1
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/ivan/Documents/Maps/Nakuru_Kenya/GoPro_Max_trial_videos/GS010035.360':
  Metadata:
    major_brand     : mp41
    minor_version   : 538120216
    compatible_brands: mp41
    creation_time   : 2022-07-31T18:08:28.000000Z
    location        : -00.2866+036.0709/
    location-eng    : -00.2866+036.0709/
    firmware        : H19.03.02.00.00
  Duration: 00:00:18.99, start: 0.000000, bitrate: 80016 kb/s
    Stream #0:0(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 4096x1344 [SAR 1:1 DAR 64:21], 39722 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc (default)
    Metadata:
      creation_time   : 2022-07-31T18:08:28.000000Z
      handler_name    : GoPro H.265
      encoder         : GoPro H.265 encoder
      timecode        : 18:44:53:08
    Stream #0:1(eng): Data: none (tmcd / 0x64636D74), 0 kb/s (default)
    Metadata:
      creation_time   : 2022-07-31T18:08:28.000000Z
      handler_name    : GoPro TCD  
      timecode        : 18:44:53:08
    Stream #0:2(eng): Data: bin_data (gpmd / 0x646D7067), 406 kb/s (default)
    Metadata:
      creation_time   : 2022-07-31T18:08:28.000000Z
      handler_name    : GoPro MET  
    Stream #0:3(eng): Data: none (fdsc / 0x63736466), 12 kb/s (default)
    Metadata:
      creation_time   : 2022-07-31T18:08:28.000000Z
      handler_name    : GoPro SOS  
    Stream #0:4(eng): Video: hevc (Main) (hvc1 / 0x31637668), yuvj420p(pc, bt709), 4096x1344 [SAR 1:1 DAR 64:21], 39919 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 29.97 tbc (default)
    Metadata:
      creation_time   : 2022-07-31T18:08:28.000000Z
      handler_name    : GoPro H.265
      encoder         : GoPro H.265 encoder
      timecode        : 18:44:53:08
    Side data:
      displaymatrix: rotation of nan degrees
[Parsed_geq_2 @ 0x556ad5f700c0] Option 'interpolation' not found
[AVFilterGraph @ 0x556ad5f87d80] Error initializing filter 'geq' with args 'lum=if(between(X, 0, 64), (p((X+64),Y)*(((X+1))/65))+(p(X,Y)*((65-((X+1)))/65)), p(X,Y)):
cb=if(between(X, 0, 64), (p((X+64),Y)*(((X+1))/65))+(p(X,Y)*((65-((X+1)))/65)), p(X,Y)):
cr=if(between(X, 0, 64), (p((X+64),Y)*(((X+1))/65))+(p(X,Y)*((65-((X+1)))/65)), p(X,Y)):
a=if(between(X, 0, 64), (p((X+64),Y)*(((X+1))/65))+(p(X,Y)*((65-((X+1)))/65)), p(X,Y)):
interpolation=b'
Error initializing complex filters.
Option not found
wavemaking commented 2 years ago

Hi @ivangayton , did you manage to solve this? I encounter exactly the same error message.

ivangayton commented 2 years ago

I'm afraid not @wavemaking. I haven't had time to solve it, and the project has moved on for the moment. I'll probably look at it again in a few weeks.