h265ize icon indicating copy to clipboard operation
h265ize copied to clipboard

--delete causes ENOENT.

Open skarekrow opened this issue 8 years ago • 9 comments
trafficstars

Passing --delete to the latest GitHub version(h265ize master#6e15704) results in the encode immediately halting due to non-existance of h265/MOVIE, which is expected, as it will be replacing ./MOVIE.

Unhandled rejection Error: ENOENT: no such file or directory, unlink '/mnt/nas/purchased/movies/The Big Lebowski (1998)/h265/The Big Lebowski.mkv'
    at Object.fs.unlinkSync (fs.js:1066:18)
    at /root/n/lib/node_modules/h265ize/lib/classes/video.js:1258:20
    at arrayEach (/root/n/lib/node_modules/h265ize/node_modules/lodash/lodash.js:537:11)
    at Function.forEach (/root/n/lib/node_modules/h265ize/node_modules/lodash/lodash.js:9359:14)
    at /root/n/lib/node_modules/h265ize/lib/classes/video.js:1257:15
    at Video.cleanUp (/root/n/lib/node_modules/h265ize/lib/classes/video.js:1256:16)
    at Video.stop (/root/n/lib/node_modules/h265ize/lib/classes/video.js:1251:21)
    at Encoder.removeVideo (/root/n/lib/node_modules/h265ize/lib/classes/encoder.js:176:19)
    at EventEmitter.<anonymous> (/root/n/lib/node_modules/h265ize/lib/classes/encoder.js:147:23)
    at emitOne (events.js:96:13)
    at EventEmitter.emit (events.js:189:7)
    at /root/n/lib/node_modules/h265ize/lib/classes/video.js:1181:26
From previous event:
    at Video.start (/root/n/lib/node_modules/h265ize/lib/classes/video.js:1173:34)
    at Encoder.loop (/root/n/lib/node_modules/h265ize/lib/classes/encoder.js:151:15)
    at Encoder.start (/root/n/lib/node_modules/h265ize/lib/classes/encoder.js:73:18)
    at /root/n/lib/node_modules/h265ize/h265ize:255:25

Complete log here

skarekrow avatar Mar 31 '17 01:03 skarekrow

Complete log here

This suggest an error occurred with ffmpeg, most likely due to an issue similar to the Monsters Inc issue.

It seems like the snippet above is an error from h265ize trying to remove the failed encode, but since the encode never started there is no file. This can be ignored. Also the snippet is not contained in the complete log so I'm having trouble understanding where it occurred.

Lastly, try running

ffmpeg -n 10 /root/bin/ffmpeg -i "The Big Lebowski.mkv" -y -acodec copy -vcodec libx265 -filter:v crop=1920:1040:0:20 -c:s copy -c:d copy -pix_fmt yuv420p -map 0:0 -map 0:1 -map 0:2 -metadata:s:0:2 title=English -metadata:s:0:2 DISPOSITION:default=0 -crf 23 -preset medium "/mnt/nas/purchased/movies/The Big Lebowski (1998)/h265/The Big Lebowski.mkv"

to see exactly what went wrong.

FallingSnow avatar Mar 31 '17 01:03 FallingSnow

Yeah it appeared after flushing the log to the disk, but this movie doesn't have a TrueHD track, but a DTS-HD one like most of the other ones that have successfully run. Will run your command and reply back.

skarekrow avatar Mar 31 '17 01:03 skarekrow

Interesting:

[NULL @ 0x2c0e6c0] Unable to find a suitable output format for '10'
10: Invalid argument

Log

skarekrow avatar Mar 31 '17 01:03 skarekrow

That might be my fault... try

ffmpeg -i "The Big Lebowski.mkv" -y -acodec copy -vcodec libx265 -filter:v crop=1920:1040:0:20 -c:s copy -c:d copy -pix_fmt yuv420p -map 0:0 -map 0:1 -map 0:2 -metadata:s:0:2 title=English -metadata:s:0:2 DISPOSITION:default=0 -crf 23 -preset medium "/mnt/nas/purchased/movies/The Big Lebowski (1998)/h265/The Big Lebowski.mkv"

FallingSnow avatar Mar 31 '17 01:03 FallingSnow

No, your new command has the path to the non-existant file :)

"/mnt/nas/purchased/movies/The Big Lebowski (1998)/h265/The Big Lebowski.mkv" should be "/mnt/nas/purchased/movies/The Big Lebowski (1998)/The Big Lebowski.mkv"

Using h265ize 0.4.3-r2 the movie starts encoding with the same command given.

skarekrow avatar Mar 31 '17 01:03 skarekrow

So... All's well that ends well? :P

FallingSnow avatar Mar 31 '17 01:03 FallingSnow

An image showing that

Hahah if only! Some regression happened, if I knew node, I'd send you a PR :P

skarekrow avatar Mar 31 '17 01:03 skarekrow

Perhaps: https://github.com/FallingSnow/h265ize/commit/20e19f0f170d64d9e08ce1f9a223488583a90189#diff-b5aeacf0b0e89c4ad9316070981779a4L58?

EDIT: Hmm perhaps not as you then use that to move. I'm not sure, sorry! I hope you have an idea :D

skarekrow avatar Mar 31 '17 01:03 skarekrow

This is very easy to reproduce:

  • h265ize --delete ./TEST.mkv

Just make sure no h265 directory exists in that location and it will not continue encoding.

skarekrow avatar Mar 31 '17 20:03 skarekrow