FAQ  •  Register  •  Login

LG UJ6307 msmpeg4v3 video codec tells "Invalid file format"

<<

chucky

Serviio newbie

Posts: 3

Joined: Mon Dec 03, 2018 10:36 am

Post Mon Dec 03, 2018 10:49 am

LG UJ6307 msmpeg4v3 video codec tells "Invalid file format"

Hello,

Most formats works well with selected LG profile, and thanks for wonderful piece of software. Just all videos, that use msmpeg4v3 video codec, are not transcoded and TV shows "Invalid file format" message. I have tried to struggle with profiles, and found that profile "Sony Bravia TV (2009)" works with these files, but it does transcode h264 also, which makes FHD videos not watchable. So I would like to stick with LG profile.

Can you tell me how to add option to some configuration file for LG profile, that enables default transcoding for msmpeg codec? Thanks.

  Code:
c:\Program Files\Serviio\lib>ffmpeg.exe -i "i:\film\!series\cerv trpaslik\Červený trpaslík 07 Kryton.avi"
ffmpeg version 3.4.4 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180830
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame --enable-libass --enable-librtmp -
-enable-fontconfig --enable-libfreetype --enable-zlib --enable-libx264 --enable-libspeex --extra-libs='-lrtmp -lpolarssl -lws2_32 -lwinmm -l
expat -lfreetype -lfribidi -lz' --arch=x86_64 --enable-runtime-cpudetect --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --enable-gpl
 --pkg-config=pkg-config --bindir='/jenkins/workspace/FFmpeg - Win64/target'
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, avi, from 'i:\film\!series\cerv trpaslik\─îerven├Ż trpasl├şk 07 Kryton.avi':
  Duration: 00:26:23.60, start: 0.000000, bitrate: 340 kb/s
    Stream #0:0: Video: msmpeg4v3 (DIV3 / 0x33564944), yuv420p, 320x240, 282 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 44100 Hz, mono, s16p, 47 kb/s
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Tue Dec 04, 2018 3:40 am

Re: LG UJ6307 msmpeg4v3 video codec tells "Invalid file form

Seems to be increasingly common (same situation for my latest Panasonic). Newer TV's don't support DivX - makes sense as this is now an old protocol and the TV manufacturer would have to pay licensing fees to support it.

To transcode these files create a new file in Serviio\config called user-profiles.xml. Using Notepad++ or similar edit the file and add the following (this is a modded version of my Panasonic 2018 profile, borrowing some of the existing LG profile - need to test with your TV though):

  Code:
<Profiles version="1.0">

   <Profile id="LG2018" name="LG (2018)" extendsProfileId="1">
      <Detection>
         <HttpHeaders>
            <friendlyName.dlna.org>LG.*</friendlyName.dlna.org>
         </HttpHeaders>
      </Detection>
      <MediaFormatProfiles>
         <MediaFormatProfile mime-type="video/mp4" name="">AVI</MediaFormatProfile>
      </MediaFormatProfiles>      
      <Transcoding>
         <!-- Transcode DivX (XVid is supported?) -->
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3" aBitrate="384">
            <Matches container="avi" vCodec="mpeg4" vFourCC="div3,div4,div5,divx,dm4v,dx50" />
            <Matches container="avi" vCodec="msmpeg4" vFourCC="div3,div4,div5,divx,dm4v,dx50" />
            <Matches container="avi" vCodec="dvvideo" />
         </Video>
      </Transcoding>
      <ThumbnailsResolution>HD</ThumbnailsResolution>
   </Profile>
</Profiles>
Ensure that the file encoding is UTF-8 and save.

Restart your server and assign this profile to your TV in Serviio Console (pressing Save). See if this helps.
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

chucky

Serviio newbie

Posts: 3

Joined: Mon Dec 03, 2018 10:36 am

Post Tue Dec 04, 2018 3:10 pm

Re: LG UJ6307 msmpeg4v3 video codec tells "Invalid file form

