[Feedback]: Checking for MUXED files before downloading
Opened this issue ยท 8 comments
Type
CLI
Suggestion
Hi All,
I am 90% sure this is probably me using the wrong switch but I am trying to write some PowerShell wrappers that I would be willing to share so that I can have this running as a service to download the latest episodes
The CLI command I have generated so far is here so that I can get both audios and subtitles
.\aniDL.exe --service crunchy --series "G9VHN9P43" --dlsubs "en" --dubLang "eng", "jpn" --all --mp4 --syncTiming -defaultAudio "eng" --defaultSub "eng" --fileName '${showTitle}\S${season}[${service}] ${showTitle} - S${season}E${episode} [${height}p]' --force c
Everything seems to work fine on the first run and it cleans up as expected so I am left with a single MP4 file this again plays as I would like it to and I can swap between audio and subs
The issue is when I then re run the command to collect the latest episodes it starts to download all the original files again and then gets stuck, is this just a bug or have I missed a switch in the command. Or better yet should I be doing it another way such as with the --addArchive
I believe you should be using --addArchive, then --downloadArchive with the --but flag, if memory serves that should download all but what you've already downloaded for the series in the archive. I need to look into redoing the archive at some point to be more intuitive
Hi @Jaynator495
Thanks for the super quick response!
I think I have that now working with some success, I think I may need to check how it handles newly released DUBs at some stage and I keep hitting a HiDive rate limit but so far so good!
Thanks again and do you think uploading a snippet of the codes one done for others would help?
Also is there a decent way to remove or reset something in the archive?
I believe newly released dubs may pose a challenge as it doesn't save language information at the moment, that's one of the things that need improving upon.
Feel free to share your script, it can never hurt to have more resources for people to use! :)
As for removing or resetting something in the archive, that is also something missing at the moment, the best way currently to go about it is going into the archive file (archive.json in the config directory) and remove it manually.
Hi @Jaynator495
Thanks so much for all your help, I am still writing up some code and trying to also write up some bits to deal with errors and the like so it could be used to interact live a DVR once episodes release or rather that is my end game
I have found another issues you may have seen but I am trying to pass through the "-y" to FFMPEG so that it will overwrite a file and it does not appear to be doing this an example below
.\aniDL.exe --service crunchy --but --downloadArchive --dlsubs "en" --dubLang "eng", "jpn" --mp4 --syncTiming -defaultAudio "eng" --defaultSub "eng" --fileName '${showTitle}\S${season}[${service}] ${showTitle} - S${season}E${episode} [${height}p]' --force c --mkvmergeOptions '-y' --ffmpegOptions "'-y'"
This is what I saw in the debug
"ffmpeg" -i "P:\A Sign of Affection\S01[CR] A Sign of Affection - S01E03 [1080p].Japanese.ts" -itsoffset -42ms -i "P:\A Sign of Affection\S01[CR] A Sign of Affection - S01E03 [1080p].English.ts" -i "P:\A Sign of Affection\S01[CR] A Sign of Affection - S01E03 [1080p].01.eng.English.ass" -itsoffset -42ms -i "P:\A Sign of Affection\S01[CR] A Sign of Affection - S01E03 [1080p].01.eng.English.cc.ass" -map 0:a -map 0:v -metadata:s:a:0 language=jpn -metadata:s:v:0 title="undefined" -map 1:a -metadata:s:a:1 language=eng -map 2 -map 3 -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 title="English" -metadata:s:s:0 language=eng -metadata:s:s:1 title="English cc" -metadata:s:s:1 language=eng '-y' "P:\A Sign of Affection\S01[CR] A Sign of Affection - S01E03 [1080p].mp4"
ffmpeg version 6.1.1-full_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --pkg-config=pkgconf --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-dxva2 --enable-d3d11va --enable-libvpl --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
I also tried just "y" and that threw an error otherwise it just sits there waiting for me to accept the overwrite, the FFMPEG docs seem to just state putting -y as a catch all to overwrite
I personally suggest using mkvmerge for the muxer, I'm not entirely sure why that's not working, but it should work just fine with mkvmerge
Woah thanks for the quick response as always @Jaynator495
I added that to my config but for some reason its still passing to FFMPEG ๐ Do I have a typo, I checked the CLI reference
.\aniDL.exe --service crunchy --but --downloadArchive --dlsubs "en" --dubLang "eng", "jpn" --mp4 --syncTiming -defaultAudio "eng" --defaultSub "eng" --fileName '${showTitle}\S${season}[${service}] ${showTitle} - S${season}E${episode} [${height}p]' --force c --forceMuxer mkvmerge --mkvmergeOptions '-y'
It won't use mkvmerge if you don't have mkvmerge, do you have mkvmerge and have it in your path?
Open a cmd and run mkvmerge --version
, if you get an output you have mkvmerge installed, if you don't, then you need to make sure it's installed and in your path. If you don't want to put it in your path, you can use the bin-path.yml file to set the location of the mkvmerge.exe file
Legend! Sorry I forgot this other machine I was testing on did not have mkvmerge but with those switches things seem to be working now!
I will have to get the script to check for that and then run ๐
If I can get stuff working later I will post in here for others to use ! Once stable happy for you to add it to the code base