[RELEASE] dv2mkv - Home Movie transcoder/thumbnail generator/NFO creator [LINUX]
#1
I was unsure about sharing this with the world as it is my first bash script, but I figured I'd let some others take a look at it.

DOWNLOAD

Basically, I wanted a way to take all the home movies from off my miniDV tapes and put them in XBMC. What I've been doing is using Kino or dvgrab to dump entire tapes into temporary directories, splitting the output files into discrete clips.

I then run this script on the entire directory. Here's what the script will do:
  • Convert the video to h.264 using a 3000kbps and highly optimized encoder flags
  • If the input video is standard 60 fps and interlaced, it will deinterlace using ffmpeg's Yadif deinterlacer. If video was recorded in 30p mode, it will not deinterlace.
  • Audio is transcoded to 160kbps Ogg Vorbis
  • Audio and video muxed into a Matroska file
  • The filename of the resulting MKV will be based on the date and time the original video was recorded.
  • The script then generates a .nfo file, a sample of which you can see below. It also includes in this file the vital stats from the original file. (I like to keep this kind of stuff around.)
  • Lastly, a .tbn thumbnail is generated from a frame 10 percent of the way into the video.

Once you create a tvshow.nfo file in the root directory, these file are all sucked in by the .nfo scraper and inserted as a custom "Home Movies" TV show. So far, it's worked on everything I've thrown at it.

An example of a .nfo created by dv2mkv from one of my home videos:

Code:
<episodedetails>
        <title>January 26, 2009 - 4:46 PM</title>
        <rating></rating>
        <season></season>
        <episode></episode>
        <plot>This video was recorded on January 26, 2009 at 4:46 PM.</plot>
        <credits></credits>
        <director></director>
        <aired>2009-01-26</aired>
    <time>16:46</time>
    <runtime>00:01:52</runtime>
</episodedetails>

========== ORIGINAL FILE INFO ==========

General
Complete name                    : Tape_2_019.dv
Format                           : Digital Video
File size                        : 386 MiB
Duration                         : 1mn 52s
Overall bit rate                 : 28.8 Mbps
Recorded date                    : 2009-01-26 16:46:39

Video
Format                           : Digital Video
Duration                         : 1mn 52s
Bit rate                         : 26.1 Mbps
Width                            : 720 pixels
Height                           : 480 pixels
Display aspect ratio             : 16/9
Frame rate mode                  : Constant
Frame rate                       : 29.970 fps
Standard                         : NTSC
Colorimetry                      : 4:1:1
Scan type                        : Interlaced
Bits/(Pixel*Frame)               : 2.519

Audio
Format                           : PCM
Duration                         : 1mn 52s
Bit rate                         : 1 536 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Resolution                       : 16 bits
Reply
#2
I love it as a concept, and I'll bookmark this page to remind me to get all those darn DV tapes dumped onto disk.

Maybe in the script header you could put in some info about the tools used, maybe versions used too?
Reply
#3
Good idea, thanks. Will do!
Reply

Logout Mark Read Team Forum Stats Members Help
[RELEASE] dv2mkv - Home Movie transcoder/thumbnail generator/NFO creator [LINUX]0