animafps / teres

🎞️ Utility for realistic motion blur through frame intepolation and blending
https://animafps.github.io/teres
GNU General Public License v3.0
50 stars 1 forks source link

fd:: Invalid data found when processing input #73

Closed arkadesOrg closed 1 year ago

arkadesOrg commented 1 year ago

runningteres -n file.mp4 throws the error mentioned above, which is an ffmpeg error.

animafps commented 1 year ago

please give more information, like version and config

arkadesOrg commented 1 year ago

I just installed the teres-git version on archlinux. I found that teres generates this command ffmpeg -loglevel error -hide_banner -nostats -i - -i subway-timeramp.mov -map 0:v -map 1:a? -c:v h264_nvenc -preset p7 -qp 18 -c:a aac -b:a 320k -movflags +faststart subway-timeramp_blur.mp4 where I guess -i - is the problem.

Also the default config file contains container = mp4 instead of container = "mp4"

Thanks for the quick response!

arkadesOrg commented 1 year ago

I quickfixed the issue with a /bin/ffmpeg-substitute script to remove -i - from the generated command arguments before passing it to the real ffmpeg. But now the vspipe subprocess runs forever as a zombi consuming 25% cpu (1 core)

animafps commented 1 year ago

That breaks it cause -i - is the argument that inputs the data so ffmpeg is getting nothing except the original clip

animafps commented 1 year ago

vspipe is the issue here most likely in the config, what is your config or change vspipes' log level

Will prob push a hotfix to make it better to debug

animafps commented 1 year ago

stale

markusressel commented 1 year ago

I am getting the same error, when trying to process some DJI 03 Air Unit recordings in 4k 60. Can we reopen this or should I create a new issue? I can also try to add more info if you show me how :)

EDIT: my config is default:

# blur
blur: true
blur_amount: 1 
blur_output_fps: 60
blur_weighting: equal

# interpolation
interpolate: true
interpolated_fps: 480

# rendering
quality: 18
detailed_filenames: false

# timescale
input_timescale: 1
output_timescale: 1
adjust_timescaled_audio_pitch: false

# filters
brightness: 1
saturation: 1
contrast: 1

# advanced rendering
gpu: false
gpu_type: nvidia #nvidia/amd/intel
deduplicate: false
custom_ffmpeg_filters: 

# advanced blur
blur_weighting_gaussian_std_dev: 2
blur_weighting_triangle_reverse: false
blur_weighting_bound: [0, 2]

# advanced interpolation
interpolation_program: svp #svp/rife/rife-ncnn
interpolation_speed: default
interpolation_tuning: default
interpolation_algorithm: default⏎         
animafps commented 1 year ago

its a generic error mostly from an issue with vapoursynth

best way to debug is when it hangs like that to leave it open then from another terminal

cd /#path to the video#/.teres-temp/ vspipe #random#.vpk .

inserting #path to the video# with the path and #random# with the generated file name that ends with .vpk

animafps commented 1 year ago

also platform and version is very useful

markusressel commented 1 year ago
> uname -a
Linux Silver 6.4.11-arch2-1 #1 SMP PREEMPT_DYNAMIC Sat, 19 Aug 2023 15:38:34 +0000 x86_64 GNU/Linux

> uname -mrs
Linux 6.4.11-arch2-1 x86_64

> teres -V
teres 0.3.2

Its an Arch Linux, package is:

aur/teres 0.3.3-1 (+1 0.00) (Installed)

Hardware: Ryzen 7 5800X AMD Radeon RX 6700 XT 64GB DDR4

> teres -v -n DJI_0127_stabilized.mp4

    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
    β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
       β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
       β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•  β•šβ•β•β•β•β–ˆβ–ˆβ•‘
       β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
       β•šβ•β•   β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•

Processing DJI_0127_stabilized.mp4
fd:: Invalid data found when processing input
> vspipe 55059.vpk .
Script evaluation failed:
Python exception: No module named 'adjust'

Traceback (most recent call last):
  File "src/cython/vapoursynth.pyx", line 3115, in vapoursynth._vpy_evaluate
  File "src/cython/vapoursynth.pyx", line 3116, in vapoursynth._vpy_evaluate
  File "55059.vpk", line 3, in <module>
    import havsfunc as haf
  File "/usr/lib/python3.11/site-packages/havsfunc.py", line 7, in <module>
    import adjust
ModuleNotFoundError: No module named 'adjust'

I am guessing this is not the actual error, but something about vspipe isn't working on my system? :thinking:

EDIT: I think installing vapoursynth-plugin-adjust-git fixed the traceback above.

Actually, now I get a different error when running teres:

> teres -v -n DJI_0127_stabilized.mp4

    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
    β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•
       β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
       β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•  β•šβ•β•β•β•β–ˆβ–ˆβ•‘
       β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
       β•šβ•β•   β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•

Processing DJI_0127_stabilized.mp4
 [DJI_0127_stabilized.mp4] β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0% 2d 18:03:27[h264_amf @ 0x558355992440] DLL libamfrt64.so.1 failed to open
[vost#0:0/h264_amf @ 0x558355992140] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
animafps commented 1 year ago

oh lol forgot to vendor adjust.py

https://github.com/animafps/teres/raw/api/plugins/adjust.py install to /usr/lib/python3.11/site-packages/

markusressel commented 1 year ago

I did change my config to use the GPU though. I really don't want to encode using the CPU, since that will probably take hours instead of minutes :sweat_smile:

markusressel commented 1 year ago

Seems like the new error is related to GPU encoding. If I disable GPU encoding, it seems to work correctly (not fully processed yet).

animafps commented 1 year ago

can you post the new error

markusressel commented 1 year ago

I posted above, sorry for the confusion. This is the error I am talking about:

Processing DJI_0127_stabilized.mp4
 [DJI_0127_stabilized.mp4] β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘ 0% 2d 18:03:27[h264_amf @ 0x558355992440] DLL libamfrt64.so.1 failed to open
[vost#0:0/h264_amf @ 0x558355992140] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
markusressel commented 1 year ago

Looking at this: https://github.com/GPUOpen-LibrariesAndSDKs/AMF/issues/248

I might have to install the "amd pro" drivers? Although that would be a bit confusing to me, as I have already used other tools (like Gyroflow) to encode on my GPU and it worked fine with my current driver setup.

animafps commented 1 year ago

well its using the proprietary gpu codec atm but soon will implement a better solution to maybe use vaapi but that is just a support issue on teres end

if no other issues marking as closed

markusressel commented 1 year ago

Alright, thx for the support!

couleurm commented 1 year ago

for now u can use x264 or a lossless codec