Some hints and thoughts about import of ffmpeg created AVI video files into IADS using IrigTime tag

106 views
Skip to first unread message

Ruben

unread,
Aug 28, 2015, 9:48:13 AM8/28/15
to IADS

The playback client's video player has an awesome feature, that instead of having to declare a video file and its corresponding IrigStartTime, one is able to just "select" a video channel by providing IADS with a properly named avi file (VideoChannelXX.AVI).

Furthermore, if the AVI-file start time is present within AVI's RIFF header metadata field "STRN" (e.g. IrigTime=123:21:00:00.000 ), the file start time will be set to the correct value automatically

 

Since we create our 3rd party video files with ffmpeg (e.g. when coming from an external source such as grabbed Hi8 tapes), which doesn't provide for editing the RIFF header’s “STRN” field (AFAIK), I asked Symvionics whether it would be viable that IADS Client's video player supported the comment field "ICMT" for Irig start time just as the “STRN”-field is used. Symvionics answered me, that they try to get this done for the next release.

-------------

Furthermore, I had performance issues when playing back several videos at once. The videos themselves were jerky and without sound for some 10-20 seconds after starting or spooling. Spooling/ sliding the video time line proved notchy/jerky, too, and resulted in few frame updates within the video player display while spooling.

The following steps helped me:

-       Having the video window on the main screen (which has full Directx hardware acceleration, both in Win7 and XP)

-       using AVI files with MPEG2PS Codec instead of h.264 (which is usual for newer and better MP4 container, however I can’t use MP4 due to compatibility reasons with other used software)

-       using FFMPEG’s mpeg2video’s standard group of pictures (GOP) (no B-frames, GOP size=12)

 

The steps mentioned resulted in a decent video player behavior with instant smooth playback and with fast spooling and recovery after spooling/ stopping and starting the video

 

Here are some other video player related information that might help other users:

