轉換為 Move File 時隨機失敗

嗨,Goose,

我多年来一直使用一个转换脚本,它会将录制文件重命名为 Plex 兼容的格式,然后根据节目名称移动到对应文件夹。

大约从 3、4 周前开始,部分文件移动会随机失败。要么过一会儿成功,要么第二天晚上成功,导致某些节目出现重复。
出现此问题的节目有:FBI International、Magnum 和 Quantum Leap。

我找不到原因,附上主日志和一个重复节目的示例。
mcebuddy.zip (66.8 KB)

日志节选如下:

INFORMATION> 2023-03-01T02:16:02 MCEBuddy.Engine.Core --> Job for \\MEDIACENTER\Recorded TV\FBI- International_s02e14 He Who Speaks Dies_WCBSDT_2023_02_28_20_55_00.wtv completed

INFORMATION> 2023-03-01T02:16:02 --> Job for \\MEDIACENTER\Recorded TV\FBI- International_s02e14 He Who Speaks Dies_WCBSDT_2023_02_28_20_55_00.wtv has Error Moving converted file to destination failed using conversion task -> Move WTV Recorded TV and profile -> WTV Unprocessed

INFORMATION> 2023-03-01T02:16:03 --> Request to send eMail

2023-03-01T02:16:03 --> Server -> xxxxxxxxx

2023-03-01T02:16:03 --> Port -> 25

2023-03-01T02:16:03 --> SSL -> False

2023-03-01T02:16:03 --> Username -> xxxxxxxxx

2023-03-01T02:16:03 --> From -> xxxxxxxxx

2023-03-01T02:16:03 --> To -> xxxxxxxxx

2023-03-01T02:16:03 --> Subject -> MCEBuddy failed to converted a video

2023-03-01T02:16:03 --> Message -> Source Video -> \\MEDIACENTER\Recorded TV\FBI- International_s02e14 He Who Speaks Dies_WCBSDT_2023_02_28_20_55_00.wtv

Profile -> WTV Unprocessed

Conversion Task -> Move WTV Recorded TV

Error -> Moving converted file to destination failed

Failed At -> 2023-03-01T02:16:02

INFORMATION> 2023-02-27T02:35:33 MCEBuddy.Engine.Core --> Job for \\MEDIACENTER\Recorded TV2\Magnum P.I._s05e03 Number One With a Bullet_WNBCDT_2023_02_26_20_55_00.wtv completed

INFORMATION> 2023-02-27T02:35:33 --> Job for \\MEDIACENTER\Recorded TV2\Magnum P.I._s05e03 Number One With a Bullet_WNBCDT_2023_02_26_20_55_00.wtv has Error Moving converted file to destination failed using conversion task -> Move WTV Recorded TV and profile -> WTV Unprocessed

INFORMATION> 2023-02-27T02:35:33 --> Request to send eMail

2023-02-27T02:35:33 --> Server -> xxxxxxxxx

2023-02-27T02:35:33 --> Port -> 25

2023-02-27T02:35:33 --> SSL -> False

2023-02-27T02:35:33 --> Username -> xxxxxxxxx

2023-02-27T02:35:33 --> From -> xxxxxxxxx

2023-02-27T02:35:33 --> To -> xxxxxxxxx

2023-02-27T02:35:33 --> Subject -> MCEBuddy failed to converted a video

2023-02-27T02:35:33 --> Message -> Source Video -> \\MEDIACENTER\Recorded TV2\Magnum P.I._s05e03 Number One With a Bullet_WNBCDT_2023_02_26_20_55_00.wtv

Profile -> WTV Unprocessed

INFORMATION> 2023-02-27T03:39:46 MCEBuddy.Engine.Core --> Job for \\MEDIACENTER\Recorded TV2\The Equalizer_s03e09 Second Chance_WCBSDT_2023_02_26_19_00_00.wtv completed

INFORMATION> 2023-02-27T03:39:46 --> Job for \\MEDIACENTER\Recorded TV2\The Equalizer_s03e09 Second Chance_WCBSDT_2023_02_26_19_00_00.wtv has Error Moving converted file to destination failed using conversion task -> Move WTV Recorded TV and profile -> WTV Unprocessed

