If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

Force transcode of MP4 to Hisense TV

redfourcatredfourcat Posts: 7Members ✭✭
Hi,
 
Apologies if the answer to this is somewhere on the forum already. I have a Hisense TV which can't play MP4 files so I tried to set up a DLNA profile that will transcode everything to a format it understands. I tried setting a single transcode target with no direct play profiles and I added a container profile remap but the TV continues to say the MP4 files format is not recognised. It plays AVIs fine. Can anyone give any tips? Here's my profile so far.
 
<?xml version="1.0" encoding="utf-8"?>
<Client name="Hisense SmartTV">
  <Identification>
    <Header name="USER-AGENT" substring="IPI/1.0 UPnP/1.0 DLNADOC/1.50"/>
  </Identification>
  <TranscodeTargets>
    <VideoProfile container="avi" codec="h264" audioCodec="ac3" context="static" />
  </TranscodeTargets>
  <DirectPlayProfiles />
  <CodecProfiles>
    <VideoCodec name="h264">
      <Limitations>
        <UpperBound name="video.width" value="1920" />
        <UpperBound name="video.height" value="1080" />
        <UpperBound name="video.frameRate" value="30" />
      </Limitations>
    </VideoCodec>
    <VideoAudioCodec name="ac3">
      <Limitations>
        <UpperBound name="audio.channels" value="2" />
      </Limitations>
    </VideoAudioCodec>    
  </CodecProfiles>
  <ContainerProfiles>
    <VideoContainer name="mp4" remap="avi" />
  </ContainerProfiles>
</Client>
 
Thanks.

