Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop with ffmsindex in v2.25.0 and AV1-SvtAv1EncApp encoding #1068

Closed
Davizator51 opened this issue Aug 5, 2023 · 25 comments
Closed

Comments

@Davizator51
Copy link

When I drag a video onto the program, after demuxing, ffmsindex gets stuck in a loop, and in the end, the program closes unexpectedly.

This only occurs with SvtAv1EncApp selected as encoder, any other encoder works fine. Of course can select another encoder, drag the file over staxrip and then change the encoder to SvtAv1EncApp.

Staxrip v2 25 0 bug

@Dendraspis
Copy link
Collaborator

Do you use templates or settings (file or folder) from a previous version?

@Davizator51
Copy link
Author

No, its a clean installation with the Automatic Workflow as template, only change the encoder to SvtAv1EncApp and get the bug, but from a previous version is the same.

@Dendraspis
Copy link
Collaborator

That's the point, I can't reproduce it, especially because I've tested it a lot while updating/implementing SvtAv1EncApp.

But the same file works with other encoders?
Can you provide a sample file?

@Davizator51
Copy link
Author

It's possible that it's related to the MKV container and (or) AVC codec?

  1. Dowload the movie "Big Buck Bunny 60fps 4K - Official Blender Foundation Short Film.mp4" from youtube (AVC & AAC LC)
  2. Drag the movie over staxrip with SvtAv1EncApp selected, and all goes ok.
  3. Delete the staxrip temp folder.
  4. Convert the movie to mkv with mkvtoolnix GUI.
  5. Repeat the drag operation with the mkv file and you see the bug (I hope...)
    but I have downloaded from youtube some other movie (Broken Peach - Hot Stuff (Live at the Late Night Sessions).mkv for example) in mkv but encoded with VP9 and all goes fine...

@Dendraspis
Copy link
Collaborator

Even you didn't provide a link, I've done it and it works great for me:

image

The selected encoder has nothing to do with the demuxing process. Maybe your file was broken?

@Davizator51
Copy link
Author

I see, the issue is with the AVS filter. I usually have it set to 'Automatic,' but I changed it to FFMS2 (like your screen capture), and now it's working!

In reality, when it's set to 'Automatic,' I'm not sure which filter it's using – sure not FFMS2. However, in previous versions, it worked fine for me...

Thanks

@Dendraspis
Copy link
Collaborator

I've reset the templates, so this is a clean behaviour with Source | Automatic:

image

I'm pretty sure your video file was corrupted, so that one or more processes could not do their jobs.
If you get the same issue again, please check your source file and if it's okay, come back and provide a sample file, so I can try to reproduce it.

You're welcome.

@Davizator51
Copy link
Author

I'm sorry, but the error appears with all the videos (except those codified with VP9) I try (they can't all be corrupted!) and with all the filters except for source = FFMS2.
I tried on another computer, in case it was an issue with mine, but it gave me the same problem. I don't understand it.

