kwsou / video2x

Video upscaler using popular upscaling algorithm waifu2x to magnify and denoise artifacts from low resolution videos
110 stars 13 forks source link

Error: EPERM: operation not permitted, open 'D:\video2x.v1.0.2\temp\a4274740-4300-11ea-bffe-4f42d25c7044\extracted\thread1\frame10.png' #7

Closed ncthanh2000 closed 4 years ago

ncthanh2000 commented 4 years ago

So I've finished extracting the frames out of my 720p .mkv file

However, when splitting up frames to smaller groups to be upscaled, I was met with this error posted as the title. Cmd Promt below:

D:\video2x.v1.0.2>video2x.exe -i "C:\Users\nctha\Documents\MEGAsync Downloads\Bakugan\Bakugan - S01 (720p WEB x265 HEVC 10bit AAC 2.0 Th3ViSTa)\Bakugan Battle Brawlers - S01E01 - Bakugan The Battle Begins (720p WEB x265 Th3ViSTa).mkv" -o "C:\Users\nctha\Documents\MEGAsync Downloads\Bakugan\Upscaled\Bakugan - S01 (720p WEB x265 HEVC 10bit AAC 2.0 Th3ViSTa)\Bakugan Battle Brawlers - S01E01 - Bakugan The Battle Begins (720p WEB x265 Th3ViSTa).mkv" -c "config\rtx-2080-ti.json"

#    # # #    # #      #    # #     #  #  #
#    # # #    # #####  #    #       #   ##
#    # # #    # #      #    #  #####    ##
 #  #  # #    # #      #    # #        #  #
  ##   # #####  ######  ####  ####### #    #

Reading config file in "config\rtx-2080-ti.json" Retrieving video metadata Command: ffprobe -of json -show_streams -show_format "C:\Users\nctha\Documents\MEGAsync Downloads\Bakugan\Bakugan - S01 (720p WEB x265 HEVC 10bit AAC 2.0 Th3ViSTa)\Bakugan Battle Brawlers - S01E01 - Bakugan The Battle Begins (720p WEB x265 Th3ViSTa).mkv" Creating new workspace directory: temp\a4274740-4300-11ea-bffe-4f42d25c7044 Creating directory under workspace to store extracted frames: temp\a4274740-4300-11ea-bffe-4f42d25c7044\extracted Creating directory under workspace to store upscaled frames: temp\a4274740-4300-11ea-bffe-4f42d25c7044\upscaled Extracting frames from source video Command: ffmpeg -i C:\Users\nctha\Documents\MEGAsync Downloads\Bakugan\Bakugan - S01 (720p WEB x265 HEVC 10bit AAC 2.0 Th3ViSTa)\Bakugan Battle Brawlers - S01E01 - Bakugan The Battle Begins (720p WEB x265 Th3ViSTa).mkv -y -threads 0 temp\a4274740-4300-11ea-bffe-4f42d25c7044\extracted\frame%d.png Extracted 39887 frames from "C:\Users\nctha\Documents\MEGAsync Downloads\Bakugan\Bakugan - S01 (720p WEB x265 HEVC 10bit AAC 2.0 Th3ViSTa)\Bakugan Battle Brawlers - S01E01 - Bakugan The Battle Begins (720p WEB x265 Th3ViSTa).mkv" (Size: 106.22 GB, Time: 0.87 hours, approx. 52 minutes) Upscaling the extracted frames from 960x720 to 1920x1080 Splitting up the frames into smaller groups, each to be processed by its own waifu2x thread [Thread1] 39887 (100.0%) frames - cuDNN mode { Error: EPERM: operation not permitted, open 'D:\video2x.v1.0.2\temp\a4274740-4300-11ea-bffe-4f42d25c7044\extracted\thread1\frame10.png' at Object.fs.openSync (fs.js:646:18) at Object.fs.openSync (pkg/prelude/bootstrap.js:490:32) at moveFileSyncAcrossDevice (C:\snapshot\video2x\node_modules\fs-extra\lib\move-sync\index.js:70:18) at moveSyncAcrossDevice (C:\snapshot\video2x\node_modules\fs-extra\lib\move-sync\index.js:58:12) at tryRenameSync (C:\snapshot\video2x\node_modules\fs-extra\lib\move-sync\index.js:44:18) at Object.moveSync (C:\snapshot\video2x\node_modules\fs-extra\lib\move-sync\index.js:22:3) at C:\snapshot\video2x\app.js:107:28 at Object.performStep (C:\snapshot\video2x\lib\utils.js:15:14) at C:\snapshot\video2x\app.js:88:19 at Object.performStep (C:\snapshot\video2x\lib\utils.js:15:14) errno: -4048, code: 'EPERM', syscall: 'open', path: 'D:\video2x.v1.0.2\temp\a4274740-4300-11ea-bffe-4f42d25c7044\extracted\thread1\frame10.png' }

I have CUDNN installed ('checked with waifu-caffee') and I'm not sure what's going on here. for some reasons, after extracting frames from the original video (there are~40k .png files), the created 'thread1' folder within 'extracted' only contains frame1 and frame10 (so 2 frames out of 40k)

ncthanh2000 commented 4 years ago

Update: I've tried tweaking the "-b" value to "8" and "-c" value to "64", nothing seemed to have changed

kwsou commented 4 years ago

Hi there,

The error you got occurred when it tried to move files from one folder, 'D:\video2x.v1.0.2\temp\a4274740-4300-11ea-bffe-4f42d25c7044\extracted to another folder, 'D:\video2x.v1.0.2\temp\a4274740-4300-11ea-bffe-4f42d25c7044\extracted\thread1.

In particular, it had a problem trying to move the frame10.png file. It looks like another program (i.e. paint, photo, etc.) was locking that specific file. Can you confirm if that was the case?

Thanks.

ncthanh2000 commented 4 years ago

Hi there,

I tried looking but couldn't find any other program that was locking the frame10.png file. Moreover, the folder D:\video2x.v1.0.2\temp\a4274740-4300-11ea-bffe-4f42d25c7044\extracted\thread1 has already contained the frame10.png in there.

Does this helps?

kwsou commented 4 years ago

Hmm, strange. I'm not sure what happened. Can you try again on a smaller file so you don't need to wait as long?

Thanks.

ncthanh2000 commented 4 years ago

Things seem to work now, when I opened Command Promt with Administrator privileges. I'm not entirely sure why but could you perhaps add this to the running tutorial so maybe others could avoid getting this error?