2

I'm super impressed by Plex, and I'd like to convert all my old dvdmedia files into a format that it can understand. I have quite a few of them (the product of a dvd library being ripped to work with iTunes) and I want to preserve as much information as possible.

Specifically, I would like the video, all the audio tracks, all the subtitle tracks, and the chapters to be copied verbatim into an mp4/mkv/whatever so that Plex can then take over and work its magic.

I've tried

ffmpeg -i "concat:$(shell-fu)" -map 0:a -map 0:v -map 0:s -c copy ~/Downloads/test.mp4

with shell-fu being a simple bash for loop that spits out VTS_0_1.vob|…. This is error prone and hard to automate already as I need to manually inspect what is the largest vob an do some magic to get all of it, but I can imagine ways to script that. The bigger problem is that I consistently run into errors due to including the subtitles.

I'm open to any and all options that would work on a Mac, so long as they are entirely automated. I've got plenty of space so I'm not too worried but bonus points would go to anyone who could tell me how to only include english subtitles and audio by default, unless english audio or subtitles are not an option.

2 Answers 2

0

Let Plex handle the chapters as different episodes of a series, plan your naming.

If audio or subtitles are giving you problems then I would recommend possibly re-encoding only those streams. I do not know enough on this to give any concrete advice.

Remember video is generally the most expensive part so think about just copying it.

Bonus: For language of audio and subtitle preference, I would assume a simple if/else statement should work.

ffmpeg -i video

Parse the output looking at the streams and have some logic looking for "(eng)" or whatever variants are used in your files. If English streams exist great, else default to the zero index of each (this was unclear, copy them all or just one).

I don't think I'm giving you a magic bullet but if you can expound on the errors you are seeing and explain "what is the largest vob an do some magic" is I'll edit this and hopefully be able to give you something more concrete.

Cheers

0

Try https://github.com/donmelton/video_transcoding and specifically something like:

#!/bin/bash
MOVIEPATH="/Volumes/Movies"
OUTPUTPATH="/Volumes/Transcoded Movies"

find -s $MOVIEPATH -maxdepth 1 -type d -name '*.dvdmedia' | while read file; do

    # file: /Volumes/Movies/2001 A Space Odyssey.dvdmedia
    # filename: 2001 A Space Odyssey.dvdmedia
    # basename: 2001 A Space Odyssey

    filename=`basename "$file"`
    basename=${filename%.*}
    echo -n "$basename: "

    if [ ! -d "$file/VIDEO_TS" ] ; then
            echo "$basename does not look like a dvdmedia folder"
    fi

    transcode-video -q -o "${OUTPUTPATH}"/"${basename}".mkv "${MOVIEPATH}"/"${filename}"

done
exit 0

This will convert all the dvdmedia files in the "Movies" directory using the default transcoding settings.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .