Unmanic / unmanic

Unmanic - Library Optimiser
GNU General Public License v3.0
1.65k stars 82 forks source link

how can add extra audio streams codecs to my files before they get uploaded to gdrive ? #226

Open aniel300 opened 3 years ago

aniel300 commented 3 years ago

I am trying to add extra audio streams to my files with both 7.1, 5.1 and 2.0 respectively (aac, ac3, eac3, truehd, dts to aac, ac3, eac3, truehd, dts). How do I go about doing this? I have tried using both tdarr and unmanic, but I don't know what I'm doing. I want take whatever audio the files come with and duplicate it/add extra audio streams with different audio codecs such as aac, ac3, eac3, truehd, dts as well different audio channels such as 7.1, 5.1 and 2.0 respectively, although I am not sure if 5.1 to 7.1 is possible or even necessary.

Josh5 commented 3 years ago

5.1 to 7.1 seems like a waste of time.

Do you have an FFmpeg command that you would like to run? Or have you not managed to get that far yet?

aniel300 commented 3 years ago

thank you for answering. i can live with not having 7.1 and 5.1, however i would like to have 7.1 or 5.1 and 2.0 (aac, ac3, eac3, truehd, dts) respectively or is this overkill and unnecessary ? this is what i have so far but not sure where to go from there or what FFmpeg command i need and where to put it. https://i.imgur.com/PifA7NU.png

so far what i have been able to find. also keep in mind that this need to be automated and run in cloud before the files get uploaded to gdrive in case haven't mentioned it.

https://superuser.com/questions/1427570/using-ffmpeg-to-convert-dts-audio-track-to-ac3-and-add-back-into-mkv?rq=1 https://superuser.com/questions/1575202/ffmpeg-convert-audio-track-and-add-back-into-media-file-without-touching-video-t?noredirect=1&lq=1 https://superuser.com/questions/1219784/making-ffmpeg-process-first-audio-stream-differently-than-all-others https://superuser.com/questions/1625810/how-to-use-ffmpeg-to-downmix-5-1-eac3-to-stereo-aac-with-dolby-pro-logic-ii-whi?noredirect=1&lq=1 https://superuser.com/questions/1369680/copy-audio-stream-while-also-re-encoding-with-filters https://superuser.com/questions/1237983/ffmpeg-convert-one-audio-stream-copy-the-rest?rq=1 https://superuser.com/questions/1476010/ffmpeg-adding-re-encoding-audio-stream-on-video-file?rq=1

Josh5 commented 3 years ago

I am intending on writing a plugin to manage cloning stereo (2.0) streams from surround sound channels.

Will that suite your needs?

aniel300 commented 3 years ago

yes but remember I also would like whatever original audio it comes with 7.1 or 5.1 (aac, ac3, eac3, truehd, dts) to be also replicated in (aac, ac3, eac3, truehd, dts) 7.1 or 5.1 respectively as well the 2.0 ones. my question is, am I going overkill and is it unnecessary to have that many codecs ?

Josh5 commented 3 years ago

In my opinion it is. But what I would do with Unmanic may be completely different to what you might do

aniel300 commented 3 years ago

so what codecs and channels would u have ? and are u gonna be able to help me or create the plugin ?

Josh5 commented 3 years ago

If I had a 7.1 or 5.1 stream already, I would keep them as is and create a stereo 2.0 clone of that stream. I would pick aac for the stereo clone.

If you add my development repo, there is a plugin there that can do this. https://github.com/Josh5/unmanic-plugins

aniel300 commented 3 years ago

umm the reason am in pursuit of this taks is because rokus stick as an example does not like eac3 codec and am trying to eliminate transcoding, i will add the repo, however i think i still would like to do what am after

aniel300 commented 3 years ago

any update in regard to the taks i would like to do ?

Josh5 commented 3 years ago

Did you try the plugin in the Dev repo?

aniel300 commented 3 years ago

how can i run this command on its own ffmpeg -i "input.mkv" -map 0:v -c:v copy -map 0:1 -c:a:0 copy -map 0:a:0 -c:a:1 aac -map 0:a:0 -c:a:2 ac3 -map 0:a:0 -c:a:3 aac -ac:a:3 2 -map 0:s? "output.mkv"

aniel300 commented 3 years ago

i need dynamic plugin that can ignore whatever current codec is present, so if files comes with eac3 then create aac/ac3 5.1 or 7.1 and acc 2.0 and the same thing for acc or ac3

Josh5 commented 3 years ago

This is not something I can do at this time. Feel free to try and write your own plugin for this. But at this time my plate is full. If you dont mind waiting for a few months I may eventually get time to do this for you.

aniel300 commented 3 years ago

i understand