INFORMATION> 2023-02-27T03:39:46 --> Request to send eMail

2023-02-27T03:39:46 --> Server -> xxxxxxxxx

2023-02-27T03:39:46 --> Port -> 25

2023-02-27T03:39:46 --> SSL -> False

2023-02-27T03:39:46 --> Username -> xxxxxxxxx

2023-02-27T03:39:46 --> From -> xxxxxxxxx

2023-02-27T03:39:46 --> To -> xxxxxxxxx

2023-02-27T03:39:46 --> Subject -> MCEBuddy failed to converted a video

2023-02-27T03:39:46 --> Message -> Source Video -> \\MEDIACENTER\Recorded TV2\The Equalizer_s03e09 Second Chance_WCBSDT_2023_02_26_19_00_00.wtv

Profile -> WTV Unprocessed

Conversion Task -> Move WTV Recorded TV

Error -> Moving converted file to destination failed

Failed At -> 2023-02-27T03:39:46

您附加的日誌顯示轉換成功,且檔案已成功移至目的地 NAS 資料夾

INFORMATION> 2023-03-01T02:56:13 --> Job for \\MEDIACENTER\Recorded TV\La Brea_s02e14 The Journey, Part 2_WNBCDT_2023_02_28_22_00_04.wtv converted successfully to \\MEDIACENTER\Recorded TV\La Brea\La Brea - S02E14_2023_02_28.wtv using conversion task -> Move WTV Recorded TV and profile -> WTV Unprocessed
INFORMATION> 2023-03-01T02:56:13 --> Request to send eMail
2023-03-01T02:56:13 --> Server -> xxxxxxxxx
2023-03-01T02:56:13 --> Port -> 25
2023-03-01T02:56:13 --> SSL -> False
2023-03-01T02:56:13 --> Username -> xxxxxxxxx
2023-03-01T02:56:13 --> From -> xxxxxxxxx
2023-03-01T02:56:13 --> To -> xxxxxxxxx
2023-03-01T02:56:13 --> Subject -> MCEBuddy successfully converted a video
2023-03-01T02:56:13 --> Message -> Source Video -> \\MEDIACENTER\Recorded TV\La Brea_s02e14 The Journey, Part 2_WNBCDT_2023_02_28_22_00_04.wtv
Converted Video -> \\MEDIACENTER\Recorded TV\La Brea\La Brea - S02E14_2023_02_28.wtv
Profile -> WTV Unprocessed
Conversion Task -> Move WTV Recorded TV
Converted At -> 2023-03-01T02:56:13
Time taken to convert (hh:mm) -> 00:14

2023-03-01T02:56:13 MCEBuddy.Engine.Core --> No conversions running, allowing system sleep
2023-03-01T02:56:13 MCEBuddy.Engine.ConversionJob --> Starting Conversion Thread
INFORMATION> 2023-03-01T02:56:13 MCEBuddy.Engine.ConversionJob --> Creating log file : C:\Program Files\MCEBuddy2x\log\FBI International - S02E14_2023_02_28.wtv-Move WTV Recorded TV-1900-01-01T00-00-00.log
INFORMATION> 2023-03-01T02:56:13 MCEBuddy.Engine.Core --> Job for \\MEDIACENTER\Recorded TV\FBI International\FBI International - S02E14_2023_02_28.wtv started using conversion task -> Move WTV Recorded TV and profile -> WTV Unprocessed
2023-03-01T02:56:13 MCEBuddy.Engine.Core --> Temp working path is C:\Program Files\MCEBuddy2x\working0
2023-03-01T02:56:13 MCEBuddy.Engine.Core --> Starting new conversions, preventing system sleep
INFORMATION> 2023-03-01T02:56:14 --> Successfully send eMail
WARNING> 2023-03-01T02:56:25 MCEBuddy.Engine.QueueManager --> Monitor task E Drive Recorded TV : Unable to queue file for conversion - file inaccessible/locked by another process \\MEDIACENTER\Recorded TV\La Brea_s02e14 The Journey, Part 2_WNBCDT_2023_02_28_22_00_04.wtv

