SDcorrect

Fixes the thin vertical black bars on the edges of Panasonic SD movie clips. (An aspect-ratio issue)
Also sets the 16:9 header flag for widescreen clips.

Linking

If you wish to link to this website, please use the link http://www.sdcorrect.co.uk as this will ensure the link works if the location of these web pages change. Thank you.

Introduction and download

See the full story below, but here is a link to a free (but donations accepted) bit of software I wrote. It didn't actually take very long to write. The time consuming part was figuring out what was going on and researching how to fix it...

Just click on SDcorrect.exe and choose to save it somewhere. Then run it.
If security prevents you downloading a .exe, here it is along with this web page in a Zip file.

The current version of SDcorrect is 1.2 (details)

What SDcorrect does and how to use it

SDcorrect is written to work with Panasonic SDR-S26 produced mpeg files (with .MOD extension). It might work with other Panasonic SD camcorders, but probably won't work with other brands. Try it and see if you have a similar problem.

SDcorrect does 5 things. The 5th is the critical one:

  1. Copy movie files from one place to another (normally from camcorder/sdcard to your hard drive).
  2. Configurably changes the file extension name (eg from MOD to mpg)
  3. Reads the file creation time-and-date and gives the new file a name related to the date-and-time
  4. Optionally puts files into subdirectories according to their date-stamp
  5. Changes the sequence_display_extension display dimensions within the mpg file to 704x576
The first 4 things are standard features that could be done using other applications or manually, but were useful to add here to simplify 3 workflow steps into 1. The 5th step is the purpose of the utility and fixes a problem in compatibility between Panasonic SDR-S26 camcorders and MAGIX Movie Edit Pro. You can read later why I wanted to fix this rather than use a compatible video editor. So what is the problem and how is it fixed? I'll give the details below, but the simple explanation is that the problem was the addition of some vertical black bars either side of my movie clips: The movie clips were automatically extended to 720 pixels wide (from 704) by putting 8 black pixels either side. Even if I made my movie project 704x576, it would expand to 720 with the black strips, then scale it back down to 704 (still with the black strips). The result is that by the end of my workflow my 4:3 movie has been squashed a bit thinner so that the picture bit is no longer 4:3 (or 16:9 when using wide format). Step 5 stops this happening.

How to use SDcorrect:

  1. Run SDcorrect.exe (You could put a shortcut on your desktop)
  2. Run windows explorer and locate where you are copying files from
  3. Type (or copy from the explorer address bar) into SDcorrect the directory of your camcorder movie files (eg F:\SD_VIDEO)
  4. Tick the 'Copy from subdirectories too' option so that all folders under this directory are searched for movie files
  5. put in the extension name of the files on your camcorder WITHOUT THE DOT (eg MOD)
  6. In windows explorer, find a suitable place on your hard disk to store all your movie files. The directory must exist, so create it if necessary.
  7. Type (or copy from the explorer address bar) into SDcorrect the directory of where you are copying your files to.
  8. Set the 'Change extension to' box to mpg (type it in - again, without the dot).
  9. It's optional, but I tick the next box (put in date subdirectories) to group movie files day by day.
  10. I choose the date format to be yyyy-mm-dd so that the folders get sorted correctly (in date order). Choose another format if you prefer.
  11. Click the 'Copy Files' button. The program is not complex, so screen updating and looking alive may not be very good, and particularly if copying big files the program may appear to have 'stopped responding'. This is normal - just be patient. Once file copying/fixing is complete SDcorrect will come back to life.
  12. On pressing the 'Copy Files' button all your settings made above will have been saved for you.
  13. A 'Done' popup message box appears when all your movie files are copied.
  14. Press the 'Close' button when you're finished.

Next time you can skip steps 2-10, as SDcorrect remembers your settings :)

Here's a screen shot of my settings:

To streamline your workflow further, you can set up your system so that SDcorrect automatically starts when you attach your camcorder. To do this in XP, you need to install TweakUI which is part of 'Powertoys for Windows XP'. This is a small, free application from Microsoft found in the right Download panel of their PowerToys for Windows XP page. Once installed, run it and add SDcorrect to the Autoplay Handlers (under My Computer->Autoplay->Handlers). You can then go to the Autoplay bit for details on how to make SDcorrect automatically start.

The 'problem' in more detail

I'm still not sure where exactly the problem lies (with the Panasonic encoding, the MAGIX interpreting, or an ambiguous standard). So I may be wrong, but I think the problem lies with the encoding by the Panasonic camcorder. So why do the mpg files work without my fix in other video editing packages (like PowerDirector, VideoStudio and Pinnacle) and in movie players (like windows media player)? My theory is that Movie Edit Pro is more sophisticated and reads and acts on the extended information contained in mpeg files, and that the other applications are more simplistic and ignore such information. A test that supports this theory is that my fixed mpg files still work exactly as they did before in all the other software packages. My understanding of the optional display_size is for it to be used in the reverse situation: When you have a 720x576 pixel picture, but only the inner 704x576 pixels contains the valid picture of the aspect ratio specified. This should be displayed by chopping off the invalid edges to fill the screen with the valid pixel area of 704x576. The Panasonic encoding implies the reverse: The valid display pixels (720x576) are more than the stored pixels, so padding must be added. Both processes are about cropping or padding, NOT SCALING. The document that helped me begin to understand this was A Quick Guide to Digital Video Resolution and Aspect Ratio Conversions. Invaluable for analysing mpeg files to see what their settings were is the application GSpot.exe. This can be found at gspot.headbands.com. My utility (SDcorrect) goes into the mpeg file, locates the Sequence_Display_Extension header extension and changes the display width from 720 to 704. In searching for how to do this, the most useful references I found were an MPEG headers Quick Reference page, and an MPEG Video Header Info thread on a codeguru forum. The first of these two was the best, and also doesn't suffer from all the javascript errors found on the page of the second.

