Page 1 of 1

Making Video DVD from Sony Handycam clips

Posted: 30 Dec 2010, 23:07
by rolf
Here we go :coffee_smile:
GF brought me the family SONY DCR SR100: Image and asked me to burn the clips on it to dvd's she could send back home. There are 546 .mpg from about 480KB to 1.2GB in size.

There is some Windows-only software for creating dvd directly from the camera that comes on a cd that GF's sister efficiently threw away, allegedly :wall: Sony won't let you recover this software, even as an owner, w/o paying about $40 and that jewel is on its way, we'll see how it works when it gets here.

OTOH, there is a mini usb connector my Canon cable fits to, a button to press on the camera, and the file system can be browsed, files downloaded to my Mandriva-driven PC. From there, it is mostly new territory for me and what I learned might be useful for others.

  1. There are about 24G of video clips on the handycam's 30G hard drive, now on my desktop. I don't know whether DL is playable on home DVD players but I doubt it, at least on older ones, so I must use regular platters, 4.7G and, for extra fun, with my Magnavox 4.7G disks, 4.4G seems to be all that is reported usable by the burning software. At any rate, I settled on du with some bash substitution magic that turned up on the intertubes:

    Code: Select all

    $ du -c M2U0{0483..1059}.MPG
    [..]
    du: cannot access `M2U01054.MPG': No such file or directory
    2.1M    M2U01055.MPG
    65M     M2U01056.MPG
    135M    M2U01057.MPG
    89M     M2U01058.MPG
    236M    M2U01059.MPG
    24G     total

    You can see each file is processed by du with a grand total at the end. du, "disk usage" is not the actual size of the file(s), so is said on the www, but it's the first thing I figured out how to use, pretty much did what I need. Maybe someone can improve on that. Note that when a file is missing from the numerically defined sequence (maybe someone deleted a clip in the camera), du complains but completes what it can. This becomes relevant in subsequent steps.
  2. Now, by adjusting and trying the range in the {} brackets, I can determine which of the files to include in this step to make splits that are even and/or fit on dvd. By research, trial, and error, I came to use mencoder to join many clips into one mpeg2 file, suitable for creating a video dvd. Also, I kept notes during this project as I have learned similar projects in the past but can't seem to remember steps. From the notes:
    mencoder -oac copy -ovc copy -of mpeg -forceidx M2U00{561..724}.MPG -o iso/disk2.mpg
    this results in many errors, like:
    ERROR: scr 1499.186, dts 0.000, pts 496.652
    but the resultant dvd doesn't seem too bad.
    note: cannot be missing numbers in the sequence of file names.
  3. The relevance of the missing numbers in the specified range of this bash command is that mencoder will choke. Google suggested krename, so I installed it. It was more than adequate for my purposes, after I made a few mistakes. The original files can be ordered by different criteria and, since I wanted to preserve the chronology, I went with 'numerical'. Then, choosing 'custom' for new file name and using one of the point-and-click bash substutisms, #{0;1} , which means start number with 0, increment by one, where I adjusted the start to the camera's filename to keep close to the original, the result was a gap-free sequence of numerically named files, suitable for mencoder.
  4. Next, plugging the .mpg file from mencoder into the devede video dvd creator gui, making one chapter in the menu, and letting it rip, I get an iso suitable for burning with wodim or, probably, other burning software. That seems to play fine, albeit there remain many higher levels of sophistication with creating chapters and menu effects, I had enough on my plate just getting to this point.
  5. One phenomenon of this process is that the du of the iso result was much smaller than that of the files shoveled in at the beginning:
    4.8G total for *MPG files used in compilation. 4.7G for concatenated mpg.
    In bytes, 5044436992 for *MPG files, 4988381184 for output mpg.
    Resultant iso: [rolf@localhost disk2]$ ll iso/dvd2/dvd2.iso -rw-r--r-- 1 rolf rolf 2886377472
    Another way: $ du iso/dvd2/dvd2.iso 2.7G iso/dvd2/dvd2.iso

    So, back to google for bash math leads to bc, to find a factor to try to get a fuller dvd at the end:

    Code: Select all

    [rolf@localhost handycam]$ echo '(47/27)*43'|bc -l
    74.85185185185185185182

    I ran into some problems with bash rounding, so multiplied by 10, although the -l switch to bc might obviate that. Bottom line is that starting with 7.4G, maybe 7.3 to be safe, ought to more completely fill the dvd. I was conservative, also, with 4.3G as the capacity, didn't want to go through all this too many times. :C
  6. I wound up with 4 dvds, a little over an hour to about an hour and a half long. I wanted to make labels that gave some indication of what clips were included in each disk. My strategy was to take screenshots at the beginning, middle, and end of each dvd, to sketch out the range that was included. I like smplayer for it's ease of forward and back navigation of such media. Once paused on a suitable frame, I did Print Screen with kdesnapshot and saved several screenies for each dvd. Using 'Region' for the 'Capture mode', I can select the part of the screen I want to save. Then, I have found glabels and the template for the Stomper labels I buy to produce suitable labels. It's basic but sophisticated enough for my needs, easy to use.
    Image
Think that's it, hih.

Re: Making Video DVD from Sony Handycam clips

Posted: 31 Dec 2010, 00:14
by viking60
Might come in handy indeed. :s