euclides.sp 6 Posted February 28, 2019 Share Posted February 28, 2019 Hello guys.I use have my emby on a lunux vps. I'm converting movies from mkv to mp4 (without converting video) using the following command inside movie directory: for i in .mkv; do ffmpeg -i "$i" -movflags faststart -c copy -map 0 "${i%.}.mp4"; doneWorks perfectly converting the files inside the directories. Now I want to do the same thing in files located in several other folders. for example: Servidor (type the command here)Filme1Filme1.mkvFilme2 Filme2.mkvFilme3Filme3.mkvDoes anyone know how to do this? Link to comment Share on other sites More sharing options...
sargenthp 25 Posted February 28, 2019 Share Posted February 28, 2019 Hello guys. I use have my emby on a lunux vps. I'm converting movies from mkv to mp4 (without converting video) using the following command inside movie directory: for i in .mkv; do ffmpeg -i "$i" -movflags faststart -c copy -map 0 "${i%.}.mp4"; done Works perfectly converting the files inside the directories. Now I want to do the same thing in files located in several other folders. for example: Servidor (type the command here)Filme1 Filme1.mkv Filme2 Filme2.mkv Filme3 Filme3.mkv Does anyone know how to do this? Here is an example using find... find /starting/path -name "*.mkv" | awk -F'.mkv' '{print $1}' | while read i; do ffmpeg -i "$i.mkv" -movflags faststart -c copy -map 0 "$i.mp4"; done Sent from my PH-1 using Tapatalk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now