Video decoding

From SpinetiX Support Wiki

Jump to: navigation, search

Introduction

This page provides information on how to best encode your video content (with or without audio) in terms of file format, video codecs and encoding parameters, for playback on a SpinetiX device.

A quick overview of the video decoding feature is shown by the image below, while the degree of support of the video codecs offered by each player model is further detailed under "Encoding parameters" section:

Video codecs.png


Note Notes:
  • The simplest way to test if a video is compatible with the HMP, is to drag & drop that video inside an Elementi / HMD project with the appropriate type (i.e. target HMP) correctly set up; if the video is imported, it means that the player can decode it, otherwise the reason for being rejected is displayed in Elementi 3.x / HMD, while Elementi 2015 or later will propose to transcode the video.
  • To find out more details about your media file, you can also open it with MediaInfo application, VLC media player (Tools menu > Codec Information) or other similar applications.

Formats

The format refers to the digital container format holding the streams of data - a container has typically one video stream and up to few audio streams, although other streams might exist as well (like text / subtitles).

The following container formats are supported for files with video:

Extension Description Video codecs supported Audio codecs supported Notes
.mp4, .m4v MPEG-4 Part 14 H.264, MPEG-2, MPEG-4 ASP AAC, MPEG Audio Layer I/II, MPEG Audio Layer III, AC-3, DTS MPEG-2 is not supported on HMP200, HMP130, and HMP100.
.mov, .qt QuickTime File Format H.264 , MPEG-4 ASP AAC
.avi,.divx Audio Video Interleave MPEG-4 ASP, MJPEG, MPEG-1, MPEG-2, H.264 MPEG Audio Layer III, MPEG Audio Layer I/II, AAC
.wmv Advanced Systems Format WMV9, VC-1 WMA2
.vob DVD Video Object MPEG-2, MPEG-1 MPEG Audio Layer I/II, AC-3, DTS Not supported by Fusion.
.m2p, .mpegps MPEG2 Program Stream MPEG-2, MPEG-1 MPEG Audio Layer I/II, MPEG Audio Layer III Not supported by Fusion.
.ts, .mpegts, .mp2t MPEG2 Transport Stream H.264, MPEG-2, VC-1 MPEG Audio Layer I/II, AAC, AC-3, DTS Not supported by Fusion.
.mkv Matroska Multimedia Container H.264, MPEG-2 AAC, MPEG Audio Layer I/II, MPEG Audio Layer III, AC-3, DTS Not supported on HMP200, HMP130, and HMP100.


Note Notes:
  • The highlighted item is the recommended one of the combination.
  • See also the audio file formats.
  • Some file formats only allow some types of codecs - see the Comparison of container formats page for a complete list.
  • VOB files must not be encrypted. Also, for older models, VOB files containing AC3 audio must have the audio transcoded into a suitable format like AAC, or have the audio track removed.
  • M4V is an Apple proprietary format which is unsupported, but for non-DRM-protected M4V and M4P files, often the file can be renamed to .MP4 and work correctly.
  • Closed captioning / subtitles streams included into the multimedia file are ignored by the player.
  • The following are partially supported container formats, which may work under undetermined restrictions and/or non optimal performance: .3gp, .3gpp, .3g2, .264, .mkv, .mpg, .mpeg, .mp2, .mp2v, .m2v, .m1v, .m4ves, .dv, .asf, .mjpg, .mjpeg, .ts.

Video codecs

A video codec is software or a device that provides encoding and decoding for digital video, and which may or may not include the use of video compression and/or decompression. Several main, non-proprietary, video codecs are implemented on the HMP, as detailed below.

Supported video codecs