Comments

  • jmckeejmckee Posts: 4,970Members, Plex Pass, Plex Ninja Plex Ninja

    First thing I would do is check your DLNA log to make sure your profile is being read and used.  That header identifier looks extremely generic and might not work too well.  If you want to post it I can take a quick look and see if there is anything in there you may have missed.

    Also make sure that your profile is called "Hisense SmartTV.xml"  Whatever the client name you have must also match the file name.

    I would recommend the following modifications:

    <?xml version="1.0" encoding="utf-8"?>
    <Client name="Hisense SmartTV">
      <Identification>
        <Header name="USER-AGENT" substring="IPI/1.0 UPnP/1.0 DLNADOC/1.50"/>
      </Identification>
      <TranscodeTargets>
        <VideoProfile container="avi" codec="h264" audioCodec="ac3" />
      </TranscodeTargets>
      <DirectPlayProfiles>
          <VideoProfile container="avi" codec="h264" audioCodec="ac3" />
      </DirectPlayProfiles>
      <CodecProfiles>
        <VideoCodec name="h264">
          <Limitations>
            <UpperBound name="video.width" value="1920" />
            <UpperBound name="video.height" value="1080" />
            <UpperBound name="video.frameRate" value="30" />
          </Limitations>
        </VideoCodec>
        <VideoAudioCodec name="ac3">
          <Limitations>
            <UpperBound name="audio.channels" value="2" />
          </Limitations>
        </VideoAudioCodec>   
      </CodecProfiles>
    </Client>

    I removed the container profiles section as there is no remap function like you tried to do.  The closest would be a mimeType change but that wouldn't be for trying to transcode.

    I removed the static from the transcode target as that will not make a difference unless you're trying different protocols.

    Lastly, I added a directplay profile for the type of file you are transcoding to.  Simple reason, if you're transcoding to a playable file type, there is no reason to transcode files that already are that format.  If your file hits the limitations in the bottom, they will still be transcoded.

  • redfourcatredfourcat Posts: 7Members ✭✭
    Thanks for the tips. My profile is being picked up.
     
    Jul 26, 2014 12:26:55:826 [4796] DEBUG - Mapped client to profile Hisense SmartTV using header USER-AGENT: IPI/1.0 UPnP/1.0 DLNADOC/1.50
     
    I know that the identification it's using looks pretty generic but there isn't much else in the header to go off.
     
    Jul 26, 2014 12:34:36:320 [4256] DEBUG - Mapped client to generic profile: HOST: 192.168.1.105:32469; DATE: Sat, 26 Jul 2014 04:34:47 GMT; CONNECTION: Keep-Alive; USER-AGENT: IPI/1.0 UPnP/1.0 DLNADOC/1.50; transferMode.dlna.org: Streaming; RANGE: bytes=367280128-367284223
     
    For testing I have one MP4 (H264,AAC) and two AVIs (MPEG3,MP3 and H264,AC3). The changes suggested so far list them all as AVIs however playing the two that are not H264,AC3 shows 'Video codec not supported/Audio codec not supported'. The H264,AC3 AVI is working so I assume the Direct Play profile is working.
     
    Putting the context="static" back allows both the AVIs to play but then the MP4 shows 'File not supported'. I removed the context attribute again and tried <VideoProfile container="avi" codec="mpeg4" audioCodec="mp3" /> and this time the MPEG3,MP3 AVI played fine but the H264,AC3 AVI and MP4 would not. I also tried <VideoProfile container="mpegts" codec="h264" audioCodec="ac3" /> but it didn't like that either.
     
    Some other info: Both the MPEG3,MP3 and H264,AC3 AVIs work fine under the generic profile so I've put them in as direct play. I converted the MP4 to an MKV (H264, AAC) which works fine under generic too but I don't know whether it was getting transcoded or not.
     
    I'm thinking that I perhaps I need to set some VideoEncodeFlags but I'm not sure what. Is there a reference for these somewhere?
     
    Cheers.
  • jmckeejmckee Posts: 4,970Members, Plex Pass, Plex Ninja Plex Ninja
    If the mkv was playing under the generic profile, it was direct playing as the generic profile has no transcoding.

    The video encode flags don't have any real documentation, from what I've learned its mostly one or two settings like cabac or xopts. Anything more than that may or may not work due to the amount of other options already fed to the transcoder by plex.

    Streaming does send different headers than directplay, so some devices will not stream all the same formats they can directplay. If you have a tv manual, or on the manufactures website, you may be able to get a list.

    Another basic format you could try would be:
    <videoprofile container="mpeg" codec="mpeg2video" audioCodec="mp2" />
  • redfourcatredfourcat Posts: 7Members ✭✭

    I went through a whole bunch of different format files and came up with a set of direct play profiles (avi, mkv, flv, mpg, mpeg). The mpeg profile for transcoding works well for mov and asf/wmv2 but still mp4 won't transcode. I'm pretty close though so maybe I'll just convert all my mp4 to something else.

    One strange thing too. I have an mkv file with fps = 24p which plays direct but if I put in a frame rate upper bound of 30 it doesn't play.

    Thanks again for the help. Here is the almost fully working profile.

    <?xml version="1.0" encoding="utf-8"?>
    <Client name="Hisense SmartTV">
      <Identification>
        <Header name="USER-AGENT" substring="IPI/1.0 UPnP/1.0 DLNADOC/1.50"/>
      </Identification>
      <TranscodeTargets>
        <VideoProfile container="mpeg" codec="mpeg2video" audioCodec="mp2" />
      </TranscodeTargets>
      <DirectPlayProfiles>
        <VideoProfile container="avi" codec="h264,mpeg4" audioCodec="ac3,mp3" />
        <VideoProfile container="mkv" codec="h264" audioCodec="aac" />
        <VideoProfile container="flv" codec="h264,vp6f" audioCodec="aac,mp3" />
        <VideoProfile container="mpeg" codec="mpeg1video" audioCodec="mp2" />
        <VideoProfile container="mpg" codec="mpeg1video" audioCodec="mp2" />
      </DirectPlayProfiles>
      <CodecProfiles>
        <VideoCodec name="*">
          <Limitations>
            <UpperBound name="video.width" value="1920" />
            <UpperBound name="video.height" value="1080" />
            <!--<UpperBound name="video.frameRate" value="30" />-->
          </Limitations>
        </VideoCodec>
        <VideoAudioCodec name="*">
          <Limitations>
            <UpperBound name="audio.channels" value="6" />
          </Limitations>
        </VideoAudioCodec>    
      </CodecProfiles>  
    </Client>
  • MichaelLombardMichaelLombard Posts: 1Members

    Have you had any luck in finishing this profile .. ?

  • redfourcatredfourcat Posts: 7Members ✭✭
    edited May 10

    DELETED POST

Sign In or Register to comment.