Page 1 of 1

Invalid file form - avi with mpeg4 divx 4

PostPosted: Sat Sep 27, 2025 9:11 am
by petrmoty
Hello,
my LG TV (LG OLED55B46LA) is reporting an error Invalid file form.
I attached files in the ZIP.

I did a nasty thing in the transcoding profile settings and it works for now, but I'd be happy if we could find a better solution together
I set it to transcode all files. I didn't want to deal with what formats each file has.

  Code:
      <Transcoding>
         <Video targetContainer="mpegts" targetACodec="ac3">
               <Matches container="*" />
            <Matches container="matroska" aCodec="dca" />
         </Video>
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3" >
            <Matches container="flv" />
               <Matches container="asf" vCodec="wmv2"/>
               <Matches container="rm" />
               <Matches container="wtv" />
         </Video>
      </Transcoding>

Re: Invalid file form - avi with mpeg4 divx 4

PostPosted: Sun Dec 14, 2025 3:38 pm
by petrmoty
Dobře, tak to nepomohlo a spousta videí není možné přehrát.

Prosím o navržený postup, co mám vyzkoušet, co mám zjistit o souboru, o televizi atd.

Děkuji.

Re: Invalid file form - avi with mpeg4 divx 4

PostPosted: Sun Dec 14, 2025 8:52 pm
by atc98092
I don't know enough about the DIVX codec, so I can't say for certain what tag might capture it. Serviio currently recognizes the following video codecs: mpeg2video, mpeg1video, wmv2, mpeg4, msmpeg4, h263, h264, h265, vc1, mjpeg, flv, vp6, vp8, vp9, theora, dvvideo, rv, svq1, svq3, cinepak.

Instead of transcoding absolutely everything like you are currently doing, you could slim it down to just match the MPEG4 video and see if that captures the necessary unplayable files.

Re: Invalid file form - avi with mpeg4 divx 4

PostPosted: Tue Mar 24, 2026 6:45 pm
by petrmoty
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.