Try with this video, for example, (https://www.youtube.com/shorts/jlKuJmknedc) is in AV1 but the result is the same.

@Dendraspis
Copy link
Collaborator

What CPU are you using?

@Davizator51
Copy link
Author

Davizator51 commented Aug 6, 2023

------------------------- System Environment -------------------------

StaxRip : v2.25.0
Windows : Windows 10 Pro 2009
Language : Spanish (Spain, International Sort)
CPU : AMD Ryzen 9 3950X 16-Core Processor
GPU : NVIDIA GeForce RTX 3070 Ti
Resolution : 2560 x 1080
DPI : 96
Code Page : 1252

and in the other computer:

------------------------- System Environment -------------------------

StaxRip : v2.25.0
Windows : Windows 10 Pro 2009
Language : Spanish (Spain, International Sort)
CPU : Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
GPU : NVIDIA GeForce GTX 1070
Resolution : 1920 x 1080
DPI : 96
Code Page : 1252

@Dendraspis
Copy link
Collaborator

Okay, so CPU-wise there should be no incompatibility.

However, in previous versions, it worked fine for me...

What was the lastest StaxRip version, that worked for you?

Nevertheless FFMS2 seems to make problems for whatever reasons. It doesn't make sense to create an encode of a YouTube video, from which I don't know, if it would cause the mentioned issues. Please provide a proper sample file. But I'm also sure I won't be able to reproduce it.

So if FFMS2 is the problem, you could try...

  1. Make sure to put and the source video file (separate) in folders with a short path length and rename the video file by using English alphabet letters, for example:
    D:\StaxRip-v2.25.0-x64\... for StaxRip and
    D:\Videos\video.mp4 for the video file
  2. Make sure you have writing or admin permissions for the temp file(s).
  3. Disable your AV app.
  4. Copy ffms2.dll from the latest working StaxRip version to the new one and replace the file.
  5. Use another source filter.

@Davizator51
Copy link
Author

Davizator51 commented Aug 7, 2023

I think I haven't expressed myself well in English, I'm sorry, my native language is Spanish and my English is poor.

I meant to say that the "source=FFMS2" is the only filter that doesn't give me problems, the rest of the source AVS filters are the ones that don't work for me. With "source=FFMS2" I have not problem.

Also, the problem doesn't occurs if the file extension is .mp4.

and folders has a short path length, and I use English alphabet letters.

Therefore, in summary:

source=FFMS2 ---> OK
or
source file extension=.mp4 ---> OK
or
source file codec=VP9 ---> OK

The last version that has worked for me is v2.24.0

@Dendraspis
Copy link
Collaborator

Yes, indeed. No problem.

So the problem is LWLibavVideoSource.
But it makes no sense, that StaxRip v2.24.0 worked/works for you, because there should have been nothing changed in v.2.25.0 related to this.

What could help is to download and install the Microsoft Visual C++ Redistributable Runtimes All-in-One.
And maybe replace ffmpeg.exe with this one.

If you can't figure it out, the last step would be to chose another source filter.
It must be a local problem, because it works for everybody, except you. 😕

@Davizator51
Copy link
Author

No luck with Microsoft Visual C++ Redistributable Runtimes All-in-One.
No luck with replacing ffmpeg.exe with this one.

I have installed a new clear Windows 11 in another ssd disk, no new apps, no new drivers, and the error persist....It's funny...

So I only have 2 options:

  1. Use the new 2.25 version with the FFMS2 filter, or
  2. Continue using 2.24 version.

I don´t know what's the difference between using FFMS2 or LWLibavVideoSource, and is witch is better.

Thank you Dendraspis for your patience, I don't know what more to do.

@Dendraspis
Copy link
Collaborator

Option 3: Wait for the next release and check that out. 😅

Yeah, pretty frustrating. But let us test one more replacement, please:
In ..\Apps\Support\FFTW there are 3 dll-files, please replace them with the ones included in v2.24.0.

If the won't work for you, I run out of ideas. 😞

@Davizator51
Copy link
Author

No, it doesn't work either.
I has replaced all the folders of Staxrip v2.25 with the folder of the previous version 2.24 one by one, doesn't work.

The only thing that works is to replace the file staxrip.exe, but I guess that's equivalent to going back to the previous version. 😞

Better wait to the next release.

@Dendraspis
Copy link
Collaborator

So when the only solution is to replace StaxRip.exe, it must be an issue with existing/old settings and templates.
Everything else makes no sense at the moment.

You could try to extract StaxRip into a completely different folder and start it from there - then when asked for a settings location, always select the first one, which is the Settings subfolder.
At that point you have a clean StaxRip instance and it must work, otherwise other users would have had already complained about it.

@Dendraspis
Copy link
Collaborator

It seems I could have the reason ... maybe. 🤔
Let's see if the next release will work for you, so be patient.....

@Davizator51
Copy link
Author

No worries, patience is my strong suit...(where are the damn smiles? I cannot find them...)

@wakywarez
Copy link

the bug is in the audio chapters, when these are wrong or rare the program is bugged, I solved it with mkvToolNix removing the audio chapters that are what give error not the video chapters

@Dendraspis
Copy link
Collaborator

Dendraspis commented Aug 17, 2023

Thanks for the information.

That's the reason why a sample file to reproduce the issue is so important.

@Davizator51
Copy link
Author

But I try with a movie file without audio tracks, only with the video track, and the bug persists....

And to reproduce the bug, I write again what I do, step by step:

  1. Choose a movie file (any movie) in a format other than .mp4 and encoded in a format other than VP9.
  2. Extract StaxRip-v2.25.0-x64.7z to D: in a new folder "StaxRip-v2.25.0-x64"
  3. Choose the settings folder in the same folder as the program. At this moment the template is Automatic Workflow as default.
  4. Change the video codec to AV1 > SvtAv1EncApp
  5. Open Video source file (or drag it over staxrip) and get the bug. (if you open the video with another codec selected, and then change the codec to SvtAv1EncApp the program works fine)

but if the video file is .mp4 or the codec is vp9, for example, this bug not occurs...

you can try with some video downloaded from https://sample-videos.com, in .flv, .3gp or .mkv. They are encoded with MPEG-4 but the bug is the same.

@Dendraspis
Copy link
Collaborator

If took the 10MB MKV sample file from the mentioned site and after all those previous tests I'm finally able to reproduce it. 👍

I'm going to investigate it for the next release and come back when it's solved.

@Dendraspis
Copy link
Collaborator

Wow, again something learned about StaxRip. 😅

A long search, but I've found it ... and fixed it, finally. So the next release coming out next week won't have this stupid bug anymore.
Thanks for the report and being patient.

@Davizator51
Copy link
Author

Great, and thanks... Good work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants