Transcoding

Help
2010-01-16
2013-05-30
  • pete bateman
    pete bateman
    2010-01-16

    Hi all,

    I think I understand how the transcoding config works however I'm confused about file names. My TV will not attempt to play a file from my server because of the file extension, so I can't test if the actual transcoding works. How do I report the source file names with the target extension so that the device I'm transcoding to knows it can attempt to open it?

    Cheers

    Pete

     
  • Jin
    Jin
    2010-01-16

    I am not sure if I understand you correctly.

    Your TV does not like what? The filename extension in the URL? Otherwise, when streaming via UPnP, your player does not even have to know the actual file name, it only knows what the UPnP server is telling it via UPnP.

    Or are you saying, that the mime type is not recognized and that you need to add a custom extension to mime type mapping in order to trigger transcoding?

    Sorry, but I do not yet understand your problem, could you please describe what exactly you were trying to do, what kind of files you want to transcode and so on. What TV is it btw?

     
  • pete bateman
    pete bateman
    2010-01-21

    I have a file test.mpg. My TV does not support mpegs. So I want to transcode the file test.mpg when it is requested from Mediatomb by the TV. When I list the files available from Mediatomb on the TV test.mpg is explicitly listed as .mpg, so the TV clearly does know the full filenames.  Transcoding starts when an HTTP connection is made to Mediatomb requesting the file test.mpg, however the TV is never going to attempt that connection because it knows it doesn't support .mpg files. I want Mediatomb to tell the TV that test.mpg is test.avi so that the TV will make the connection thus triggering transcoding.

     
  • Jin
    Jin
    2010-01-21

    Well, first something very important: you can not transcode to AVI on the fly. The reason for that is quite simply, actually it lies in the AVI container format itself - it has it's index at the very end, so usually when you attempt to play a local AVI file your player will issue an HTTP range request and look for the AVI index at the end of the file, then it will seek back to the beginning and start playing it.

    Since transcoding is "on the fly streaming" you can not seek anywhere - and this is why you can not transcode to AVI on the fly.

    I am very surprised, that your device does not support MPEG2, this is the most common and most supported format… what TV is it?

    What video codecs/formats does your TV support? If you list them all we could maybe think of something that would suit you; but generally speaking - yes, you can setup a transcoding profile in MediaTomb which would  on the fly transcode your MPEG files to something that your TV likes.

     
  • pete bateman
    pete bateman
    2010-02-23

    Hi,

    Thanks for your help so far, but I can't help but think you are missing the basic issue here. You may well be right about AVI files, but that was just an example, Transcoding is not even attempted by mediatomb, because the TV knows the file extensions. If you ask it to play test.mpg it won't even attempt to access the file because it knows its an MPG. If it does not attempt to access the file then on the fly transcoding will never even attempt to fly. You have to trick the tv into believing the file is something it likes BEFORE it will attempt to use it. This requires changing the reported file extensions for that particular device.

    And please don't confidently state that the TV doesn't know file extensions because I'm sitting here looking at it, and it definitely does.

    Cheers

    Pete

     
  • Jin
    Jin
    2010-02-24

    And please don't confidently state that the TV doesn't know file extensions because I'm sitting here looking at it, and it definitely does.

    You did not give any detailed answers to my post #2 and now you are complaining that I do not believe, that the problem is in the file names.

    A very easy way would be - do not give your file any extension at all, just make sure the mime type is set correctly (you can manually set it in the web UI). So how does it behave now?

    Change the mimetype from video/mpeg to video/x-msvideo and make sure to rebrowse that container on the TV - still mpg or is it avi now? I'm saying what I am saying because I know quite a lot about UPnP, I did not say that you are wrong, I've seen various firmwares which did look at the extension in the url if it was there  - but I did ask you some questions in post #2 which you did not really answer.

     
  • Erik
    Erik
    2011-05-19

    I know this is an old post but as I read it I think I know what the problem is as I until recently had the same ideas as baldyman.

    I just got a Samsung Bluray with Allshare (~DLNA) UPnP. I couldn't play some mpgs and thought it was the file extensions that was the issue until I learned about mime types.
    The Samsung Bluray want all video mime types to be video/mpeg (regardless if its avi, mkv etc…). The .mpg-files that I couldn't play (the Bluray didn't even want to try playing it (as baldyman explained)) had mime type video/mp2p. I fixed this by simply remapping this mime type in the mediatomb config file.

    I think something like

    <treat mimetype="video/transcode" as="mpg"/>
    

    did the trick.

    BR, Erik

     
  • IceKey
    IceKey
    2013-02-21

    And once again, ~2 years later, i try to revive this thread.^^
    I've got a similar issue.
    My UPnP-ready-Device (Telestar Diginova HD 10+) is only able to play - or, and there sits the worm - only able to display mpeg typed media in his internal menu… I tested through all popular formats and codecs:
    - Displays only .mpg (sow MIME-Type "video/mpeg")
    - Plays only MPEG2-Video in combi with MP2-Audio
    Btw, that is mentioned nowhere! There exists no real documentation for this device…
    Anyway, with this results i set up a MediaTomb-Server and added some transcoding-mappings to recieve the only compatible output combi:
    - Mime-type: video/mpeg
    - MPEG2-Video
    - MP2-Audio
    - and i also instructed the transcoder to stream the output in some MPEG2-Container (but i won't come so far…)
    Because, none of the mapped files are displayed! Not even the .mpg files that have been displayed (but not played, because of wrong codec) before! I checked the MIME-Type of these .mpg-files, which is (as if there ever was a doupt) "video/mpeg". So in theory, for these .mpg-files, nothing had changed?!
    Maybe one of you guys has an idea what is going on there…
    Greetz
    Mike

     
  • IceKey
    IceKey
    2013-02-21

    Little update:
    I changed the mimetype from a matroska-file manially in the WebInterface to video/mpeg.
    Tadaa - it is displayed by my device (of course not played).
    So only when i try to map any type of content through the transcoder to video/mpeg it doesn't seem to work anymore…

     
  • Erik
    Erik
    2013-02-21

    If you get the transcoding working, I think the TV would only see an mpeg movie. Mediatomb should handle the "transformation".
    I'm sad to say that I've never gotten it to work myself and when I recently did an upgrade of my server, I switched to Serviio.