subhra74 / xdm

Powerfull download accelerator and video downloader
https://xtremedownloadmanager.com/
GNU General Public License v2.0
6.75k stars 1.1k forks source link

Error "Failed to append/convert file parts" #409

Open qiaoli116 opened 3 years ago

qiaoli116 commented 3 years ago

Windows OS + XDM 2020 Version 7.2.11 with Java AdoptOpenJDK 11.0.6 on Windows 10 When downloading progress reach 100%. Download failed error popped up with the message "Failed to append/convert file parts, please check if the drive is full or write protected".

Looks like the software failed to convert the downloaded files.

I repeated the issue with the following logs:

Saveing url: https://bny.imaxenhance.com/cn/movie/10083/play-00645.ts Saveing url: https://bny.imaxenhance.com/cn/movie/10083/play-00646.ts [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] List updated [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] checking for same named file on disk... [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] Updating file name- old: 铠甲勇士捕王 - 看TV.MP4 new: 铠甲勇士捕王 - 看TV.MP4 [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] Outformat: MP4 HQ Best Quality(x264 Hi444PP) [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: C:\Program Files (x86)\XDM\ffmpeg.exe [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: -f [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: concat [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: -safe [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: 0 [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: -i [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: D:\downloads\XDM\5e08099f-f1a6-40b8-8b7b-34647777f626\5e08099f-f1a6-40b8-8b7b-34647777f626-hls.txt [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: -vcodec [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: h264 [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: -profile:v [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: high444 [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: -crf [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: 18 [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: -acodec [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: aac [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: D:\downloads\XDM\b3278b2a-0fe9-44f5-9d28-601a68ec4a6d_铠甲勇士捕王 - 看TV.MP4 [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] @ffmpeg_args: -y [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] FFmpeg exit code: 30 [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] java.io.IOException: FFmpeg failed at xdman.downloaders.hls.HlsDownloader.assemble(HlsDownloader.java:647) at xdman.downloaders.hls.HlsDownloader.chunkComplete(HlsDownloader.java:126) at xdman.downloaders.SegmentImpl.transferComplete(SegmentImpl.java:93) at xdman.downloaders.AbstractChannel.copyStream2(AbstractChannel.java:176) at xdman.downloaders.AbstractChannel.run(AbstractChannel.java:75) at java.base/java.lang.Thread.run(Unknown Source) [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] List updated [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] removed [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] Releasing socket for reuse [ 18a4092b-8d14-4986-b703-d5b2ee680dc2 ] Copy Stream finished

phatlewt commented 3 years ago

I get the same error with ffmpeg exit code 30, ffmpeg failed. Running the ffmpeg commandline manually ffmpeg gives an error saying file protocol not found, and after some searching it turns out that ffmpeg released on May 10 2020 under windows 10 requires the file list for concatenation to be file 'file:/c:/temp/etc-etc' instead of file 'c:/temp/etc-etc'. Since this file list command format is hardcoded in xdm 7.2.11 and packaged with ffmpeg git-2020-05-15, I uninstalled and reinstalled xdm 7.2.10 which comes with ffmpeg 4.2.2. Problem solved.

riadafridishibly commented 3 years ago

is it because of how the files are added here? https://github.com/subhra74/xdm/blob/b0532c54cc157fa6e0408cea26dce0f7ba1a352f/app/src/main/java/xdman/mediaconversion/FFmpeg.java#L70-L73

phatlewt commented 3 years ago

That's interesting. Your code suggests files are added for ffmpeg processing through the command line, but from the output logs above, "D:\downloads\XDM\5e08099f-f1a6-40b8-8b7b-34647777f626\5e08099f-f1a6-40b8-8b7b-34647777f626-hls.txt" contains the list of files ffmpeg will process. Opening that file list in a text editor I could see lines in the format "file 'D:/temp/ffmpeg/01.mov'" and "file 'c:/temp/ffmpeg/02.mov'", etc. This needs to be changed to "file 'file:c:/temp/ffmpeg/01.mov'" and "file 'file:c:/temp/ffmpeg/02.mov'", so if xdm isn't generating this file list directly, that means it might be generated by ffmpeg internally so this might be a bug in the latest ffmpeg version- they forgot to update their filelist generating code to use the new file protocol they introduced. Maybe it's better to use the old ffmpeg version until this is fixed, for Windows users anyways.. (not sure if this issue exists for Linux?)