Thank you very much for your reply, it helped. Now TV can play all movies I have randomly tested. I have tested it more thoroughly, and found some other formats (in old small joke-movies, lectures, on-line downloaded news reports streams ...) which shows invalid format also. I will post them just for completness, so you will know what this TV can/can't play. I think that format support will be the same for all LG TV series in 2017/2018 year. I am satisfied with format support now, but if you make those formats to be supported also, even add it to default serviio profile, it would be great :). Thanks again.

  Code:
C:\Windows\system32>"c:\Program Files\Serviio\lib\ffmpeg.exe" -i "c:\FRD\serviio
\nejede\1.avi"
ffmpeg version 3.4.4 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180830
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-libmp3lame --enable-libass --enable-librtmp --enable-fontconfig -
-enable-libfreetype --enable-zlib --enable-libx264 --enable-libspeex --extra-lib
s='-lrtmp -lpolarssl -lws2_32 -lwinmm -lexpat -lfreetype -lfribidi -lz' --arch=x
86_64 --enable-runtime-cpudetect --target-os=mingw64 --cross-prefix=x86_64-w64-m
ingw32- --enable-gpl --pkg-config=pkg-config --bindir='/jenkins/workspace/FFmpeg
 - Win64/target'
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, avi, from 'c:\FRD\serviio\nejede\1.avi':
  Duration: 00:00:34.00, start: 0.000000, bitrate: 299 kb/s
    Stream #0:0: Video: msmpeg4v2 (MP42 / 0x3234504D), yuv420p, 320x240, 228 kb/
s, 10 fps, 10 tbr, 10 tbn, 10 tbc
    Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 22050 Hz, mono, s16p, 64 kb/s



ffmpeg version 3.4.4 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180830
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-libmp3lame --enable-libass --enable-librtmp --enable-fontconfig -
-enable-libfreetype --enable-zlib --enable-libx264 --enable-libspeex --extra-lib
s='-lrtmp -lpolarssl -lws2_32 -lwinmm -lexpat -lfreetype -lfribidi -lz' --arch=x
86_64 --enable-runtime-cpudetect --target-os=mingw64 --cross-prefix=x86_64-w64-m
ingw32- --enable-gpl --pkg-config=pkg-config --bindir='/jenkins/workspace/FFmpeg
 - Win64/target'
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
[mpegvideo @ 0000000000686b20] Estimating duration from bitrate, this may be ina
ccurate
Input #0, mpegvideo, from 'c:\FRD\serviio\nejede\2.mpg':
  Duration: 00:00:00.06, bitrate: 104857 kb/s
    Stream #0:0: Video: mpeg1video, yuv420p(tv), 320x240 [SAR 1:1 DAR 4:3], 1048
57 kb/s, 25 fps, 25 tbr, 1200k tbn, 25 tbc


C:\Windows\system32>"c:\Program Files\Serviio\lib\ffmpeg.exe" -i "c:\FRD\serviio
\nejede\3.mp4"
ffmpeg version 3.4.4 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180830
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-libmp3lame --enable-libass --enable-librtmp --enable-fontconfig -
-enable-libfreetype --enable-zlib --enable-libx264 --enable-libspeex --extra-lib
s='-lrtmp -lpolarssl -lws2_32 -lwinmm -lexpat -lfreetype -lfribidi -lz' --arch=x
86_64 --enable-runtime-cpudetect --target-os=mingw64 --cross-prefix=x86_64-w64-m
ingw32- --enable-gpl --pkg-config=pkg-config --bindir='/jenkins/workspace/FFmpeg
 - Win64/target'
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, flv, from 'c:\FRD\serviio\nejede\3.mp4':
  Metadata:
    timescale       : 1000
    length          : 1502015
    sampletype      : mp4a
    audiochannels   : 2
    videoframerate  : inf
    aacaot          : 2
    avclevel        : 31
    avcprofile      : 66
    frameWidth      : 1024
    frameHeight     : 576
    displayWidth    : 1024
    displayHeight   : 576
    moovposition    : 36
  Duration: 00:25:02.02, start: 0.000000, bitrate: 2106 kb/s
    Stream #0:0: Video: h264 (Baseline), yuv420p(tv, progressive), 1024x576 [SAR
 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc
    Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp


