Jump to content
kizer

FFMPEG and unRAID works

5 posts in this topic Last Reply

Recommended Posts

I have/had a need to do some converting of Movies from AAC to AC3 because my Receiver doesn't support AAC and I didn't want to run any dockers or fancy apps. I just wanted to do some basic coding and have some magic work for me. I couldn't really find a solution until I found this discussion yesterday. 

https://askubuntu.com/questions/700896/how-do-i-transcode-all-files-in-a-directory-with-ffmpeg

 

Great now the above gave me an idea on how to convert a bunch of files, but I still need FFMPEG to work and I never could find a build that didn't cause any issues. Then I found this on accident. 

https://gist.github.com/spookyUnknownUser/dd8c75319ec581c1028310cedaea786c#file-install_ffmpeg-sh

 

I ended up simply downloading the FFMPEG he had in his script via a browser and dropping it on to my cache drive and following his tar command into a ffmpeg folder. I didn't do any of the symlinking since I planned on calling FFMPEG directly. 

Updated this post with a more direct way of finding the FFMpeg Build Files.

https://www.johnvansickle.com/ffmpeg/

 

So far I've converted at least 20 or so MP4's to MKV's converting the AAC to AC3. 

 

This is the little script I created to do my bidding.

 

loop.sh

for file in *.mp4; do ffmpeg -i "$file" -vcodec copy -acodec ac3 /Location.to.move.converted.Files/"${file%}".mkv; mv "$file" /Place.to.Put.Originals.for.Checking/; done

 

Basically I run ./loop.sh directly from the FFMPEG folder with the to be processed files. I'm sure I'll eventually make it a bit more elegant, but for now it works just fine. It scans the files looking for MP4's. When it finds MP4's it coverts them from AAC to AC3 to a new location then it moves the original file to a folder named Originals so I can make sure the converted file plays fine.  The only issue I've had which I'm sure is a code issue, but it takes Transformers.(2007).(720p).mp4 to Transformers.(2007).(720p).mp4.mkv. I just remove the .mp4 via FileBot and its all good to go. 

 

If this is useful for somebody great. If not I just wanted to share what I found. 😉 you can customize any of the commands for ffmpeg for your liking of course. I just kept it simple. 

Share this post


Link to post
6 hours ago, Alphahelix said:

I myself are using the handbreake docker. I dont know if that suits your need

Sent from my SM-G955F using Tapatalk
 

 

Yes I use it too for other things. However I wanted to simply convert AAC to AC3 and copy the video stream. HandBrake doesn't like to do that. I wants to encode everything and honestly I just wanted a quick 30second audio conversion.

 

What I'm doing honestly is really easy there just didn't appear to be a way to get FFMPEG to work or at least I couldn't and now I have an easy solution that fits every need I have. Between FFMPEG and HandBrake I can do about everything I need. 

Share this post


Link to post

Just wanted to thank you for this @kizer!

 

I was banging my head against the wall trying to figure out a way to get ffmpeg to work on unRAID and this did the trick for me. I built a time-lapse camera from a Raspberry Pi Zero W that automatically uploads all its photo to my unRAID server each night and use ffmpeg to stitch the photos together into time-lapse videos. With this working, I no longer have to run my ffmpeg compiling script from my Macbook. 

Share this post


Link to post

@zandrsn

 

 

Nice!!! Glad it helped. I spent many a days using my Windows machine converting files using FFMpeg and it annoyed me that I couldn't come up with a script for it in unRAID and trust me I looked and looked and looked one day I discovered what I posted up above purely by accident. 

 

FFMpeg is so flexible its nuts and I like how you can pass thru video or audio and do what you want vs what HandBrake and others will "allow" you to do. 

 

You should post up your script here just in case somebody else wants to use it. I just threw up what sloppy code as an example or what I figured out, but hey it works. Lol  😁

 

I also updated my first post with a more direct way of grabbing his Builds since I couldn't re-download his files for some odd reason. 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.