porcino / Av1ador

AV1/VVC/HEVC/VP9/H264 parallel encoder GUI for FFmpeg with preview/comparison
GNU General Public License v3.0
52 stars 2 forks source link

Not all files get encoded when selecting "encode entire list" #20

Closed Anacondo closed 8 months ago

Anacondo commented 9 months ago

Happy new year! 🥂

I found a bug where the "encode entire list" button doesn't finish the whole list. If you add n files, then select this button, then add for example 2 more videos, only the first n files get encoded and the system stops encoding after that, leaving the last 2 videos untouched. I'm using the latest nightly.

porcino commented 9 months ago

Mmm weird, I can't reproduce this issue

https://github.com/porcino/Av1ador/assets/58743577/7fbf2943-4ac0-47a7-87eb-6bbb1c6f5dee

Anacondo commented 9 months ago

Interesting, thank you. I'll test again tomorrow once I have some time. I woke up a couple days ago after some nighttime encoding and only 4 out of 7 vids from my queue were finished, and I clearly remember adding the last few after encoding had started, so I assumed this could be the bug. The green "play" button to start encoding was visible and the red stop button greyed out, so something else must have stopped the process. I'll keep you posted with my findings.

porcino commented 9 months ago

This can help a little 0becbc64d44b83aebe51b5848ef477d61869e614 if the current encode fails, it will encode the next. One thing I'm actually not detecting, is when the merging (segments of video plus audio) fails, the process may stop there, I need to test it

Anacondo commented 9 months ago

I haven't been able to test the latest nightly, but I think I know what happened. Today I woke up again with an incomplete list after one single video had finished. This is my recollection of what I did:

  1. Add several videos to the list, press the "encode queue" button and then begin encoding
  2. Before I go to bed, I see that the 1st video is done but the result is way too big. I move the 2nd video (currently encoding) up to the 1st spot, so that the previous video is now 2nd. I set a higher CRF value for the 2nd video and go to bed.
  3. I wake up to the 1st video being finished and the 2nd and all the other videos in the queue have not started.

Not sure if this could have anything to do with https://github.com/porcino/Av1ador/commit/0becbc64d44b83aebe51b5848ef477d61869e614 but something is preventing the queue from being completed when there's some video reordering going on. BTW, I had this selected in my temporary files to erase:

image

porcino commented 9 months ago

I still can't reproduce this, I don't think reordening is related, something else is going on. Does the merging complete successfully? when the encode completes, does it has the audio and has the right length?

https://github.com/porcino/Av1ador/assets/58743577/19859d67-0e40-4c02-95b0-88b1ee080be2

Anacondo commented 9 months ago

Yes, as far as I can tell all the audio and video files are merged and the lengths match. I see you're encoding in h264 using nvenc, have you tried using svt-av1 instead? I will run a test later tonight with shorter videos like yours, and see if I can trigger the issue again,

Anacondo commented 8 months ago

Sorry for the late reply, real life got in the way.

I prepared some test files and tried everything I could think of that I do during a regular encode, but I haven't been able to reproduce the issue in any way. Since testing with regular length videos would be impossible and you haven't been able to trigger the issue on your side, feel free to close this. I will try to figure it out and then I can open the issue again.