AVTECH and DV4 Files

Another interesting method is used to store and display H264 streams….

OK – Disclaimer time! AVTECH and their associated partners produce many versions of their evidential video format. Different recording methods, different containers and then different players or versions. You may have a different version player but a file with the .dv4 extension and it will be something completely different. This is just one example, but it may help you somewhere down the line!

disk-contents

The video stream is inside the .dv4 file and we have a player included on the device used for evidential export. Unfortunately, this player requires installing – a big NO NO! There are a few many players for these exports and some you don’t have to install. I tested a couple of non-installers and then a couple I already had installed within a virtual PC but, frustratingly, none read the file. Upon checking the PLAYER Properties, the version number didn’t help.

PLAYER_properties

So, it was over to my virtual PC for installation. Remember – Never install anything into a good working PC until it can be trusted not to screw it up. Upon install, at least we had a version number this time.

install

 

Shortcut and Logo

Shortcut and Logo

The interface is pretty simple with two windows, one for the video and the other consisting of a rudimentary control panel. Upon measuring the video display size, it was presenting 720 x 576 pixels.

 

screen-interface

There are two filter buttons that apply a macroblock smoother and then another for de interlacing. The de interlacing method produced some considerable noise in the image and i’ll come back to that…

A button to add Date/Time to the image as an overlay was next to a ‘Convert to AVI’ button. This was very slow and produced a terrible AVI, containing the video encoded with the MS Video 1 CRAM Codec… the last letter really should be changed to a P!

The controls didn’t work correctly with only Play and Pause willing to jump into life. There was a snapshot button that produced a 724 x 580 BMP.

A tools button reveals another dialogue box:

settings

The Convert button here does not change the digital make-up of the file but creates an index at the end of the video data and places the entire thing within a .VSE container. By playing the VSE, the player controls now work due to it now having an index to use as a reference. Obviously, this helps BUT it overwrites the original .dv4 file – MAKE SURE YOU MAKE A COPY BEFORE YOU CONVERT.

So, to recap… the Resolution is 720 x 576 but the images are resized very slightly upon export. The de interlaced images appear to suffer with a lot of introduced noise and digital artefacts. The exported video is not even worth considering. Time to take a closer look at the .dv4 file:

mediainfo

A basic AVC/H264 PAL Stream… the interesting point was that the stream was being detected as being the Baseline Profile with Progressive Scan. This would make sense as Interlacing requires a higher profile.

Wikipedia has a good table showing all the components with a selection shown below:

Based on this, how was the video presenting as interlaced in the player? A quick FFplay gives us the answer….

ffplay

The top 288 Pixels are one field and the bottom 288 Pixels are the other. To be sure, I re-wrapped this stream inside an AVI container and then selected an I frame. This was then saved as a single .bmp image.

In Photoshop I cropped the top 288 pixels and saved this as one image and then the same with the bottom pixels. By using the difference calculation I verified my findings.

DifferenceFilter

Now that I had figured out the video, the first task was a series of individual images.

As I stated earlier, the imagery when exported from the player was resized, and then either interlaced or suffered with what can only be described as de interlacing damage. I found the highest quality imagery to be obtained by using the images from the raw stream and then running an action in Photoshop. The top image below was from the Player, the bottom, Photoshop.

originalVphotoshop

The purpose of those images was to show the damage along straight lines – Not to identify the registration mark….before anyone thinks that’s possible!!

The next was to deal with the video. In my Virtualdub pack, I have added a number of filters. Two deal with viewing and Un-viewing Field’s. By using the UnView Field’s filter, followed by the de interlace method of choice, a much better presentation video was produced.

Virtualdub_Filters

vdub-fields

On the Left is the input with fields seperated, on the right is the full image after filters applied

 

Depending on what is required, understanding how the video is made up takes a lot of the work out of establishing the correct process workflow.

Lastly I am required to validate my work and the various files created. Part of that process consists of validating frame counts to ensure no loss of images in any process. During this I identified some frame count differences that necessitated further clarification. The FFprobe results identified a number of missing Coded Pictures. Locating the Coded Picture Numbers within the XML Table is always a bit difficult but this VB Code, used within MS Excel does all the hard work for you.

Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

Click Insert > Module, and paste the following macro in the Module Window.

Sub Missingvalues()
Dim rng As Range
Dim rng1 As Range
Dim StartV As Single, EndV As Single, i As Single, j As Single
Dim k() As Single
Dim WS As Worksheet
ReDim k(0)
On Error Resume Next
Set rng = Application.InputBox(Prompt:=”Select a range:”, _
Title:=”Extract missing values”, _
Default:=Selection.Address, Type:=8)
StartV = InputBox(“Start value:”)
EndV = InputBox(“End value:”)
On Error GoTo 0
Set WS = Sheets.Add
WS.Range(“A1:A” & rng.Rows.CountLarge).Value = rng.Value
With WS.Sort
.SortFields.Add Key:=WS.Range(“A1”), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SetRange Range(“A1:A” & rng.Rows.CountLarge)
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Set rng1 = WS.Range(“A1:A” & rng.Rows.CountLarge)
For i = StartV To EndV
On Error Resume Next
j = Application.Match(i, rng1)
If Err = 0 Then
If rng1(j, 1) <> i Then
k(UBound(k)) = i
ReDim Preserve k(UBound(k) + 1)
End If
Else
k(UBound(k)) = i
ReDim Preserve k(UBound(k) + 1)
End If
On Error GoTo 0
Next i
ReDim Preserve k(UBound(k) – 1)
WS.Range(“B1”) = “Missing values”
WS.Range(“B2:B” & UBound(k) + 1) = Application.Transpose(k)
End Sub

Click the Play button to run the code, and a prompt box will pop out to tell you select a range that you want to use.

Then click OK, and enter the start value of your number sequence in the pop outing box.

And go on clicking OK, enter the end value of the number sequence. (Note: you must add 1 for your displayed end value, if your last value is 30, you should enter 31.)

Then click OK, and the missing numbers have been listed into a new worksheet.

Taken from the following site and re-produced here for continuity:

http://www.extendoffice.com/documents/excel/1054-excel-identify-missing-numbers-sequence.html

missing coded pictures

The new worksheet contained a list of all the missing Coded Pictures.

In the file examined, I found that the file count was actually more than the AVI converted by the player. Some slightly damaged frames were recovered that had been skipped in the software’s own transcoding process.

coded_picture_errors

Damage to the top field completely missed by the player

 

I hope that some of the methods used here have been helpful and will promote you to look beyond the player in identifying better methods to process and analyse the video.

Advertisements
By Spreadys Posted in EEPIP

4 comments on “AVTECH and DV4 Files

    • Thanks again Compn for your comments. There are times that I prefer to conduct a process visually. Quite often I will run some tests in Virtualdub and then complete the process in FFmpeg. It also probably comes down to habit, although as my knowledge with FFmpeg increases, I do find I use it more and more. Thanks again

  1. Pingback: .264 files | Spreadys.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s