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

Empty mp4 file created after successful upscaling through Anime4kcpp #280

Closed
Dasyud opened this issue Jun 1, 2020 · 10 comments
Closed

Empty mp4 file created after successful upscaling through Anime4kcpp #280

Dasyud opened this issue Jun 1, 2020 · 10 comments
Assignees
Labels
type:Question This is a question

Comments

@Dasyud
Copy link

Dasyud commented Jun 1, 2020

Environment Information

Module Version
Video2X
FFmpeg
waifu2x-caffe
waifu2x-converter-cpp
waifu2x-ncnn-vulkan

Symptom

Took me 4 hours to upscale a 480p 30 min episode by a factor of 2 using anime4kcpp. It was successful in the end, unlike my previous failures with waifu2x. The temp images that were being created were correctly upscaled, but the final mp4 was empty for some reason.
I cloned the repository yesterday, GUI version is 2.5.0

Edit: I noticed that an mkv file was created too, slipped my eye. However, there isn't any audio in this file and it is occupying 720MB, 8 times bigger than the original 90 MB.

Edit 2: It's missing the subtitles too.

Screenshots or Error Messages

Please paste screenshots or error messages here.
Include as much details as you can, as this greatly helps debugging the problem.

Please paste your error message in the code block down below:

@Dasyud Dasyud changed the title Empty video file after successful upscaling through Anime4kcpp Empty mp4 file created after successful upscaling through Anime4kcpp Jun 1, 2020
@k4yt3x
Copy link
Owner

k4yt3x commented Jun 2, 2020

The MKV file will be created only if the audio/subtite/etc migration has failed.
Do you have any logs or screenshots?

@k4yt3x k4yt3x added the state:waitingForCreator Further information required label Jun 2, 2020
@Dasyud
Copy link
Author

Dasyud commented Jun 2, 2020

This is the only screenshot that I have, it's most probably useless though without the console output.
image

Could there be a problem on my end? I got the same error after upscaling a 20 min episode through dandere2x. The mp4 in the output folder is empty in dandere's case and there is a mkv without sound and subtitles in dandere's workspace folder. This is after using the dandere 1.8 beta though.

I know that I shouldn't expect you to know about dandere, but just giving you all the info I have.

@k4yt3x
Copy link
Owner

k4yt3x commented Jun 2, 2020

Well dandere2x's using some of older versions of v2x's code, so technically I wrote some of it?
Besides, both of them are based on the same concept.
The MKV file will be produced only if audio and other stream failed to get migrated, so I'm suspecting an incompatible audio codec or something of that sort.

If you disable stream copying or use mkv as output format it should be fine.
image

@Dasyud
Copy link
Author

Dasyud commented Jun 4, 2020

What exactly changes when I disable stream copying?
I ran out of disk space while converting the upscaled photos to a video, had 200gb free space. It was a 24 min episode, 720p to 1440p. I used Anime4kcpp for the process.

@k4yt3x
Copy link
Owner

k4yt3x commented Jun 4, 2020

If "Copy streams" is checked, all streams except for the first video stream (which has been upscaled) will be copied directly from the original video to the upscaled video without re-encoding. At times the codec used in the original video might not be compatible with the new container format (e.g. FLAC from MKV into MP4). Unchecking this will instruct FFmpeg to re-encode all streams copied automatically with a codec that the output container supports.

@Dasyud
Copy link
Author

Dasyud commented Jun 4, 2020

Isn't there an option to keep the new container format as mkv by default as most anime files are mkv? Will copying streams save space on my laptop? I didn't face this storage problem when I had 110GB free last time, but I freed up another 80GB this time and for some reason ran into the issue.
Edit: I didn't take a screenshot of the console window and forgot to check the temp folder size before closing video2x, so sadly I don't have anything to help you out with this issue.

@k4yt3x
Copy link
Owner

k4yt3x commented Jun 4, 2020

  1. The output format will be MP4 by default.
  2. The output format for each file will follow input container format if multiple output files are specified.
  3. Copying streams will not save any space, but save processing time as no re-encoding is required. Also, it will preserve the original quality of the stream (e.g., audio stream).
  4. This issue should not be related to your storage, but your input file container format, streams codecs, etc.

@Dasyud
Copy link
Author

Dasyud commented Jun 4, 2020 via email

@k4yt3x k4yt3x added type:Question This is a question and removed state:waitingForCreator Further information required labels Jun 8, 2020
@k4yt3x k4yt3x closed this as completed Jun 8, 2020
@k4yt3x
Copy link
Owner

k4yt3x commented Jun 8, 2020

Leave another message if you're still experiencing issues

@Dasyud
Copy link
Author

Dasyud commented Jun 8, 2020

I apologize for not following up, didn't get an opportunity to try it again. I'll open a separate issue if I experience the storage space problem again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Question This is a question
Projects
None yet
Development

No branches or pull requests

2 participants