>- By the way, is the video player of IADS able to rotate the videos
>"online" (so we wouldn't have FFMPEG letting do it)?

In Iads version 9.1 (due out around October), the Iads video player display
will have the ability to rotate the video 0 to 359 degrees. This should work
for you.

>Do You know whether IADS is using the PTS clock for synchronization for
>containers MPEG2-TS (.m2t files) and MPEG2-PS (.mpg files) (that are
>playable in IADS), too ? Or is it "just start time sync" for those two file
>types as it is according to Your writing for AVI files?

For all containers, it uses a combination of PTS clocks (when available in
containers such as TS) as well as the start time. It simply takes the
internal clock of whatever mechanism and 'offsets' it by the Irig start time
in the file. Think of it this way, each container has it's own notion of
time. We simply use that time notion and offset it by the Irig start time.


Streaming is always 'easier' than random access or scrolling. You simply
decode the frames in the order that they appear, then you use the PTS to
schedule their display. I'll bet that the TS files don't 'scroll back and
forth' very well. This is where the TS format is inferior to other
containers such as .MPG, .MP4, or .AVI.... and this is why Iads prefers
these formats for the end user. It gives them the ability to slide the data
and video back and forth in a smooth, accurate, and synchronized manner. TS
files are a 'linear-forward' format and the other containers are built for
random access.

James Bretz

unread,
Aug 28, 2015, 2:13:53 PM8/28/15
to IADS
Thanks for the summary Ruben.
 
This will surely help another user if they are processing video outside the system,
Jim
 
From: Ruben
Sent: Friday, August 28, 2015 6:48 AM
To: IADS
Subject: [IADS] Some hints and thoughts about import of ffmpeg created AVI video files into IADS using IrigTime tag
 

The playback client's video player has an awesome feature, that instead of having to declare a video file and its corresponding IrigStartTime, one is able to just "select" a video channel by providing IADS with a properly named avi file (VideoChannelXX.AVI).

Furthermore, if the AVI-file start time is present within AVI's RIFF header metadata field "STRN" (e.g. IrigTime=123:21:00:00.000 ), the file start time will be set to the correct value automatically

 

Since we create our 3rd party video files with ffmpeg (e.g. when coming from an external source such as grabbed Hi8 tapes), which doesn't provide for editing the RIFF header’s “STRN” field (AFAIK), I asked Symvionics whether it would be viable that IADS Client's video player supported the comment field "ICMT" for Irig start time just as the “STRN”-field is used. Symvionics answered me, that they try to get this done for the next release.

-------------

Furthermore, I had performance issues when playing back several videos at once. The videos themselves were jerky and without sound for some 10-20 seconds after starting or spooling. Spooling/ sliding the video time line proved notchy/jerky, too, and resulted in few frame updates within the video player display while spooling.

The following steps helped me:

<!--[if !supportLists]-->-       <!--[endif]-->Having the video window on the main screen (which has full Directx hardware acceleration, both in Win7 and XP)

<!--[if !supportLists]-->-       <!--[endif]-->using AVI files with MPEG2PS Codec instead of h.264 (which is usual for newer and better MP4 container, however I can’t use MP4 due to compatibility reasons with other used software)

<!--[if !supportLists]-->-       <!--[endif]-->using FFMPEG’s mpeg2video’s standard group of pictures (GOP) (no B-frames, GOP size=12)

--
You received this message because you are subscribed to the Google Groups "IADS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iads+uns...@googlegroups.com.
To post to this group, send email to ia...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iads/181bfa77-8a4d-479d-96f9-ec64a40ed79c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruben

unread,
Dec 9, 2015, 9:32:09 AM12/9/15
to IADS
Dear James, Dear Symvionics and users,

thanks again for implementing AVI's "ICMT"-field as another source for the IrigTime video starting time information used by IADS.

But I found a general issue (for both IrigTime fields: RIFF's STRN/ AVI's ICMT):
- When You do the video extraction out of a CH10 file with RTStation, there is no problem when You select the corresponding channel correctly (aside from the "PAL"-format fps rate issue I posted in a separate post); IADS playback (both network and local client) got a valid pfConfig entry for IRIG start time, as do the videos have in their corresponding "IrigTime" field.

However, when
- 1. creating IADSdata files/ video files yourself using an own tool, you have to copy the pfConfig from a previous project/ flight
- 2. copying an old/different pfConfig (from a nice colleague) to the project directory (e.g. that includes some display changes)

the video start time will not be taken from the AVI-file field, but from the copied pfConfig, even though in that very pfConfig the "VideoChannel" attribute is set to e.g. "Channel 4" thereby it could rely on that AVI file's IrigTime field. (instead of when "VideoChannel" is set to "Off" and file and "IrigStartTime" for the property bag MUST be provided for by the pfConfig file/ property bag.

This implementation leads to the following unwanted behavior (when using procedure 1. or 2.):
- Sometimes (? IADS 8.x and Post Test Server used) the old video path is used and (incorrect) video frozen or running "freely" unsynchronized with its completely different time
- Always (IADS 9.1 and Playback client only): the correct video in the local project directory is used. but will freely unsynchronized because Video property bag's time entry is pointing to the wrong start time (that of the old pfConfig instead of where the actual AVI file is pointing to)
- Always (IADS 9.1 and Playback client only): You cannot spool video anymore

The way to "work around" this is to go into every property bag of every video in the project and switch "VideoChannel" to "Off" and then back on to the corresponding channel. Then the "IrigStartTime" of the property bag will use the AVI's file field value. When You save, this value will also be passed to the pfConfig. But it is a hassle and an error source to have to do that with every video...


Couldn't IADS playback automatically overtake AVI's IrigTime value (ICMT/STRN filed) if available to the "IrigStartTime"-field of the property bag at every start, please?
I mean, if one absolutely wants this field to be taken from pfConfig's values, one could delete the value in the AVI file or maybe You could add a new property to VideoPlayer's property bag e.g. "StartTimeSource": "File" or "pfConfig"

Many thanks for taking care of this. If someone has a different suggestion, please don't hesitate...

Best regards,


Ruben


IADS9.1_Video_Time.png

James Bretz

unread,
Dec 9, 2015, 3:41:53 PM12/9/15
to IADS
Hi Ruben,
 
It’s true that when a video player display has it’s IrigStartTime propery set to something other than ‘blank’ (empty), this overrides the embedded ICMT/STRN IrigTime setting. The reason for this logic is that there were certain instances where the start time embedded in the file was incorrect and needed adjustment. At this point in time, we couldn’t change the default behavior because it could potentially fail on those configurations that did have a legitimate need to override the embedded time value. The best thing we could do is to add another property to the display to signal the new behavior.
 
Being as that your situation is pretty unique in that you’re creating the video files outside of Iads, it would probably be better/easier for you to process the config file and remove the IrigStartTime entry from the property bag of every video player that has a channel set. Once the property is removed from the property bag, the player should default to the embedded ICMT/STRN setting.
 
This shouldn’t be too difficult, but if you need help let us know,
Jim
--
You received this message because you are subscribed to the Google Groups "IADS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iads+uns...@googlegroups.com.
To post to this group, send email to ia...@googlegroups.com.

Ruben

unread,
Dec 10, 2015, 4:35:58 PM12/10/15
to IADS
Hello Jim,

thanks for the hint that "the player should default to the embedded ICMT/STRN setting" if no entry is in the pfConfig file. Even though obvious, it didn't come to mind.
Deleting the IrigStartTime entries in pfConfig by far beats the error prone hassle of setting VideoPlayer's property bag items back and forth for each video.

Problem solved! Thanks again, Ruben.

James Bretz

unread,
Dec 10, 2015, 4:38:10 PM12/10/15
to IADS
You’re welcome :) Glad it worked out,
Jim
 
From: Ruben
Sent: Thursday, December 10, 2015 1:35 PM
To: IADS
Subject: Re: [IADS] Some hints and thoughts about import of ffmpeg created AVI video files into IADS using IrigTime tag
 
--
You received this message because you are subscribed to the Google Groups "IADS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iads+uns...@googlegroups.com.
To post to this group, send email to ia...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages