#41 Patch to enable AVI support on Samsung TV's

Dave P


Minidlna can successfully serve Photos, Music, and MPG video; however, when it attempts to share an AVI file - the TV reports that the format is not supported. Those same AVI files can be served to the TV by other DLNA implementations. I have an "A" series Samsung TV (A750) LCD. I tried the other large Samsung TV patch (for the "C" series) and unfortunately, it completely breaks all minidlna functionality with my model.

Upon investigating - ReadyDLNA/minidlna returns the mine type as video/x-msvideo; however, DLNA servers that worked with my TV set the mime type to video/mpeg – yet kept everything else as though it was an AVI (this turns out to be key). It was definitely an Xvid AVI file.

My first attempt was to address this by overriding the mime type the same way the Samsung MKV fix was already implemented; however, that changed too many things (not just the mime type on the actual file request) and did not end up working with my TV. Instead, I had to implement a similar fix but in a different spot in the source code. See attached file.

Thank you


  • Justin Maggard

    Justin Maggard - 2011-05-24

    Does it work if you use "video/avi" or "video/divx" instead of "video/mpeg"?

  • Dave P

    Dave P - 2011-05-26

    Just tried a few things each with multiple videos:
    1) video/avi (same patch as mpeg just forcing avi) => Fails
    2) video/divx (same patch as mpeg just forcing avi) => Fails
    3) h->reqflags |= FLAG_MIME_AVI_AVI => Fails
    4) video/mpeg (patch from this thread, as a control for comparison) => Works

    1-3 all failed at what appeared to be the same point. Browse to the video, select it, TV says "Content type not supported" Minidlna debug mode shows a HEAD request as the last operation:

    upnphttp.c:772: debug: HTTP REQUEST: HEAD /MediaItems/26.avi HTTP/1.0
    getcontentFeatures.dlna.org: 1
    Host: X.X.X.X:8200

  • Dave P

    Dave P - 2011-05-26

    #2 should say forcing divx (not avi)

  • Justin Maggard

    Justin Maggard - 2011-05-26

    I just posted a new patch against the latest CVS code. All I changed was moving the MIME rename to a different spot, so it's grouped with other similar changes, and it can be properly cached. Can you give it a try? If I can get some verification that this will not break other models, I'll pull this change in.

  • Justin Maggard

    Justin Maggard - 2011-05-26

    I found a late-model Samsung TV here at the office, and this patch breaks AVI playback on it. I've just posted a new patch which should make the MIME change only apply to models using "SamsungWiselinkPro" in the UserAgent header. I believe that is the right fix. Can you try it out?

  • Dave P

    Dave P - 2011-05-27

    Tried the patch and it did not work. Took a closer look and found a bug in the patch (upnphttp.c):
    strcpy(last_file.mime+8, "mpeg"); --- this should be +6 instead of +8

    With that change it does work. THANK YOU!
    I have uploaded a new version of the patch (only chance it the 8 to a 6)

  • Justin Maggard

    Justin Maggard - 2011-05-28

    Thanks for verifying. It's been checked in now, and will be part of the next build.

  • Justin Maggard

    Justin Maggard - 2011-05-28
    • status: open --> closed-fixed
  • Justin Maggard

    Justin Maggard - 2011-07-01
    • status: closed-fixed --> open-fixed
  • Justin Maggard

    Justin Maggard - 2011-07-01

    Hi Dave,

    It looks like this patch breaks FF/REW on Series B TV's. Can you try using upnp-inspector to get the root description from your TV? I was able to locate a Series B to test with, and the only thing I can see that might help tell the two apart is the serial number field. The one here is 20081224DMR, which I assume is the build date of the software. I'm wondering what a Series A shows up as.

  • Dave P

    Dave P - 2011-07-02

    Not sure if this is good or bad; however, upnp-inspector does not list my TV in the list of devices. As a sanity check, I tried it on more than one computer, tried the rediscover devices option, and even tried to use the TV's DLNA function in hopes that it would be found. The IP address of the TV does appear in the upnp inspector global log with a SSDP message of "M-Search for urn:schemas-upnp-org:device:MediaServer:1" I found it curious that the log said MediaServer and not MediaRenderer.

    Also, I tested with TVersity and a recent version of PS3 Media Server (with additional device support): both see the TV right away without doing anything on the TV - unfortunately, neither of those have a means to browse the device capabilities.

    Any other suggestions?

    BTW: Not sure about the Series B TV's - but FF/REW on the Series A is highly unpredictable (some avi's worked and some did not without any obvious reason) even with Samsung's own PC Share Manager for Xvid/AVI videos.


Log in to post a comment.