View Single Post
Old 16th August 2022, 00:05   #147  |  Link
BuccoBruce
Registered User
 
Join Date: Apr 2022
Posts: 28
Quote:
Originally Posted by ymgenesis View Post
Yes, the sample I created in that post was using the "audiotool" I wrote here. The command would be the same as I quoted in the Plex forum post. I don't believe an internet connection is needed. On Mac, it requires the structure from here. Variables for the Codecs and Encoder folder need to be set properly (folder with dylibs, probably dlls in Windows, and the Plex Transcoder executable). It needs EasyAudioEncoder executable and the license file. This license file is the permission file to be able to use EasyAudioEncoder executable, so I don't think an internet connection is needed. Keep in mind all these resources (including EasyAudioEncoder and its license file) are insalled when installing Plex. They get updated every once and a while when Plex updates. EasyAudioEncoder must be running for the encode to work, as you can see I execute EasyAudioEncoder first in the background here before executing the Plex Transcoder executable here a couple lines later. Of course, this is Unix.

Sorry I can't be more help with Windows. The process isn't exactly clean, as it requires the proper environment variables, and needs a running EasyAudioEncoder instance before executing the Plex Transcoder (ffmpeg) command.

And as I mentioned before, I paid for Plex Pass, which may have allowed me EasyAudioEncoder for 7.1 transcoding when playing on Plex (existence of EasyAudioEncoder and license file). BUT, I don't know that 100%, I actually suspect it is included with the free version. So, if someone wants to try, they can sign up for a free Plex account at plex.tv and download my sample from here (same sample as on the Plex forums), add it to your server once setup, and see if it'll transcode the first audio track (TrueHD) to EAC3 7.1 when playing back on your 7.1-capable TV/box & AV setup. If it does, EasyAudioEncoder exists and can be used in a manner like my "audiotool".
If you can explain which environment variables EAE/Plex Transcoder actually require, and what conditions they need in order to avoid halting them midway through, I can re-write this properly to work under Windows.

I don't understand enough about how .sh scripts work to properly re-write it for Windows (bc I don't know what it's doing most of the time) but I was able to somewhat successfully run this under msys2 in Windows with some re-writes. The access to out.txt is still throwing "safe_fopen: CreateFileW failed: 2" errors, but it does seem to work. With the "| tee" to out.txt still included in the thd/dts functions, it was halting the encode after a few seconds (a few minutes of output). Without them, it finishes the encode, although the time-left function is now buggered.

Code:
frame=    0 fps=0.0 q=-1.0 size=  285755kB time=00:05:52.67 bitrate=6637.6kbits/
safe_fopen: CreateFileW failed: 2
safe_fopen: CreateFileW failed: 2
safe_fopen: CreateFileW failed: 2
frame=    0 fps=0.0 q=-1.0 Lsize=  296962kB time=00:05:53.69 bitrate=6878.0kbits/s speed=4.94x

Terminating EasyAudioEncoder...
Terminated
https://pastebin.com/LDPXXmm2

Required ??? folder structure:
Code:
\\AudioTool\audiotool.sh
\\AudioTool\audiotool.win.sh
\\AudioTool\Codecs\367b3d4-3654-windows-x86\aac_decoder.dll
snip
\\AudioTool\Codecs\367b3d4-3654-windows-x86\wmv3_decoder.dll
\\AudioTool\Codecs\ffmpeg.exe
\\AudioTool\Codecs\ffprobe.exe
\\AudioTool\Encoder\eae-license.txt
\\AudioTool\Encoder\EasyAudioEncoder.exe
\\AudioTool\Encoder\ffmpeg.exe
\\AudioTool\Encoder\ffprobe.exe
\\AudioTool\Encoder\Windows\avcodec-58.dll
\\AudioTool\Encoder\Windows\avfilter-7.dll
\\AudioTool\Encoder\Windows\avformat-58.dll
\\AudioTool\Encoder\Windows\avutil-56.dll
\\AudioTool\Encoder\Windows\cyggcc_s-1.dll
\\AudioTool\Encoder\Windows\cygwin1.dll
\\AudioTool\Encoder\Windows\fmt.dll
\\AudioTool\Encoder\Windows\Plex Transcoder.exe
\\AudioTool\Encoder\Windows\swresample-3.dll
\\AudioTool\Encoder\Windows\swscale-5.dll
\\AudioTool\ffmpeg.exe
\\AudioTool\ffprobe.exe
\\AudioTool\README.md
ffmpeg/ffprobe are in every folder because with ffprobe only in \AudioTool, msys couldn't find it, even though .\ffprobe.exe outside of the script was working. They don't come with ffmpeg, I used statically compiled ones separately.
BuccoBruce is offline   Reply With Quote