2023-03-01T02:56:26 MCEBuddy.Engine.QueueManager --> Monitor task E Drive Recorded TV : File \\MEDIACENTER\Recorded TV\FBI Most Wanted\FBI Most Wanted - S04E14_2023_02_28.wtv already converted with status OutputFromConversion
2023-03-01T02:56:26 MCEBuddy.Engine.QueueManager --> Monitor task E Drive Recorded TV : File \\MEDIACENTER\Recorded TV\La Brea\La Brea - S02E14_2023_02_28.wtv already converted with status OutputFromConversion
INFORMATION> 2023-03-01T03:10:28 MCEBuddy.Engine.QueueManager --> No accessible files founds in location \\MEDIACENTER\Recorded TV5 for monitor task I Drive Recorded TV5
INFORMATION> 2023-03-01T03:11:53 MCEBuddy.Engine.Core --> Job for \\MEDIACENTER\Recorded TV\FBI International\FBI International - S02E14_2023_02_28.wtv completed
2023-03-01T03:11:53 MCEBuddy.Engine.Core --> Deleting original file \\MEDIACENTER\Recorded TV\FBI International\FBI International - S02E14_2023_02_28.wtv
2023-03-01T03:11:53 MCEBuddy.Engine.QueueManager --> Deleting directory \\MEDIACENTER\Recorded TV\FBI International
ERROR> 2023-03-01T03:11:53 MCEBuddy.Engine.QueueManager --> Unable to read parent directory contents \\MEDIACENTER\Recorded TV\FBI International
System.IO.IOException: The directory is not empty.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
   at MCEBuddy.Engine.QueueManager.DeleteParentDirectoryChainIfEmpty(String filePath, String uptoParentFolder)
INFORMATION> 2023-03-01T03:11:53 --> Job for \\MEDIACENTER\Recorded TV\FBI International\FBI International - S02E14_2023_02_28.wtv converted successfully to \\MEDIACENTER\Recorded TV\FBI International\FBI International\FBI International - S02E14_2023_02_28.wtv using conversion task -> Move WTV Recorded TV and profile -> WTV Unprocessed
INFORMATION> 2023-03-01T03:11:53 --> Request to send eMail
2023-03-01T03:11:53 --> Server -> xxxxxxxxx
2023-03-01T03:11:53 --> Port -> 25
2023-03-01T03:11:53 --> SSL -> False
2023-03-01T03:11:53 --> Username -> xxxxxxxxx
2023-03-01T03:11:53 --> From -> xxxxxxxxx
2023-03-01T03:11:53 --> To -> xxxxxxxxx
2023-03-01T03:11:53 --> Subject -> MCEBuddy successfully converted a video
2023-03-01T03:11:53 --> Message -> Source Video -> \\MEDIACENTER\Recorded TV\FBI International\FBI International - S02E14_2023_02_28.wtv
Converted Video -> \\MEDIACENTER\Recorded TV\FBI International\FBI International\FBI International - S02E14_2023_02_28.wtv
Profile -> WTV Unprocessed
Conversion Task -> Move WTV Recorded TV
Converted At -> 2023-03-01T03:11:53
Time taken to convert (hh:mm) -> 00:15

2023-03-01T03:11:53 MCEBuddy.Engine.Core --> No conversions running, allowing system sleep
INFORMATION> 2023-03-01T03:11:55 --> Successfully send eMail
INFORMATION> 2023-03-01T03:15:26 MCEBuddy.Engine.QueueManager --> No accessible files founds in location \\MEDIACENTER\Recorded TV-C for monitor task C Drive Recorded TV-C
2023-03-01T03:15:31 MCEBuddy.Engine.QueueManager --> Monitor task E Drive Recorded TV : File \\MEDIACENTER\Recorded TV\FBI International\FBI International\FBI International - S02E14_2023_02_28.wtv already converted with status OutputFromConversion

不過我確實看到其他與讀取及刪除 NAS 目錄有關的錯誤。檔案被鎖定,或 NAS 拒絕存取這些檔案/目錄。