Choosing a video editing software package

Background

Having recently purchased my first camcorder (a Panasonic SDR-S26 with which I'm very pleased), I've come to the point of wanting to make the most of it by using some decent video editing software. The software that came with it was very limited; quite cumbersome to use, and very limited features (I couldn't even see how to add a sound-track) or options for producing movie files of various formats. Both my Father, and Father-in-law have older DV camcorders and happily use Pinnacle Studio 9. So I took my video files round to test that out. I had a very painful experience - it appeared to work in theory, and little experiments produced good results. However I then tried to put together 40-50 clips to make a 10-15 minute movie. Not only did things get very slow for any kind of edit, but Pinnacle kept crashing. I rebooted 3 times during creation of the movie. And when I got to the end and tried to produce a movie file it never got past the first stage - after probably nearly 10 attempts trying several different file formats I had to give up with no movie. I do have perseverance though, so took the files (including my movie project file) back home and downloaded a trial version of Pinnacle 12. It was much much much better. Despite my computer being older and slower and with less memory than my father-in-law's, Pinnacle 12 ran much faster and didn't keep crashing. It also imported the version 9 project and managed to produce a movie first time. Unfortunately, it didn't handle the sound very well and at 4 points in the rendered movie I got short bursts of white-noise - one burst actually lasted several seconds. This experience led me to research alternative products.

Lining up the choices

To start the process of choosing some software I got onto the internet and put in some key words into a search engine. I quickly found a Video Editing Software Review on the TopTenREVIEWS website. A very useful overview of major products, rough indication of prices and features and some reviews. I'd already checked out Pinnacle Studio, so what to look at next. On their recommendation, I looked at CyberLink PowerDirector and Corel VideoStudio first. Following analysis of those, I then needed to look further and tried Magix Movie Edit Pro. Those were then the 3 I downloaded trial versions for and analysed for myself (see below). The marketers among you may wonder why I didn't consider other products. This is based on gut feel and may be based on incorrect assumptions, but firstly price was off-putting; the cheaper ones had the features I want, so why pay for features I'm unlikely to ever use. Secondly, I've had bad experiences with other Adobe and Roxio products which counted them out. If I was to try another product, the SONY one would have been next - my impression of Sony products (right or wrong) is that they tend to have limited support for 3rd-party options, which is why they were 4th, not 3rd on my list.

My tests

I was looking for all sorts of things and getting a general feel, but these were the critical things that helped me decide between these 3:

Features I was looking forCyberLink PowerDirectorCorel VideoStudioMagix Movie Edit Pro 15
Being able to make a DVD resolution windows media file (.wmv)YesNo, not obviously.Yes
Backward compatible MPEG sound for playback on older players (Not sure whether this would be much of a problem actually)NoYes, good optionsYes
Ability to make non-interlaced MPEG files (I originally thought this was important - not so sure now though)NoYesYes
Stable system without hanging or crashingSeemed good - but not tested as hard as MAGIXHung on me onceGood, but see note below

All the tick-box features seemed to be in all of them, but overall I was most impressed with the MAGIX offering. It was more difficult to learn how to use - I initially gave up quickly thinking the interface was limited, fiddly and not up to the job, but having realised features work a little bit different, I have come to not just like the interface, but prefer it to the others. Movie Edit Pro gives lots of flexibility and options at every stage and lets me take control. I know this would be off-putting to some, and they'd prefer one of the other systems probably, but I like the complete flexibility Movie Edit Pro gives, not just in editing, but in importing and producing movie files too. Movie Edit Pro worked quickly and reliably without hanging or crashing for a few days. It did eventually crash when I confused it on an advanced Menu creation process before burning a disk. However it crashed nicely!! It saved my project and closed gracefully, so that I could just start up again - and carry on from exactly where I left off. Nothing lost, except perhaps a minute or two. I have to say I got a little bit frustrated trying to put my own movie-loop in the background of the menu, but I got there in the end - Using a separately produced MPEG seemed to work best - again flexibility of options allowed me to find a way of getting what I wanted.

The big problem with Movie Edit Pro 15 was that on reading my movie clips, it put thin black strips down each side, as described above. Because I prefered it over the other possibilities, particularly in terms of flexibility and in being able to do all the things I had tried, I decided to persevere, and even wondered whether it was MAGIX's fault anyway and if I should investigate further. I did - and SDcorrect is the result. With this tool, Movie Edit Pro becomes my clear favourite. Since writing SDcorrect I have discovered that in Movie Edit Pro you can manually adjust the aspect ratio of the imported clips (within Object Properties of a clip), which actually solves the problem more easily. I still use SDcorrect though, as it automates the process and improves workflow. I have to point out that learning to use the interface was not that straight-forward, and some people will be put off by all the flexibility and options it gives. I like it though.

I've spent many a frustrated hour (well days actually) getting to the bottom of this black-line thing, so if you've read this far, I hope this might save you similar frustrations and give you the solution you've been looking for.

If you're wondering who I am - I'm a Mathematics teacher, but before teaching spent 8 years as a professional software development engineer. If you are a mathematics teacher yourself, you may like some of my electronic web-based Teaching Resources. If you're any kind of teacher, or have any role that involves marking attendance on a regular basis, you may like my attendance software, called STEARsoft.

If you wish to say thank you with a token donation, please click on one of the Donate buttons below. Thank you. (It will actually donate to STEARsoft.co.uk for which I am the Sole Trader)

(1.00 GBP)
(2.00 GBP)
(Choose your own amount)

If you wish to email, please find me at: