FallingSnow / h265ize

A node utility utilizing ffmpeg to encode videos with the hevc codec.
MIT License
527 stars 81 forks source link

Process occasionally failing at 100% #107

Closed my95z34 closed 6 years ago

my95z34 commented 6 years ago

I am running h265ize on my Windows 10 box, converting videos on a SMB share on my FreeNAS box. Occasionally the process will just stop after a file has finished. I've noticed it a handful of times.

Command running is: h265ize --stats --delete

Looking at the file, it looks like it converted properly. Only thing I can think of is, I have two boxes pointing at my library and converting at the same time. I'm wondering if somehow maybe they finished the same file at the same time and there was a write issue? I'm not sure. For some reason, my linux box is going (mostly) in alphabetical order, where the Windows box seems to be jumping all over the place.

I Googled the error codes and didn't find anything.

I'm not sure what else you'd need as far as longs, but this is what the output of the terminal shows:

[h265ize]: Processing -redacted-.mp4...

[h265ize]: [alert] Audio does not have a title. Title set to "English AAC LC (Stereo)". [h265ize]: [ffmpeg] Processing: 71fps 100.0% [00:19:49.73] | 00:06:42 [x2.961] 00:00:00 177.25 MB [h265ize]:

  • errno: -4075
  • code: EEXIST
  • syscall: open
  • path: -redacted-.mkv [h265ize]: Process exited.

Thanks in advance!

FallingSnow commented 6 years ago

Ahh, after rereading what you wrote I think the issue is as you described. One instance starts encoding a video that I'd already being worked on by the other.

You need to find a way the divide up which files that will be worked on by which instance, maybe by moving the inputs into two separate folders, one for the Linux box and one for the Windows machine. Then merge the outputs at the end.

Most of the other fixes I can think of are fairly complex.

To give you a better explanation of what I think is happening, the second instance to start working on the same video file tries to move the completed video to it's final destination which already exists because the first instance already finished the video. Hence the EEXIST error.

my95z34 commented 6 years ago

That makes sense. I appreciate it! This weekend I'll try to move files around to alleviate the issue. Could there possibly be an option so that if an issue like this happens that it just skip it and start the next file, instead of halting like it currently does?

FallingSnow commented 6 years ago

Could there possibly be an option so that if an issue like this happens that it just skip it and start the next file, instead of halting like it currently does?

This has been a requested feature and will exist in nmmes, if I ever find the time to finish it while working on school...

my95z34 commented 6 years ago

So, I figured out the issue.... lmao... It was my fault. I started out converting without the --delete, and was just dragging the converted files over into the original folder. Well, a few episodes happened to be .mp4 so the new file wasn't overwriting them. Then when I changed to --delete, it was converting the old .mp4 file and then erroring out when it found the 265 .mkv already there.

i r dum.