The following video codecs are implemented on the HMP:

  • H.264 / MPEG-4 AVC
    H.264 or MPEG-4 Part 10, Advanced Video Coding (MPEG-4 AVC) is a video coding format that is currently one of the most commonly used formats for the recording, compression, and distribution of video content. The H.264 video format has a very broad application range that covers all forms of digital compressed video from low bit-rate Internet streaming applications to HDTV broadcast and Digital Cinema applications with nearly lossless coding. With the use of H.264, bit rate savings of 50% or more compared to MPEG-2 Part 2 are reported.
  • MPEG-4 Part 2
    MPEG-4 Part 2 or MPEG-4 Visual is a video compression format developed by MPEG. It belongs to the MPEG-4 ISO/IEC standards. The most commonly deployed profiles are Simple Profile (SP) and Advanced Simple Profile (ASP).
  • MPEG-2 (and MPEG-1)
    MPEG-2 (aka H.222/H.262 as defined by the ITU) is a standard for "the generic coding of moving pictures and associated audio information". MPEG-2 is widely used as the format of digital television signals that are broadcast by terrestrial (over-the-air), cable, and direct broadcast satellite TV systems. It also specifies the format of movies and other programs that are distributed on DVD and similar discs.
  • Windows Media Video 9 / VC-1
    VC-1 is a video codec specification that has been standardized by the SMPTE and implemented by Microsoft as Microsoft Windows Media Video (WMV) 9, in the form of 3 codecs (each identified with a unique four character code): WMV3, WMVA (deprecated), and WVC1.
    Not supported on HMP200 or lower: Main Profile @ High Level (MP@HL) and the Advanced Profile (WVC1 / VC-1 Advanced Profile).
  • Motion JPEG
    Motion JPEG (M-JPEG or MJPEG) is a video compression format in which each video frame or interlaced field of a digital video sequence is compressed separately as a JPEG image (which is inefficient, using more bits to deliver similar quality, compared to more modern formats, such as H.264/MPEG-4 AVC). It is used by video-capture devices such as digital cameras, IP cameras, and webcams.
    Interlacing is not supported and for QuickTime formats only MJPEG-A is supported (MJPEG-B is not supported).


Note Note: The degree of support of the video codecs offered by each player is further detailed under "Encoding parameters" section.


See also the list of supported audio codecs.

Unsupported video codecs

This list is not exhaustive and any codec that is not written above, should be considered as part of this list.

  • Flash video - it's not possible to display flash videos (from sharing websites like YouTube), however you might be able to download those videos (as mp4, avi or another supported format) using browser plugins or 3rd party applications.
  • Windows Media Video 8 (WMV2);
  • Lossless codecs / Uncompressed video (Quicktime Animation, RLE, DIB BMP, RGB);
  • RealVideo, Cook;
  • Interchange formats such as OMF / MXF;
  • MxPEG (proprietary, used by some low-power cameras), JPEG 2000;
  • VP8, VP9.


See also the list of unsupported audio codecs.

Encoding parameters

The encoding parameters refer to all the other settings (e.g., codec profile & level, resolution, frames per second, bitrate etc.) that needs to be set correctly for the video / audio file to be decoded by the HMP. For instance, to address various applications ranging from low-quality, low-resolution surveillance cameras to high definition TV broadcasting and DVDs, many video standards group features into profiles and levels.

DiVA

Profiles and levels:

  • H.264 (aka MPEG4 Part 10) Constrained Baseline, Main or High profile up to level 4 (reference: H264 levels) - resolution up to 1080p.
  • MPEG-2: Simple and Main profile, up to High level (MP@HL)(reference: MPEG-2 profiles and levels) - resolution up to 1080p.
  • MPEG-4 (Part 2): Simple and Advanced Simple ( SP/ASP ) up to level 5. (reference: MPEG-4 levels) - resolution up to 1080p.
  • Windows Media Video 9 (WMV3): Advanced profiles, Level 3 - resolution up to 1080p.

HMP350 and HMP300

Profiles and levels:

  • H.264 (aka MPEG4 Part 10) Constrained Baseline, Main or High profile up to level 4 (reference: H264 levels) - resolution up to 1080p.
  • MPEG-2: Simple and Main profile, up to High level (MP@HL)(reference: MPEG-2 profiles and levels) - resolution up to 1080p.
  • MPEG-4 (Part 2): Simple and Advanced Simple ( SP/ASP ) up to level 5. (reference: MPEG-4 levels) - resolution up to 1080p.
  • Windows Media Video 9 (WMV3): Advanced profiles, Level 3 - resolution up to 1080p.