C:\Windows\system32>"c:\Program Files\Serviio\lib\ffmpeg.exe" -i "c:\FRD\serviio
\nejede\4.flv"
ffmpeg version 3.4.4 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20180830
  configuration: --enable-static --disable-shared --disable-ffplay --disable-ffs
erver --enable-libmp3lame --enable-libass --enable-librtmp --enable-fontconfig -
-enable-libfreetype --enable-zlib --enable-libx264 --enable-libspeex --extra-lib
s='-lrtmp -lpolarssl -lws2_32 -lwinmm -lexpat -lfreetype -lfribidi -lz' --arch=x
86_64 --enable-runtime-cpudetect --target-os=mingw64 --cross-prefix=x86_64-w64-m
ingw32- --enable-gpl --pkg-config=pkg-config --bindir='/jenkins/workspace/FFmpeg
 - Win64/target'
  libavutil      55. 78.100 / 55. 78.100
  libavcodec     57.107.100 / 57.107.100
  libavformat    57. 83.100 / 57. 83.100
  libavdevice    57. 10.100 / 57. 10.100
  libavfilter     6.107.100 /  6.107.100
  libswscale      4.  8.100 /  4.  8.100
  libswresample   2.  9.100 /  2.  9.100
  libpostproc    54.  7.100 / 54.  7.100
Input #0, flv, from 'c:\FRD\serviio\nejede\4.flv':
  Metadata:
    length          : 3296026
    timescale       : 1000
    sampletype      : mp4a
    audiochannels   : 2
    videoframerate  : 1000
    aacaot          : 2
    avclevel        : 31
    avcprofile      : 66
    frameWidth      : 1024
    frameHeight     : 576
    displayWidth    : 1024
    displayHeight   : 576
    moovposition    : 28
  Duration: 00:54:56.03, start: 0.000000, bitrate: 2106 kb/s
    Stream #0:0: Audio: aac (LC), 48000 Hz, stereo, fltp
    Stream #0:1: Video: h264 (Baseline), yuv420p(tv, progressive), 1024x576 [SAR
 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Wed Dec 05, 2018 11:54 am

Re: LG UJ6307 msmpeg4v3 video codec tells "Invalid file form

Once again all old codec types. Try this:

  Code:
<Profiles version="1.0">

   <Profile id="LG2018" name="LG (2018)" extendsProfileId="1">
      <Detection>
         <HttpHeaders>
            <friendlyName.dlna.org>LG.*</friendlyName.dlna.org>
         </HttpHeaders>
      </Detection>
      <MediaFormatProfiles>
         <MediaFormatProfile mime-type="video/mp4" name="">AVI</MediaFormatProfile>
      </MediaFormatProfiles>     
      <Transcoding>
         <!-- Transcode older codec types -->
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3" aBitrate="384">
            <Matches container="avi" vCodec="mpeg4" />
            <Matches container="avi" vCodec="msmpeg4" />
            <Matches container="avi" vCodec="dvvideo" />
            <Matches container="*" vCodec="mpeg1video" />
            <Matches container="*" vCodec="h263" />
            <Matches container="*" vCodec="flv" />
         </Video>
      </Transcoding>
      <ThumbnailsResolution>HD</ThumbnailsResolution>
   </Profile>

</Profiles>
I have made the assumptions that other older forms of mpg4 (eg. XVid) and h263 will also require transcoding.
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.
<<

chucky

Serviio newbie

Posts: 3

Joined: Mon Dec 03, 2018 10:36 am

Post Wed Dec 05, 2018 4:16 pm

Re: LG UJ6307 msmpeg4v3 video codec tells "Invalid file form

