ekisu / mpv-webm

Simple WebM maker for mpv, with no external dependencies.
MIT License
556 stars 33 forks source link

Script doesn't work. #81

Closed Tempest32 closed 4 years ago

Tempest32 commented 4 years ago

mpv version and platform

mpv 0.32.0-383-ga09c7691d7, Windows 10 1809

FFmpeg library versions:
   libavutil       56.42.102
   libavcodec      58.80.100
   libavformat     58.42.100
   libswscale      5.6.101
   libavfilter     7.79.100
   libswresample   3.6.100
FFmpeg version: git-2020-04-19-18d69e9a9

Description

The script simply doesn't generate any clips despite showing "Encode saved successfully" or "Started first pass" if 2pass is selected.

Log file

https://paste.ee/p/7AnMo.

ekisu commented 4 years ago

Sorry for the late reply, could you try reproducing it with the latest script version, and sending me the log files?

Tempest32 commented 4 years ago

Hello, With the latest version non-2pass encodes seem to work but the audio and video are out of sync. The audio seems to be generated according to the specified timecodes but the video starts and ends a bit early. I actually faced this issue earlier as well, before the script stopped working altogether

2pass encodes generate the pass txt file and the webm file but the encode doesnt finish properly (mpv doesnt give the "Encode saved successfully" message and the 1pass txt file isnt deleted) If you try to play the webm file it doesn't have any video and only plays the audio.

Log: https://paste.ee/p/1MlHy

Edit: another thing, sometimes clips with a length around 2 seconds dont generate despite giving the success message

ekisu commented 4 years ago

The sync issues might be caused because it seems your playback speed is 0.98, playback speeds under 1 are a bit wonky.

The 2-pass issue seems to be that the script can't find the stats logfile generated by the first pass. Does the file D:\ Current Anime\[CTR] Hunter x Hunter (BD 720p)\[CTR] Hunter x Hunter - 054-[02.39.534-02.46.124]-audio.webm-video-pass1.log exists in the video folder?

Tempest32 commented 4 years ago

Hey, Seems like the 0.98 playback speed was indeed the culprit for the sync issues, resetting it to 1 works. No idea why it was like that though.

Regarding 2-pass, yeah the log file exists in the video folder.

ekisu commented 4 years ago

Well, that's weird. Please update to the latest build, it should give more details about what is happening.

Tempest32 commented 4 years ago

Hello, Looks like the 2pass issue is being caused by my folder name  Current Anime The space before 'C' is created by Alt+0160 aka the no-break space character.

I guess the script, or mpv itself, is unable to read the path of the pass1 log file due to that character. Tho it's strange how the generated clip has the audio but not the video as mentioned above.

Log: https://paste.ee/p/D5ikF

2pass encodes work fine for files in regular paths.

ekisu commented 4 years ago

There's currently no way around this with only Lua it seems, this is kinda related to #43 but there's no way to open/read a file with Unicode characters on Windows right now. I've opened an issue on mpv's repo about this;

TheAMM commented 4 years ago

You'll get the ping on the other thread as well, but for outsider observers, you can (ab)use subprocessing. Cheers.

ekisu commented 4 years ago

Well, it's a quite unusual way of doing it, but if there's no way around it...

ekisu commented 4 years ago

The latest Windows builds should work without the workaround, so I reverted it on 50bad38. Feel free to reopen the issue if the problem comes back.