HMP350 only

  • MJPEG - resolution up to 1080p.

HMP200

Profiles and levels:

  • H.264 (aka MPEG4 Part 10) Constrained Baseline, Main or High profile up to level 4 (reference: H264 levels) - resolution up to 1080p.
  • MPEG-2: Simple and Main profile, up to High level (MP@HL)(reference: MPEG-2 profiles and levels) - resolution up to 1080p.
  • MPEG-4 (Part 2): Simple and Advanced Simple ( SP/ASP ) up to level 5. (reference: MPEG-4 levels) - resolution up to 720p.
    • MPEG4 video is limited to a maximum width or height of 1280 pixels and a maximum of 3600 macroblocks per frame. Release 3.0.0 was limited to an absolute vertical resolution of 864 pixels.
  • MJPEG - resolution up to 720p.
  • Windows Media Video 9 (WMV3): Simple and Main profiles, Low and Medium levels - resolution up to SD.

Notes:

  • MPEG-2 and H.264 are the most optimized codecs to use on the HMP200.
    • MPEG-2 is using less processor resources than H.264, thus leaving more for other tasks, but the video itself will require a higher bitrate for the same quality.
    • For more than two videos to be decoded in the same time, MPEG-2 should be preferred to H.264.
  • Please see Encoding guides if you need to convert your video to be supported.

HMP130 and HMP100

Profiles and levels:

  • MPEG-4 (Part 2): Simple and Advanced Simple ( SP/ASP ) up to level 5 (reference: MPEG-4 levels) - resolution up to 720p for HMP130 and SD for HMP100.
  • MPEG-2: Simple and Main profile, up to Main level (MP@ML) (reference: MPEG-2 profiles and levels) - resolution up to 720p for HMP130 and SD for HMP100.
  • H.264 (aka MPEG4 Part 10) Constrained Baseline or Main profile up to level 3 (reference: H264 levels) - resolution up to SD.
  • MJPEG - resolution up to SD.
  • Windows Media Video 9 (WMV3): Simple and Main profiles, Low and Medium levels - resolution up to SD.

Notes:

  • MPEG-4 is the most optimized codec to use on the HMP100 & HMP130.
  • Please see Encoding guides if you need to convert your video to be supported.

Recommended maximum resolution

The maximum resolution values below are recommended by SpinetiX based on square-pixel aspect ration for common usage.

  • If your video is above these values, you might need to re-encode your video.
  • For advanced users, the actual maximum resolutions (including non-square PAR) can be deducted from the codec specification / constraints.

Video encoding matrix.png

Recommended bit rate

The values below are recommended by SpinetiX for optimal usage:

H.264 MPEG4 MPEG2
SD 2.5 Mbps [0.24 bpp] 3 Mbps [0.29 bpp] 5 Mbps [0.5 bpp]
720p 4.5 Mbps [0.2 bpp] 6.5 Mbps [0.29 bpp] 9 Mbps [0.4 bpp]
1080p 8 Mbps [0.16 bpp] - 16 Mbps [0.32 bpp]

Notes:

  • The maximum bitrate that can be supported can be deducted from the codec specification / constraints for video-only content.
  • Any video having a bit rate higher than 25Mbps should be transcoded. This can be done by Elementi 2015 or by other encoders.
  • SpinetiX has successfully tested at up to 50Mbps on the HMP350, 15 Mbps on the HMP200 and 11 Mbps on the HMP130 / HMP100.
  • MPEG-2 MP@HL states that the bit rate can go up to 80Mbps - that is probably outside the capabilities of the HMP and remains untested by SpinetiX.

