Personal View site logo

User Tools

Site Tools


streamparser-rus

This is an old revision of the document!


StreamParser 2.6

StreamParser это анализатор видеофайлов снятых камерами Panasonic сарии G. StreamParser совместим только с AVC файлами (“xxx.MTS”). Этот документ не раскрывает особенности стандарта MPEG Transport Stream и H.264, их элементов и структуру; предполагается, что пользователь знаком с этими стандартами. Описание этих стандартов легко найти в различных Wiki в Интернете.

Установка

StreamParser совместим только с ОС Microsoft Windows . Установка StreamParser состоит из следующих шагов:

  1. Перед установкой новой версии StreamParser предыдущая версия должна быть деинсталирована. Это можно сделать, запустив деинсталяцию из “Панели управления” Windows. Имя программы в “Панели управления”- “GH13 Stream Parser”.
  2. Создайте временную папку для установки программы. Она может быть расположена в любом месте.
  3. Распакуйте содержание архива “StreamParserInstall.zip” во временную папку.
  4. Запустите файл “Setup.exe” двойным щелчком. StreamParser требует наличия ”.NET runtime” на компьютере. Если это приложение отсутствует на компьютере, программа установки автоматически скачает его с сайта Microsoft.
  5. После полной установки StreamParser автоматически запустится. Если установка прошла удачно, временная папка может быть удалена.

Основное приложение StreamParser

Перед открытием файла в StreamParser, скопируйте его на жесткий диск компьютера. Есть два способа начать работу в StreamParser. При выборе “File>Open” из панели меню будет проведён анализ всего файла. Альтернативно можно выбрать “File>Quick Test”. При этом будет проведён анализ первых 10 сек. видеопотока файла (по умолчанию); время в секундах может быть изменено выбором опции “Configuration>Configure Quick Test”). Большие по объёму файлы могут потребовать очень длительного времени для анализа и если нет специфической необходимости в этом, рекомендуется использовать “Quick Test”.

StreamParser стартует в режиме “Frames Mode”, который содержит показанные ниже инструменты.

a70d0fa95e0289a1954cc86ac0f3b5.jpg

Главное окно StreamParser содержит несколько компонентов:

  • A. Stream Data panel (Панель данных потока). Здесь показывается видеопоток разбитый на кадры. Первая колонка показывает порядковые номера кадров в потоке. Колонка GOP.Frame показывает номер группы/номер кадра в группе. “Offset” - это стартовый адрес кадра в MTS файле. “Length” - объём данных в кадре. “Type” - показывает структурный тип кадра(“I”, “P”, “B” или “A”). Audio (A) кадры будут показаны только если включена опция “Include Audio”, кнопка которой расположена над окном графика потока. Нажатие на заголовок колонки приведёт к сортировке данных в выбранной колонке.
  • B. Sel(Выбор). Нажатие этой кнопки синхронизирует данные Панели данных потока и Графика потока. Первый кадр в Панели данных потока будет соответствовать первому кадру , показанному в Графике потока.
  • C.Frame Data panel( Панель данных кадра). Здесь показаны кадры, выбранные в Панели данных потока, разбитые на пакеты Транспортного потока (Transport Stream) (TS). “Packet” показывает номер пакета относительно начала выбранного кадра. “Offset” - это стартовый адрес пакета в MTS файле. “E”, “S”, and “P” это флаги заголовков транспортного потока. “PID” это идентификатор пакетов транспортного потока. “SC”, “AF”, and “CC” - это флаги заголовков транспортного потока. “Type” - это тип пакета – “VID” для видео and “AUD” для аудио. “Abs Packet”- это абсолютный номер пакета(т.е. относительно начала файла). Число рядом с “Frame Data” - это количество отобранных файлов. Нажатие на заголовок колонки приведёт к сортировке данных в выбранной колонке.
  • D. Нажатие на эту кнопку вызовет старт Медиаплеера. Более подробно о Медиаплеере будет рассказано ниже.
  • E. Packet Data. Здесь показаны данные в hex (шестнадцатиричном) формате для пакетов выбранных в Панели данных кадра. Числа рядом с “Packet Data” - это Packet/Abs Packet (пакет/ абс.пакет)т.е. количество выбранных пакетов.
  • F. То же, что в пункте B выше, за исключением первого кадра, который на Графике потока будет соответствовать выбранному в Панели данных потока.
  • G. Этот ползунок позволяет выбрать количество колонок, показанных в Графике потока; это исползуется для увеличения или уменьшения масштаба графика.
  • H. График потока. В зависимости от выбора в чекбоксах “Include” могут быть показаны видео, аудио или оба типа кадров. На графике могут быть показаны размеры кадров в битах или байтах.
  • I. Кнопка включения показа Информационной панели (J) в увеличенном окне.
  • J. Информационная панель. Она содержит информацию о потоке, выбранных кадрах и пакетах.
  • K. Переключатель StreamParser в режим “Time mode”.

44350d5dcaf109a4002da6720e73e6.jpg

Окно StreamParser в режиме “Time Mode” такое же, как и в “Frames Mode”, но данные потока представлены не покадрово, а разделены по временным интервалам. Компоненты отличающиеся от окна “Frames Mode” :

  • A. Frame Data. In Time Mode “frames” are actually time slices (typically 0.092-0.096 seconds). As such a time slice can contain different types of packets – video, audio, timing, parameter sets, etc… Unlike Frames Mode, Time Mode shows all packet types, not just video or audio.
  • B. The stream Frames graph shows the amount of data contained in each time slice.
  • C. This is a smoothing function (averaging) for the graph’s running bitrate line.

