ekisu / mpv-webm

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

Encode fails if file is hosted on a remote drive (ex: samba) #145

Open ghost opened 1 year ago

ghost commented 1 year ago

mpv version and platform

Windows 10 19044.1766

mpv 0.34.0-361-g3a2838c88d Copyright © 2000-2022 mpv/MPlayer/mplayer2 projects
 built on Sun Jun 26 01:02:34 2022
FFmpeg library versions:
   libavutil       57.27.100
   libavcodec      59.34.100
   libavformat     59.25.100
   libswscale      6.6.100
   libavfilter     8.41.100
   libswresample   4.6.100
FFmpeg version: git-2022-06-25-e6cad011

Description

Encode fails if the source file is hosted on a remote drive (ex: smb mount). The file encodes successfully if the it is copied on my client first.

Log file

First log is with my webm.conf loaded and using vp9, second log is without configs loaded and using vp8

log.txt log.txt

ghost commented 1 year ago

After removing my mpv.conf and retrying I found out the script works as intended. It fails only when this rule is added to the options:

# Forces dialogue subs to load first in dvd rips (instead of op/ed/sign subs)
sid=1

I don't know why

JohnnyDarks commented 1 year ago

When you run ffprobe on the file, how many subtitle tracks does it have? Using the name in your from your log file, I downloaded a copy of '[SubsPlease] Yatogame-chan Kansatsu Nikki S1 - 01 (1080p) [BC3B3139].mkv' and it only had 1 subtitle track. So the file probably doesn't have ay subtitles with sid of 1.

ghost commented 1 year ago

While looking at --aid notes, I found out this piece of info:

With mpv 0.33.0, the behavior was changed. Now track selection options are reset to auto at playback initialization, if the option had tries to select a track that does not exist. The same is done if the track exists, but fails to initialize. The consequence is that unlike before mpv 0.33.0, the user's track selection parameters are clobbered in certain situations.

I believe --sid might follow the same logic, meaning that selecting a subtitle id that doesn't exist will make --sid fallback to auto. There should be no problem by setting sid=1 in the configs, considering videos played without errors and that it's only a problem when I try to encode a video with this script. I am not sure why this problem would only occur with files not hosted on my client though.

The only error line in the log does say

[ 66.049][v][webm] Command failed! Reason: nil Killed by us? no

with emphasis on Killed by us? no, so I am not sure what is making the script throw error.