Plex library optimize - Gdrive

Turns out I was making a minor mistake, typical. Plexus v0.9.58 has been released with better subtitle support. I haven’t done much testing yet, so let me know how you get on with it :slight_smile:

Ok, I have tested it BUT if there is more then one subtitle available it will extract them with a 1.en.srt 1 (0 filesize) .en.sup (normal filesize) 2.nl.srt 2.nl.sup. I just tried it with plex and when the metadata was being refreshed the .srt files dissapeared and only the .sup files remained. It did not found the .sup as a subtitle.

If I change the name of the .sup files to filenamemovie.lang.srt it works… The screenshot below was taken after Plex removed the .srt files (which where 0 filesize).

There was also were 2 audio streams (commentary and norma) which where not encoded with the new file.

Sorry for my bad english :). I hope you don’t mind all the feedback! I want to use your tool to transcode 33TB of files.

1 Like

Thanks for the information! The 0kb files should be automatically removed…strange. It’s interesting that the .sup files wotked when renamed to .srt, since you can’t extract pgs subtitles straight to .srt when using FFmpeg, so I’ll have to rename them after extraction.

My main concern are your audio streams. Are you still using MP4 as the container? If so, clearly I need to do some more testing.

No I changed the container to mkv. I’ll do some more testing with different files.

Really? I’ve gone through over a thousand files and audio streams have never been lost. How unusual. I need to implement a decent log for situations like these.

This was the original:
original

This is the new one:
encoded

No subtitles and only one audio stream.

Which is weird as hell. Any chance you could encode a single file with the --verbose flag and then past the full command output here? Might be an idea to upload it to a Pastebin.

@Soulplayer Plexus v0.9.59 has been released! This should fix the subtitle extension issues. Unfortunately, I’m unable to resolve the audio streams issue until I’m able to see a log.

@Soulplayer Actually, could you post the output of ffmpeg -v, please?

ffmpeg version 4.1 Copyright © 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.11) 20160609
configuration: --pkgconfigdir=/home/user/ffmpeg-build/workspace/lib/pkgconfig --prefix=/home/user/ffmpeg-build/workspace --pkg-config-flags=–static --extra-cflags=-I/home/user/ffmpeg-build/workspace/include --extra-ldflags=-L/home/user/ffmpeg-build/workspace/lib --extra-libs=’-lpthread -lm’ --enable-static --disable-debug --disable-shared --disable-ffplay --disable-doc --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libvpx --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-runtime-cpudetect --enable-libfdk-aac --enable-avfilter --enable-libopencore_amrwb --enable-libopencore_amrnb --enable-filters --enable-libvidstab
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
Missing argument for option ‘v’.
Error splitting the argument list: Invalid argument

Thanks! Would you mind running an encode with the --verbose flag and then posting the output here, please?

Thanks for sending me your log, @Soulplayer! As it would turn out, you just unveiled a huge bug within the encode function. Essentially, when hitting a certain codec edge case, all FFmpeg options were being entirely disregarded. I’m not sure how long this has existed within the program, but you have my absolute thanks for discovering it.

This issue should be resolved in Plexus v0.9.60!

1 Like

glad to help :slight_smile: you. When you are done Plexus will be awesome :smiley:

1 Like

Thanks!

Try out Plexus v0.9.60 and let me know how it goes :slight_smile:

It seems to work! Is there a way to trottle my existing rclone? I don’t want to hit my google limit of 750gb (which I know I will hit with the downloading and uploading of all the files). Currently I’m just point at my mount to download, encode and upload.

rclone settings:

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount gmedia: /mnt/media
–allow-other
–dir-cache-time 48h
–vfs-read-chunk-size 64M
–vfs-read-chunk-size-limit 2G
–buffer-size 128M
–umask 002
–log-file /home/user/logs/rclone.log
–log-level INFO
ExecStop=/usr/bin/sudo /usr/bin/fusermount -uz /mnt/media
Restart=on-abort
User=user
Group=user

750GB is only for upload.

1 Like

Glad to hear it! As @Animosity022 pointed out, the 750GB/day limit is only for uploads. The download limit is 10TB/day I believe. Use the --bwlimit flag with the encode function to restrict this :slight_smile: --bwlimit 8500 would be fine for constant uploading, but since you’ve got the encoding in between, you might be fine with --bwlimit 15000.

I’ve been using it for a while now and I’m loving it. BUT I have a request: I’m toying arround with 4K / HEVC. My server is not capable of transcoding it but my devices support direct play BUT the movies come with PGS subtitles which Plex only plays with transcoding. Could you add something that only extracts the subtitles without converting the entire file?

1 Like

Thank you for the feedback! I’ve just implemented this in Plexus v0.9.70, but I’m pretty busy with work right now and don’t have a testing environment set up, so I haven’t been able to properly test it out. Just run the encode command as you would normally, but add the --subtitles flag to trigger a subtitle-only mode. Let me know whether it works out for you :slight_smile:

Thank you. I’ll try it out!