When “Open Stream Player” is pressed in Frames Mode a Windows Media Player window is opened in the Frame Data panel. The player can be detached and displayed in a separate window. When a stream is played a frame marker in the Stream Frames graph follows along. Also shown in the figure below is the window presented up when “Show Big Information Panel” is pressed.

b3dca59ccb0a7a7bdc3b71e4a8ebb5.jpg

A short-form report suitable for posting on forums can be generated by selecting the “File>Generate Snapshot Report” menu item. The Snapshot Report can be saved as an image. Depending on StreamParser’s current operating mode (Frames or Time) one of two reports will be generated. The graph contained in the Snapshot Report is a copy of the currently displayed graph in the StreamParser main window.

4bd9ba0f7eff3df3af668ba1a17e79.jpg Note: Thumbnail is only shown when Stream Player is opened and not detached.

09ae3b7aeea2eca97c1f489d7bbbbc.jpg

Additional miscellaneous menu options allow the user to check MTS file integrity (“Tools>Check Stream File”), select camera model (“Configuration> Camera”), select slow computer operation (“Configuration>Slow Computer”), and interpret hacked GH1 1080p25 files (“Configure>Interpret GH1 1080i60 as Hacked 1080p25”).

The JM-SP Decoder

StreamParser analyzes data at the Transport Stream (TS) level. The JM-SP decoder analyzes data at the H.264 Elementary Stream level, offering details about video encoding parameters and results. With the JM-SP decoder details are provided about quantization levels, scaling tables, skipped frames, and much more. The JM-SP decoder is based on the H.264 reference codec and as such is a good tool to test streams for validity.

Configuration

The JM-SP decoder is configured by clicking on the “Configuration>Configure JM-SP Decoder“menu item. The parameters are as follows:

  • Number of Frames to Decode. The default is 100. This determines how many frames will be decoded. If set to zero, all frames will be decoded.
  • Produce Trace File. This parameter configures the M-SP decoder to produce a trace file (“xxx.txt”) containing a great deal of H.264 header data. Normally, this is unchecked as there is not typically a need to examine such detail and the JM-SP decoder takes a long time to produce the file.
  • Force 32-bit Decoder. StreamParser is delivered with both 32 and 64-bit versions of the JM-SP decoder. This option forces the 32-bit decoder to be used even under 64-bit Windows.

Use

Before the JM-SP decoder can be run a Video Elementary Stream File (“xxx.264”) must be created by clicking on the “Tools>Create Elementary Stream File” menu item. The Elementary Stream File can also be used with other video analyzers and is normally much faster than using “MTS” files with analyzers such as Elecard’s StreamEye. The JM-SP decoder is started by clicking on the “Decode Elementary Stream File (JM-SP Decoder)” menu item under “Tools”. After processing is complete a window is popped up showing the decode log (which is also saved as “xxx.log”).

c055211914689482f2470b13a5fd8b.jpg

The log file contains quite a bit of useful data to help determine how well a video clip has been encoded. The items shown for each frame are:

  • Frame. This is the frame number in display order (the same as used in StreamParser).
  • Type. This indicates the frame type (IDR, I, P, B). Note that with interlaced video each displayed frame actually consists of two slices. For example, an interlaced I frame will show as an “I | P” frame because it is actually an I slice for the top half and a P slice for the bottom.
  • QP. This is the general QP setting for the entire slice (in the case of the GH2, the entire frame).
  • Min. This is the lowest QP setting used in any macroblock in the frame. The H.264 codec uses the frame QP setting as a base and each macroblock can modify the QP setting using an offset value unique to that macroblock.
  • Max. This is the highest QP setting used in any macroblock in the frame.
  • Range. This value is Max minus Min and shows the range for QP values. With test charts, a high range value indicates potential problems, as test charts (with high detail across the entire image) should be encoded with fairly consistent QP values for all macroblocks (a range of 5, or less). Real world subjects, on the other hand, can vary quite a bit. Even with real world subjects, however, a range of twenty or more is usually not good. A high value for Range will often indicate macroblocking in I frames (which are often propagated to subsequent B and P frames).
  • DC. This is the lowest effective QP value used for DC coefficients in the frame calculated by combining QP with the Quantization Scaling Matrix. A DC value below 4 is wasted in 8-bit codecs and just results in extra processing and no gain in quality. If values below 4 appear it is probably appropriate to raise the Q parameter value (or lower the AQ value) until no value under 4 appears.
  • Skipped. This is the number of skipped (not encoded) macroblocks in a frame. Low numbers are acceptable. High numbers with test charts (more than 50) indicate problems. The most common reason this happens is when the codec runs out of bandwidth and starts skipping frames to compensate. With real world subjects skipped frames occur normally in very low detail areas, such as sky. A high value for Skipped typically will indicate stuttering in motion, or macroblocking.
  • QST-High. If an asterisk appears here the codec has switched to fall-back mode to avoid crashing and is using very low detail (T4) Quantization Scaling Tables. This should rarely happen and only when panning across extremely detailed subjects using a high shutter speed.

Under normal circumstances the information contained in the JM-SP decoder log should be sufficient to evaluate how well video has been encoded and make changes to patch parameters in response. The trace feature can be turned to produce a trace file that contains much more information. The trace file, however, is fairly cryptic (being in H.264 header syntax) and can take a very long time to produce.

streamparser-rus.1330376672.txt.gz · Last modified: 2012/02/27 21:04 by rv3adv