Thanks again for quick reply. I have tested it, and first two files now works (mpeg1video and MP42), but the other two does not. They has interleaved h264, which TV probably don't support. I don't know whether this interleaved format can be somehow distinguished between normal format, so only interleaved h264 would be transcoded. I solved it cowardly, by modifying profile for transcoding all files that have flv suffix, since those files are videos from archive of public television and so on, and are downloaded in this container with variety of weird codecs. It also has an advantage, when I find video that doesn't play, I can easily change suffix to flv and it gets transcoded automatically. I also modified profile, so it doesn't transcode xvid and h263, as they are supported by TV, and many HD videos uses xvid which cannot be transcoded realtime on common PC's. Here is last best effort profile:
  Code:
<Profiles version="1.0">
   <Profile id="LG2018" name="LG (2018)" extendsProfileId="1">
      <Detection>
         <HttpHeaders>
            <friendlyName.dlna.org>LG.*</friendlyName.dlna.org>
         </HttpHeaders>
      </Detection>
      <MediaFormatProfiles>
         <MediaFormatProfile mime-type="video/mp4" name="">AVI</MediaFormatProfile>
      </MediaFormatProfiles>     
      <Transcoding>
         <!-- Transcode older codec types -->
         <Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="ac3" aBitrate="384">
            <Matches container="avi" vCodec="mpeg4" vFourCC="div3,div4,div5,divx,dm4v,dx50,mp42" />
            <Matches container="avi" vCodec="msmpeg4" />
            <Matches container="avi" vCodec="dvvideo" />
            <Matches container="*" vCodec="mpeg1video" />
            <Matches container="*" vCodec="flv" />
            <Matches container="flv" />
         </Video>
      </Transcoding>
      <ThumbnailsResolution>HD</ThumbnailsResolution>
   </Profile>
</Profiles>

The only thing that would be adjusted, is quality of transcoded video, but I think that altering aBitrate does the job. And CPU utilisation of transcoding can be altered somehow (different output codecs, multithread, ..) ?.
And for future TV's, it would be nice to have set of sample small videos with varios codecs, which user can test and get report what TV really can/can't play (that I think could be done automatically, according to zero play time), and specific profile could be done (even automatically also).
Thanks for support.
<<

DenyAll

DLNA master

Posts: 2257

Joined: Fri Mar 08, 2013 11:16 pm

Location: Adelaide, Australia

Post Thu Dec 06, 2018 10:07 am

Re: LG UJ6307 msmpeg4v3 video codec tells "Invalid file form

Appologies, I wasn't sure whether the TV supported XVid. Anyway good to see you have it under control.

You probably should also apply the FourCC codes to the other matches statement ie:

    <Matches container="avi" vCodec="msmpeg4" vFourCC="div3,div4,div5,divx,dm4v,dx50,mp42" />
Some other points fyi:

  • Interleaved video - not seen that to be in issue. Most likely your TV just doesn't support flv (which you have addressed).
  • "I can easily change suffix to flv and it gets transcoded automatically" - not really. Serviio looks into the file to see what the media really is, not just the suffix of the file.
  • "altering aBitrate does the job" - no, aBitRate modifies the Audio Bitrate not the Video bitrate. The video bitrate for your files will be automatically set by Serviio - you can limit it but you can increase it to get better quality. I suspect any quality issues is more to do with the poor resolution of your typical AVI and your much bigger TV than existed when AVI's were in common use ;-). In Serviio Console, Delivery, Transcoding ensure you have "Produce the best video quality" selected.
  • CPU Utilisation: the only thing you can change is to set the number of CPU cores used for transcoding. You do this in Serviio Console, Delivery, Transcoding. I have mine set to 8 and dont have issues with CPU utilisation (I would think most PC's would transcode AVI's easily).
  • Sample files: viewtopic.php?f=5&t=608
DenyAll
Panasonic Viera FX800A | Panasonic Viera CS610A | Sony PS4 | Sony PS3 | Panasonic DMP-BD79 | Yamaha RX-V500D | iPad | Windows 10 | Serviio 1.10.1 Pro
WinHelper | MediaInfo

Beta Tester, Moderator
Please do not PM me for support as any solution cannot be shared with others.

Return to LG

Who is online

Users browsing this forum: No registered users and 9 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.