Cheating television history with version 2022/XI
Egg, November 26, 2022: Anyone who wants to archive older films from DVDs is confronted with a problem in that the captured works often come across as very jerky. The background is “buried” in the tube technology of televisions of the time. This blog is about how such films can be “descreened”.
This is why the DVD has its justification for film fans
For many, the DVD may have long since ended up in the disposal yard. Anyone who still buys old disc technology in an age of streaming is almost accused of trampling through the landscape as a dinosaur. However, it’s fair to counter that while the new “beautiful” streaming landscape is producing an all-encompassing mainstream, it’s extremely difficult to locate older films beyond a DVD. The supply of titles on DVDs is still large and the prices for DVDs have dropped significantly (demand probably determines the price) compared to the past. However, the old discs have a disadvantage. Mostly the tracks are played with so called half pictures.
The reason for this is that in the analog television era, the pictures were only transmitted in half. The first picture contained the lines 1,3,5.., the second picture the lines 2,4,6…. Since the tube screens had a “lag time”, the result was a “de-jerked” image with half of the image data for the time. If appropriately encoded films are played back on a flat screen, unfortunately just the opposite effect occurs. The half-images remain and disturb the film enjoyment immensely. Here are two images from an episode of The Muppet Show:
The effect is particularly pronounced when “fast” movements (like the trumpet here) occur. An enlarged view shows the effect even more clearly:
This effect can be eliminated by software. The console program ‘ffmpeg’ provides the filter ‘-vf yadif’ for this purpose. On the ArchivistaBox there are some utilities for refining videos. These are located in the folder ‘/home/cvs/archivista/jobs’. The program ‘mp4single.pl’ can be used to optimize an MP4 file. For this the call of ‘mp4single.pl’:
mp4single.pl pathfile pathout [fps widthout heightout quality dvdopt sameinput]
In the first place you have to set the desired video file, then the path for the optimized result. The other specifications are optional. With ‘fps’ the desired number of frames per second (fps) can be specified, there follow specifications for width and height, the desired quality, the optimization of a field file discussed here and with ‘sameinput’ it can be specified that the program should use the values of the source file.
To “unscreen” a video, the program can be called as follows:
perl mp4single.pl ./Muppet.mp4 ./opt -1 0 0 0 1
The flag ‘-1’ at ‘fps’ causes that no change is desired at the frames per second, specifications of 0 at width and heights cause that these are not adjusted either. The flag ‘1’ at ‘dvdopt’ causes the half line optimization. Attached is a still image from the optimized file:
An enlarged section for this purpose as well:
It would be presumptuous to expect sharp contours to appear in an enlarged view of a movie that consists of 720×576 image pixels. On the other hand, the field effect is removed and the video file can be played back “smoothly”.
Batch optimization with ArchivistaBox
With the ArchivistaBox it is possible via WebConfig or there in the jobs to run such optimizations automatically in the background. Enclosed is the corresponding mask:
This allows multiple videos to be conveniently optimized in one pass via the web. The prerequisite for this is that the films are already included in ArchivistaDMS.
Important: Optimizations via the form above should be carried out with caution. If the values are too “aggressive” or the optimization is called up several times, the quality of the videos is effectively destroyed.
Even more important: Only from version 2022/XI onwards, multiple audio tracks and/or subtitles remain included when they are optimized.
Conclusion: it takes time, and there is a backup….
Finally, it should be mentioned that optimizing or removing the fields takes plenty of time. With 8 cores (16 threads), about 3 to 5 minutes of time is needed per hour at normal DVD resolution. In this sense, of course, the jobs at WebConfig are worth their weight in gold.
In the end, the optimization results in “jerk-free” videos in which the half-frame effect no longer occurs. On a positive note, the videos also take up less space afterwards, since the shifted pixels no longer appear in the images.
It should be noted that with the optimized Vidoes always the original file is copied into the folder /home/data/archivista/archhigh. This has the advantage that in case of an incorrectly performed optimization, the original file remains available. However, there is no backup copy of the folder ‘archhigh’ and over time this folder may take up too much disk space. The data can be removed manually at any time using the integrated file manager Caja or the console. Enjoy!