如果您遇到 NAS 問題,通常就是 NAS 本身的問題。這些可能由網路問題、與其他電腦的共用問題、NAS 內部問題(例如日期/時間不正確導致存取被拒)等引起。最近您的 NAS 韌體有更新嗎?也請參考這篇文章:

嗨,Goose,

感谢你的见解。

在你提到的文件被移动的情况中,是在处理后的第二天完成的。

昨晚我遇到了《The Equalizer》的问题。文件无法移动,我收到了一封指示失败的邮件。

不过,我可能已经找到了原因,但要过几天才能确认。

我对 MCEBuddy 可运行的时间有限制。昨晚大约有 6 个节目需要处理,可能超出了时间限制。我今天已经延长了时间范围,看看接下来几天会发生什么。

嗨,Goose,

我以為增加 mcebuddy 的處理時間就能解決所有問題,但我仍然遇到隨機的移動失敗。

NAS 上沒有任何韌體或其他變更。我進入 mcebuddy 並透過設定連結確認了存取權限。

之後我又收到了幾次移動失敗的郵件通知。最近一次是昨晚,關於我太太的某部節目。這是一部電影,理論上只需要把檔案移到 Movies 的子資料夾,用電影名稱加上年份作為檔名,並把電影重新命名加上年份即可,不需要移除廣告。

當我檢查 NAS 時,發現電影仍留在原始錄製位置,但檔案已被移到 movies 資料夾。然而,資料夾結構卻不對。

我得到的是:
Movies - A Winning Team (2023) - Movies - A Winning Team (2023) - 電影檔案,檔名正確。

不知為何,它把 Movies - A Winning Team (2023) 資料夾複製了一份。我通常只有在移動操作執行兩次時才會看到這種情況。

此外,原始電影檔案也沒有被刪除。

我已附上日誌。
mcebuddy Logs 03-19-2023.zip (116.5 KB)
感謝你提供的任何協助。

您的 NAS / 網路連線有問題。Windows 無法穩定讀取資料夾

ERROR> 2023-03-19T01:32:10 MCEBuddy.Engine.QueueManager → 無法讀取上層目錄內容 \\MEDIACENTER\Recorded TV2\Movies\A Winning Team (2023)
System.IO.IOException: 目錄不是空的。

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
at MCEBuddy.Engine.QueueManager.DeleteParentDirectoryChainIfEmpty(String filePath, String uptoParentFolder)

INFORMATION> 2023-03-19T00:58:18 MCEBuddy.Engine.ConversionJob → 正在移動已轉檔檔案 C:\Program Files\MCEBuddy2x\working0\A Winning Team (2023).wtv 到 \\MEDIACENTER\Recorded TV2\Movies\A Winning Team (2023)\A Winning Team (2023).wtv
ERROR> → 無法移動檔案 C:\Program Files\MCEBuddy2x\working0\A Winning Team (2023).wtv 到 \\MEDIACENTER\Recorded TV2
錯誤:System.IO.IOException: 發生未預期的網路錯誤。

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at MCEBuddy.Util.FileIO.MoveAndInheritPermissions(String source, String destination, Boolean overwriteDestination)
at MCEBuddy.Engine.ConversionJob.MoveConvertedFile(String subDestinationPath, Log jobLog)
ERROR> 2023-03-19T01:04:04 MCEBuddy.Engine.ConversionJob → 移動已轉檔檔案到目的地失敗

這就能解釋您所有間歇性問題(包括重複)的原因:看起來檔案實際上已傳輸完成,但您的 NAS 卻向 Windows 機器回傳錯誤,導致 MCEBuddy 誤以為失敗,因此不會刪除原始檔案。由於您設定 MCEBuddy 在原始資料夾內處理並取代檔案,現在它會看到兩個要處理的獨立檔案:原始檔案與「失敗」的已轉檔檔案(因其內部記錄顯示未成功,所以不會忽略已轉檔檔案),最終您將得到兩個重新處理的檔案。

這些問題都與您的網路問題以及您將原始與目的地設為同一資料夾有關。若兩者為不同資料夾,此類網路問題的影響可能較小(因為原始檔案最終會被刪除,畢竟它們位於不同資料夾)。

