Before anyone says anything – I know I said I was going to be quiet for a while but this post was half done and I felt that it was something I couldn’t leave!! The saga of SSF Files continues.Part 1 Part 2 Part 3
So, what does this version look like?
When the player opens, it is initially blank. You need to hit the search button to navigate to a folder containing your SSF Files. If you have copied your files to another folder for analysis use, you will get two folder structures similar to that seen in the image above. When the footage first opens, it will be resized to fit the entire window. By double clicking the picture it scales to the recorded pixel dimensions. In the example examined here, the displayed dimensions were 352px x 240px. There is a date and time overlay that can be turned on or off in the settings.
There is also that wonderful ‘Convert to AVI’ button – We will come back to that later, after a look at the video data inside the SSF’s.
For the purpose of this analysis I have only looked at a single camera SSF file that was exported from a DVR along with this player. It may be possible to find Multi-Camera SSF Files that come with this player, and it may be possible to play other SSF Files with this Player.
Being pretty confident that these were some sort of mpeg, FFprobe was used to scan the file:
A quick FFplay confirmed playback and decoding of the h264 stream and then another FFprobe was carried out to obtain the frame details.
A quick recap:
Probe the file to obtain stream details:
ffprobe -show_format -show_streams -count_frames -pretty yourfile.ssf > yourfile-probe.txt
Probe the file to obtain frame details:
ffprobe -show_frames -print_format xml yourfile.ssf > yourfile-frames.xml
REMEMBER TO TEST & VALIDATE YOUR RESULTS – UPDATE YOUR SOFTWARE IF NECESSARY
SEE HERE FOR AN EXAMPLE OF WHEN OLD SOFTWARE CAN PROVIDE INCORRECT RESULTS
I then placed the stream into a container file for visual analysis. I tested both avi and mkv containers with no problems.
ffmpeg -i yourfile.ssf -vcodec copy yourfile.avi
All frames detected and scrubbed through forwards and backwards with no problems
Now I know that it’s possible to deal with the images that make up the video, before I do anything else, it’s time to go back to the player. There was an important reason why….
When reviewing the original SSF file within the player initially, I used the Fw Frame control button to count through a second in time according to the overlay displayed. There were 15 frames per second. Using my new avi file, constructed through the ffmpeg method, and then selecting a playback speed of 15 FPS, resulted in an abnormal playback speed.
The first thing was to test the player’s ‘avi convert’ function.
I created two, one with the audio and one without.
First off, both methods created the same file, and both with an audio header! On attempting to extract the audio stream, the result was that the stream contained no data. Something to be aware of, if there are questions as to the presence of audio and why it was removed – It’s just the header – there may have been no audio to start with!
Secondly, look at the frame rate – it’s now 11FPS
Whilst we have this image, look at the codec – it has been transcoded!
The transcoding is required because the date and time information are now overlayed on the video. By reviewing this, there were still 15 unique images in a second, but the avi had a timing of 11 images per second. This caused it to play back to slow.
I then guessed what the problem was – and went back to the player to confirm it.
Video Motion Detection
By watching the motion and the time in the player very carefully, it was possible to see points where persons stand still – and so does the time. There is no notification of this. The only visual confirmation is that the footage stops playing. I had originally thought that it was freezing. If you just leave it, when the next image is present, it will start playing again. I have had a quick scan through the video to find the date/time information but can’t isolate it at present.
So, in conclusion:
1. The new version has been added to the BKPlayer.zip in my shared files.
2. It is possible to extract and read the raw h264 using ffmpeg.
3. It is possible to create a transcoded copy of the video with the date and time overlay added using the players built in functions. As a result, it would be possible to use an NLE to cut this up, placing the appropriate time gaps in between the cuts.
4. The FFmpeg avi would not be suitable for video work if there are signs of VMD in the clip of interest. It may be possible to trim the clip (avoiding the VMD parts) to only have the part you are interested in, and then adjust that clip manually back to 15FPS in something like Virtualdub.
If the task of creating a copy of the video was completed quickly, with little analysis, there is a very high likelihood that these timing issues would be missed. The result could be a presentation format copy of the video that does not play correctly and has unexplained gaps.
It is a ‘timely’ reminder not to rush a job, but to understand what you have to start with and then validate any created files to ensure they playback correctly.