Background & History
In the 80s some people used VHS cameras. They were large with poor video quality. When I was young my father used to film with a super 8 video camera. In general quality was better with super 8 compared to VHS. But playing was a big project and film was very expensive. VHS tapes were inexpensive and playback easy on your TV.
In the early 2000s something happened. My grandfather who used 35 mm camera in the 60s bought a Sony DCR-TRV140. It was a Digital 8 camera. Quality was amazing and best of all I was able to import video to my Windows 89 dual Celeron computer via Firewire. I was even able to edit my film (Ulead Studio) and write it back to tape with some dongle that unlocked the camera for writeback. I later got a Canon XM-2. I wanted the XL-2 but it was just to expensive. The XL-2 has been on Ebay and similar sites now for about 80$. A gentle reminder that expensive tech is sometimes a waste of money.
So I filmed a lot. I ended up with loads of tapes and large files on my computer. The camera was sold. Some files were lost.
Problem
So I ended up with a lot of tapes I could not read. I had large DV Avi files that does not play on modern TVs. VLC can play them but most devices can not. If you are able to play them it is slow as they are so large. There are many used camcorders for sale and you could just buy any model. It is just for playback so recording quality is not important. When connecting a DV camera to your computer it is not really like connecting your phone or a sdcard. First of all it is using firewire cable. You will not have this port on your computer today. So what we need is:
- A firewire card and cable
- Software for importing, changing type and converting
- Import the tapes
- Convert the files from Avi to mp4 or mkv
History
Before staring lets go back and look what we are dealing with. Both Mini DV tapes and Digital 8 tapes both saves in DV format. It is 720×576 in PAL. Files is in avi format at least in Windows as it is using avi as a container. A one hour tape usually creates a file of about 13Gb. There are some variants of DV but in my case it is DV used by Sony. There are two types of DV files. Type 1 and Type 2. Usually when importing in Windows you will get Type 2. There are some minor differences. There is a 2GB file size limit on AVI Type 1 files. I will get back later on why this is something you should care about.
Capture
So lets capture. I did this back in 2002 and today this is old tech. As I mentioned before you will have to have a Firewirecard. I bought this card from Amazon. It is about 10$.
You will also need some software. I have used WinDV . Note that you are able to choose type 1 or 2 when capturing. Choose type2. So just connect and import. Save all files.
Converting
Now it is time to convert. We do this because we want to be able to watch the films on a TV or Chromecast TV. There are manyways of doing this. If you google you will most likely get sponsored results with links to poor soloutions and programs. Some use Davinci Resolve. But there are issues. You might actually get better results when using old video editors. You can use ffmpeg, Handbrake or VLC. In general the main issue is that DV video is interlaced and you want it to be progressive. This is complicated and I won´t get into details here. But keep in mind that when converting the video will not be the same as it was before. Keep the old files.
I will use two programs to do this.
The conversion is done in Avidemux. However this program only works with type I DV files. The old files I have is Type 2. If you try to open the DV file in Avidemux it does not work. So the first step would be to open the large file in Canopus. You have some choices here if you want to use Canopus codec or Microsoft codec. I do not think it matters as we will delete the files after conversion anyway.
Note that we will Type 1. This will spilt the original file beause type 1 does not support large files. If you want to convert the files into one large file as it was on the tape you will have to merge them afterwards. In my case I like to have many smaller files as it is easier to wacth. There might be other ways to do this if this is a concern.
So now you should have a bunch of smaller files formatted as type 1 in the target folder. They are still DV Avi. We want them to be something else. Delete the old temporary large dv avi file. Time to start up Avidemux. You want to add the files you converted in the previous step. There are many settings here but choose Mpeg4 AVC (x264) as Video output. MP# (lame) as Audio output and MP4 Muxer as output format. There are many settings here and I have just used what I think looks good. You might want to change them and try other settings. Read the full docs here.
One important step is to add a filter for deinterlacing. Video will look bad if you do not add this. I have used Yadif filter.
Now choose save. This will convert the file. Make sure it looks as good as possible. There are many other filters to try out like sharpen.
You might already have noticed that there is no way of opening many files. I guess you have about 10 avi files that you want to convert just as a start. This will take time as you will have to add the filter each time. To batch process many files do the changes you want first with filters and output. Save File > Project script > Save as project.
Save the .py file as settings.py
Remove the following lines.
adm.loadVideo
adm.clearSegments
adm.addSegment
adm.markerA
adm.markerB
Create a script.bat file in notepad like this
set avidemux=”C:\Program Files\Avidemux 2.8 VC++ 64bits\avidemux_cli.exe”
: %%~nf returns the filename without the extension
for %%f in (*.avi) do ( %avidemux% –load “%%f” –run settings.py –save “%%~nf.mp4” –quit
)
Save the scripts in the same folder as your avi files. Open cmd and go to your folder. Run script.bat. This will precess all your dv avi files and export them as mp4 with the codec and settings you used in Avidemux. Remebber to change path in the bat file and use avidemux_cli.exe. When done just delete the old avi files. You are done.
Original filesize was 13 Gb. New size is 1.3 Gb. Note that this is my way of doing this. The result is good but could be better if you do it with other filters or codecs. I choosed mp4 but could have used mkv as a container.
Merging
If you want to merge the files you can use FFmpeg. I do like this as I do not want to encode.
Create a texfile in the same folder as the files called join_video.txt. Add the files like below.
file hasselvägen8-CDV_00.mp4
file hasselvägen8-CDV_01.mp4
file hasselvägen8-CDV_02.mp4
file hasselvägen8-CDV_03.mp4
file hasselvägen8-CDV_04.mp4
ffmpeg -f concat -safe 0 -i join_video.txt -c copy output_file.mp4
I have checked and it works as expected.
Problems and other ways of doing this
Note that there are other ways of converting the files. I had some issues with newly imported DV type 1 files and opening them in Avidemux. I am sure they are type one but it still fails. I also got some null frames and some Concealing bitstream errors and some DTS errors on some files. This was mainly on new files saved with another camcorder. An old Panasonic. Maybe this camera is something wrong with? Or there might be other problems. I did not notice any artifacts on the outputfile.
Handbrake
I know many use Handbrake. I have used it in the past but found it to complicated. However I gave it another try now and it was better then I remembered. I can use Yadif and the output seems fine to.
FFMPEG
I suppose this command below do the same as Avidemux. The result is fine and the yadif interlacing plug-in is used.
ffmpeg -i .\oxbonder.01-04-17_10-14.00.avi -vsync 2 -vf yadif -c:v libx264 -pix_fmt yuv420p -c:a mp3 oxboonder2.mp4