嗨,Goose,

感谢提供信息。我已确认正在使用网络路径,并且 Guest 账户拥有文件权限。

不过有一点我想纠正:我并没有把文件保存到与原始录音相同的文件夹。原始录音会被重命名并移动到一个以节目名称命名的文件夹中。

我还开始监控网络,自监控开始以来尚未检测到网络故障。然而,昨晚有 5 个节目出现了该问题,其中一些节目最终生成了多达 5 份副本。

您还有其他建议吗?

谢谢。

原諒我在同一個帖子裡發言,但我遇到了相同的問題。不過我的硬碟是同一台電腦上的本機磁碟。這情況和原發者一樣,不久前才開始發生。有些檔案能傳到「D槽」,有些則隨機失敗。我附上了一份日誌,如果這不是正確的地方請見諒,我只是想幫忙找出問題所在。
Restaurant- Impossible_DFCHD_2023_10_15_18_58_00.wtv-Comskip-2024-03-18T08-12-38.log (692.2 KB)

您的 DL 驱动器和/或录制的电视文件夹存在权限问题,Windows 拒绝 MCEBuddy 写入该目录

ERROR → Unable to move file C:\Program Files\MCEBuddy2x\working0\Restaurant-Impossible_DFCHD_2023_10_15_18_58_00.wtv to D:\Recorded TV
Error: System.UnauthorizedAccessException: Access to the path is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at MCEBuddy.Util.FileIO.MoveAndInheritPermissions(String source, String destination, Doolean overwriteDestination)
at MCEBuddy.Engine.ConversionJob.MoveConvertedFile(String subDestinationPath, Log jobLog)
ERROR 2024-03-18T08:21:26 MCEBuddy.Engine.ConversionJob → Moving converted file to destination failed

这可能是由于 D 盘、文件夹权限、继承设置等不正确导致的。也可能是其他应用程序(如杀毒软件?或其他监控文件夹的程序)在 MCEBuddy 尝试写入时阻止了访问(如果问题是间歇性的,则可能是这种情况)。

1 个赞

是的,我理解這一點,但我以前從來沒有遇到過問題,也許是系統更新改變了權限?但無論如何,我實際上刪除了資料夾,然後重新建立了資料夾。有趣的是,大多數轉換都正常運作,但有一些仍然失敗。

这听起来非常熟悉,因为我已经断断续续地遇到移动失败的问题一年多了。我甚至升级到了最新版本的 mcebuddy。

奇怪的是,我见过多达7个录制文件可以正常移动,但有一个却失败,而且失败的时间或其他因素毫无规律。

更奇怪的是,虽然 mcebuddy “认为”转换失败,但大多数情况下,文件最终既存在于录制目录,也存在于目标目录。然而,很多时候移动后的录制文件(wtv文件)有问题。无法跳转,或者文件无法播放到结尾。

我有3个专门用于录制电视的驱动器,并且我不对这些驱动器运行病毒扫描.

这是我最近的一次移动失败记录:

ERROR> → Unable to move file C:\Program Files\MCEBuddy2x\working0\Bob Hearts Abishola - S05E06_0.2024_03_11.wtv to \MEDIACENTER\Media Center Drive 3 (H)\Recorded TV
Error :System.IO.IOException: An unexpected network error occurred.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
at MCEBuddy.Util.FileIO.MoveAndInheritPermissions(String source, String destination, Boolean overwriteDestination)
at MCEBuddy.Engine.ConversionJob.MoveConvertedFile(String subDestinationPath, Log jobLog)
ERROR> 2024-03-11T22:40:53 MCEBuddy.Engine.ConversionJob → Moving converted file to destination failed
INFORMATION> 2024-03-11T22:40:53 MCEBuddy.Engine.ConversionJob →
→ Performance Metrics for the Current Conversion

你遇到的是完全不同的錯誤。Windows 無法移動檔案,因為發生了網路錯誤。看起來你正在使用映射磁碟機,而網路錯誤可能由多種原因引起,包括纜線問題、遠端 NAS 問題、時間同步、路由器問題、Windows 重設連線等等。最常見的是前兩種。