Serviio / LG WebOS – Video format compatibility limitation
Summary
While testing Serviio with LG Smart TVs (WebOS) via DLNA, I found that the main compatibility issues occur with AVI files, especially older TV‑rip content encoded as MPEG‑4 ASP (XVID / DivX).
Many AVI files play correctly on LG WebOS using direct play (for example XVID + MP3 without packed bitstream). In these cases both playback and seeking work normally.
However, AVI files that use packed bitstream or certain DivX variants frequently fail to play on the native LG WebOS DLNA player.
Technical reason
During testing it became clear that Serviio renderer profiles cannot detect important MPEG‑4 ASP bitstream properties such as:
- packed bitstream
- some MPEG‑4 ASP bitstream flags
Renderer profiles can only match using:
container, codec, fourCC, profile and level.
Because of this limitation Serviio cannot distinguish between:
• compatible AVI (XVID without packed bitstream)
• problematic AVI (XVID with packed bitstream)
Impact
Because of this limitation users must choose between:
1. Direct play for AVI
+ seeking works
- some AVI files fail to play
2. Forced transcoding for AVI
+ most AVI files play
- seeking usually does not work
- higher CPU usage
During several hours of testing on LG WebOS 202x TVs I created two renderer profiles that can be switched depending on the type of content.Balanced profile – keeps direct play whenever possible (better seek)
- Code:
<Profile id="LG_balanced_seek" name="LG TV / WebOS Balanced Seek" extendsProfileId="1">
<Detection>
<HttpHeaders>
<friendlyName.dlna.org>LG.*</friendlyName.dlna.org>
</HttpHeaders>
</Detection>
<ResourceTransportProtocolHandler>
org.serviio.upnp.protocol.http.transport.LGProtocolHandler
</ResourceTransportProtocolHandler>
<Transcoding>
<Video targetContainer="mpegts" targetACodec="ac3">
<Matches container="*" vCodec="h264" aCodec="dca"/>
<Matches container="*" vCodec="h264" aCodec="truehd"/>
</Video>
<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3">
<Matches container="avi" vFourCC="DX50"/>
</Video>
<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3">
<Matches container="avi" vFourCC="AP41"/>
</Video>
</Transcoding>
</Profile>
Maximum compatibility profile – forces playback for most AVI files
- Code:
<Profile id="LG_max_compat" name="LG TV / WebOS Max Compatibility" extendsProfileId="1">
<Detection>
<HttpHeaders>
<friendlyName.dlna.org>LG.*</friendlyName.dlna.org>
</HttpHeaders>
</Detection>
<ResourceTransportProtocolHandler>
org.serviio.upnp.protocol.http.transport.LGProtocolHandler
</ResourceTransportProtocolHandler>
<Transcoding>
<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3">
<Matches container="avi" vCodec="mpeg4"/>
<Matches container="avi" vCodec="msmpeg4"/>
</Video>
</Transcoding>
<GenericTranscoding>
<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="ac3"/>
</GenericTranscoding>
</Profile>
Suggestion
If Serviio renderer profiles could detect packed bitstream or similar MPEG‑4 ASP properties, a single renderer profile could preserve direct play for compatible AVI files while transcoding only problematic ones.
For now I leave it up to the Serviio developer whether something like this could be included in profiles.xml.