Other notes

  • The specified video standards (e.g. 720p) are performance guides based on standard aspect ratio pixel equivalents; i.e. higher resolutions that 1280x720 could be displayed if the dimensions are adjusted proportionally.
  • Resolutions bigger than 1080p (like 4K videos) are not supported. Elementi 2015 offers the possibility to transcode the video / audio file to a format supported by the target HMP(s) - see also how large videos are imported for the special case of multiscreen project - otherwise, you need to manually re-encode the video at a smaller resolution, or cut the video in four or more parts and display it within a video wall.
  • Interlaced video: HMP devices, using firmware 2.2.x or later, have a built-in de-interlacing filter for MPEG2 and H.264 videos.
  • Video transparency is not supported.
  • The HMP supports some features relevant to video in addition to those in the SVG Tiny 1.2 specifications, such as rectangular clipping regions and elliptical arcs, however masks and filters are not supported.

Troubleshooting

Video is not displayed

When a black image (green, on older firmware versions) is displayed instead of the video, it means that the video cannot be decoded by that player, most probably because the video is outside the player specifications (in which case you will find warning messages in the player.log, respectively on resources.log on older firmware versions).

Normally, Elementi / HMD would prevent importing that video inside the project, that is if the project type is set correctly. Similarly, the content creation tool or Fusion (in newer firmware versions) would also prevent uploading such a video.

Solution

See above the correct format, codec, and encoding parameters to use with the video files. Alternatively, you can re-encode the video within Elementi 2015 or later.

Video is rejected

A video that is outside the player specifications is rejected by Elementi 3.x / HMD upon import, because the HMP would display a black / green image instead of the video. The reason of rejecting that video file is also displayed; note that in Elementi, you need to click on the "Details..." button to get the full error message.

Similarly, the content creation tool or Fusion (in newer firmware versions) would also prevent uploading such a video.

Solution

Upgrade to Elementi 2015 or later, which allows re-encoding the video upon import. Alternatively, you can re-encode the video with a third-party application to make it compliant with the player specifications.
  • One common mistake is trying to import a Full HD video inside a project whose target player is HMP100 (default value when creating a new project) or HMP130, instead of HMP200. To correct this, right-click on the project, go over "Set Type" and select "HMP200 Project".

MPG files are not correctly played

Because the .mpg file extension is defined very vaguely, it is often mistakenly used as a container for MPEG2 program streams or transport streams (instead of .ts or .ps). Elementi / HMD allows importing a .mpg file, but usually the streams inside the file are not properly interpreted by the software / player, which results into audio / video sync loss or a totally wrong output.

Solution

  • If the file was suppose to be a .ts or .m2p, usually renaming the file should resolve the problem.
  • If the file was meant to be in a different container (like mp4, avi etc.), you can fix this problem by rewriting the streams into the proper container using a tool like ffmpeg - for instance, the following ffpeg command rewrites the file "inputfile.mpg" into "outputfile.mp4":
    ffmpeg.exe -i inputfile.mpg -codec: copy outputfile.mp4

Video is not smooth

Playing a 25 fps video on an player set to output a video signal at 60Hz may lead to a non-smooth effect on the screen; same thing applies for 30 fps video played at 50Hz.

This is due to the fact that player must compensate for 60 / 25 not being an integer value; so to output 60 images per second, the player must display each frame of the original video twice (that's 50 images), while some frames (evenly distributed) are displayed three time, to cover for the missing 10 images. This last part of the process can affect the smoothness of the video playback. A similar process is done for 30 fps video played at 50Hz and for 24 fps videos.

Solution:

To improve the smoothness, it is recommended to set the player output at 50Hz for 25fps video, respectively at 60Hz for 30 fps videos. In case of having videos at 24 fps or a mix of videos at different fps, the best is to set the player output to 60Hz.

Image freeze or audio lost

This is the result of a non-optimal multiplexing of the audio and video streams that requires more than 1 MB of buffering of the audio or video stream in order to keep it in sync with the other. In this case the player.log has the following error:
Stream demuxing failed because more than 1048576 bytes of buffering is required

Solution:

Re-encoding the media, either within Elementi 2015 (or later) or with another application (like FFMpeg) should fix the image freeze or the audio lost. Alternatively, the spx:maxDemuxingBufferSize attribute could be increased.

See also

This page was last modified on 16 January 2017, at 15:36.