QualityScaler icon indicating copy to clipboard operation
QualityScaler copied to clipboard

Error : Can’t currently RIFF AVI files – C :

Open Everlord999 opened this issue 1 year ago • 15 comments

Hello, it doesn't work. I have bugs every times. Do you know what i have to do please?

Terminal: Error : Can’t currently write RIFF AVI files – C : 1 files weren’t udaterd due to errors

Everlord999 avatar Aug 20 '24 03:08 Everlord999

Other try and config : Error [Errno 22] Invalid argument

MoviePy error: FFMPEG encountered the following error while writing file E:/AI Enhanced Videos/Sortie Enhanced\2014 02 04 _-Make-up.mp4_RealESR_Gx4_Resize-100_Interpolation-Medium.mp4:

b'[mp4 @ 0000025c27ce6100] Could not find tag for codec pcm_s16le in stream #1, codec not currently supported in container\r\nCould not write header for output file #0 (incorrect codec parameters ?): Invalid argument\r\nError initializing output stream 0:0 -- \r\n'

The video export failed, possibly because the codec specified for the video (libx264) is not compatible with the given extension (mp4). Please specify a valid 'codec' argument in write_videofile. This would be 'libx264' or 'mpeg4' for mp4, 'libtheora' for ogv, 'libvpx for webm. Another possible reason is that the audio codec was not compatible with the video codec. For instance the video extensions 'ogv' and 'webm' only allow 'libvorbis' (default) as avideo codec. Traceback (most recent call last): File "e:\AI Enhanced Videos\QualityScaler-main\QualityScaler-main\QualityScaler.py", line 2671, in window.mainloop() File "E:\AI Enhanced Videos\QualityScaler-main.venv\Lib\site-packages\customtkinter\windows\ctk_tk.py", line 165, in mainloop super().mainloop(*args, **kwargs) File "C:\Users\EVERLORD\AppData\Local\Programs\Python\Python312\Lib\tkinter_init_.py", line 1505, in mainloop self.tk.mainloop(n) File "C:\Users\EVERLORD\AppData\Local\Programs\Python\Python312\Lib\tkinter_init_.py", line 1963, in call def call(self, *args):

Everlord999 avatar Aug 20 '24 13:08 Everlord999

@Everlord999

Hi my friend, are you using github code?

Probably you need to download new version of ffmpeg.exe and put it in QualityScaler/Assets folder.

  1. Go to this site (https://www.gyan.dev/ffmpeg/builds/)
  2. Download one of this zip

image

  1. Extract ffmpeg.exe from the downloaded .zip
  2. Copy ffmpeg.exe to QualityScaler/Assets

unfortunately I can't upload the new version to github because it weighs too much and github won't let me

Djdefrag avatar Aug 20 '24 14:08 Djdefrag

Hello, thank you.

I did what you said, download ffmpeg.exe and put it in the asset folder, and try another time.

It still doesn't work.

  1. Processing upscaled video Error: Can't currently write RIFF AVI files - E:/Scaler IA/QualityScaler-3.9/AI Enhanced Videos/Output Path Videos Enhanced/2014 02 04 Make-up_.mp4_RealESR_Gx4_Resize-100.avi 0 image files updated updated due to errors Completed

Everlord999 avatar Aug 21 '24 06:08 Everlord999

Did you restarted the app?

I think the problem is not FFMPEG but exiftool, to extract video metadata

Did you check that the upscaled video was generated correctly?

Djdefrag avatar Aug 21 '24 06:08 Djdefrag

How can i check this?

Everlord999 avatar Aug 21 '24 07:08 Everlord999

in the output you selected there is the upscaled video

E:/Scaler IA/QualityScaler-3.9/AI Enhanced Videos/Output Path Videos Enhanced/

2014 02 04 Make-up_.mp4_RealESR_Gx4_Resize-100.avi

Djdefrag avatar Aug 21 '24 08:08 Djdefrag

Yes, i have tried but it doesn't work correctly with avi. (it tell me codec MPNG) The player (VLC) launch and play and still play but the image freeze like play 2 secondes,freeze,play, freeze...

With mp4 (264), it's seem better but not very well.

I'm searching for the best enhancement, i have a 3080Ti.

Everlord999 avatar Aug 21 '24 09:08 Everlord999

Really strange, maibe the problem is VLC ?

it is updated? Have you tried other programs to read videos?

Personally i use MPC-BE https://github.com/Aleksoid1978/MPC-BE

Djdefrag avatar Aug 21 '24 09:08 Djdefrag

I too get the: (Was converting a h264 MKV to the x264 MP4 version) The video export failed, possibly because the codec specified for the video (libx264) is not compatible with the given extension (mp4). Please specify a valid 'codec' argument in write_videofile. This would be 'libx264' or 'mpeg4' for mp4, 'libtheora' for ogv, 'libvpx for webm. Another possible reason is that the audio codec was not compatible with the video codec. For instance the video extensions 'ogv' and 'webm' only allow 'libvorbis' (default) as avideo codec. error Have updated FFMPEG and the AI files. Was not getting this on a lower version of the script. (I want to say it was 3.7) currently using 3.9

Maverynthia avatar Aug 27 '24 20:08 Maverynthia

@Maverynthia

Hi, have you downloaded the latest release?

Maibe you can try to clean and reinstall all the dependencies.

  1. Open VSCode terminal
  2. Execute "pip freeze > a.txt"
  3. Execute "pip uninstall -r a.txt -y"
  4. Execute "pip cache purge"

This will clean all dependencies, now you have to reinstall everything with:

  • pip install -r requirements.txt

After this, check if there is ffmpeg.exe in QualityScaler/Assets folder, otherwise you have to re-download it and put it back into this folder

Djdefrag avatar Aug 28 '24 15:08 Djdefrag

I assume by VSCode you mean just a normal terminal like CMD Will this break former QS scripts as I downloaded 3.7 and are currently using that as it works? (Save the multithreading giving out "access denied" errors and skipping frames)

Should also not that error only happens at 99.9% when it's probably using ffmpeg to make an image sequence into an mp4.

Maverynthia avatar Aug 28 '24 16:08 Maverynthia

@Maverynthia

Hi, yes a normal CMD is the same as VSCode terminal

yes, QS 3.8 and 3.9 introduced changes not compatible with previous QS

Multi-threading skipping frames has been fixed with 3.8

Yes, that error must be only a ffmpeg error, introduced with QS 3.9 audio export in .wav format (that seems not compatible with older version of ffmpeg)

Djdefrag avatar Aug 28 '24 16:08 Djdefrag

Will nuke the pip requirements from orbit and then report back. The ffmpeg I put in there was the new one from the link provided above.

Maverynthia avatar Aug 28 '24 17:08 Maverynthia

@Maverynthia

when executing QualityScaler, you should see a message like:

"[QualityScaler] External ffmpeg.exe file found"

if QS correctly find the new ffmpeg.exe

Djdefrag avatar Aug 28 '24 17:08 Djdefrag

That seems to have fixed it for now. Kinda annoying that I now have to reinstall all the other pip files for the other scripts.

Maverynthia avatar Aug 29 '24 04:08 Maverynthia