Page 1 of 1

Is this code right to transcoding all .mkv to .ts files?

PostPosted: Sun Oct 13, 2019 1:32 pm
by colemanlee
Hi,
I have a television with an unknow internet TV box, but there is no sound(can see video) when I play Matroska files, and there is no video(can hear audio) when I play RMVB files via its built-in UPnP DLNA function.
These Matroska and RMVB videos can play well on my personal computer.
I think the reason is my TV box does not support Matroska and RMVB videos perfectly. Maybe I need transcoding so that I can watch Matroska videos on TV.
Is this code right to transcoding all Matroska to transport stream files in profiles.xml?
  Code:
          <Video targetContainer="mpegts">
              <Matches container="matroska">
          </Video>

Where should I put these code into profiles.xml? Could any friend gice me a sample?

Re: Is this code right to transcoding all .mkv to .ts files?

PostPosted: Sun Oct 13, 2019 9:25 pm
by atc98092
colemanlee wrote:Hi,
I have a television with an unknow internet TV box, but there is no sound(can see video) when I play Matroska files, and there is no video(can hear audio) when I play RMVB files via its built-in UPnP DLNA function.
These Matroska and RMVB videos can play well on my personal computer.
I think the reason is my TV box does not support Matroska and RMVB videos perfectly. Maybe I need transcoding so that I can watch Matroska videos on TV.
Is this code right to transcoding all Matroska to transport stream files in profiles.xml?
  Code:
          <Video targetContainer="mpegts">
              <Matches container="matroska">
          </Video>

Where should I put these code into profiles.xml? Could any friend gice me a sample?


That's an accurate match line, but this statement will not transcode anything. It will transmux the MKV media into the TS container, but will leave the audio and video intact. Since your video is playing, we can leave that alone and just transcode the audio. This is also far less CPU intensive, so doesn't make the computer work hard at all. Just change your first line to:
  Code:
<Video targetContainer="mpegts" targetACodec="ac3" />


If you'd like to see if the audio is improved with a higher bitrate, you can use:
  Code:
<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="512">


Where to put it? I suggest creating a user-profiles.xml file and use it, rather than modifying an existing profile. Any time Serviio is updated, it replaces the profiles.xml file, so your changes are lost. But updates will not alter a user-profiles.xml file, so your changes are safe.

Re: Is this code right to transcoding all .mkv to .ts files?

PostPosted: Mon Oct 14, 2019 3:33 pm
by colemanlee
atc98092 wrote:That's an accurate match line, but this statement will not transcode anything. It will transmux the MKV media into the TS container, but will leave the audio and video intact. Since your video is playing, we can leave that alone and just transcode the audio. This is also far less CPU intensive, so doesn't make the computer work hard at all. Just change your first line to:
  Code:
<Video targetContainer="mpegts" targetACodec="ac3" />


If you'd like to see if the audio is improved with a higher bitrate, you can use:
  Code:
<Video targetContainer="mpegts" targetACodec="ac3" aBitrate="512">


Where to put it? I suggest creating a user-profiles.xml file and use it, rather than modifying an existing profile. Any time Serviio is updated, it replaces the profiles.xml file, so your changes are lost. But updates will not alter a user-profiles.xml file, so your changes are safe.

Hi,
Thank you, I did it with your help. Here is the content of my user-profiles.xml:
  Code:
<?xml version="1.0" encoding="UTF-8"?>
<Profiles version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.serviio.org/xsd/profiles/v/2.0/Profiles.xsd">

<Profile id="Xiaomi" name="Xiaomi MediaRenderer" extendsProfileId="1">
<Detection>
   <UPnPSearch>
      <FriendlyName>.*107.*</FriendlyName>
   </UPnPSearch>
</Detection>
<Transcoding>   
   <Video targetContainer="mpegts" targetACodec="aac">
      <Matches container="matroska"/>
   </Video>
</Transcoding>
</Profile>

</Profiles>

But I have some questions, I sincerely hope you'll help me:
  1. I can't play fast forward with my remote control when the Matroska video is transcoding. The progress bar is always 100% but time increases in real-time.
    --- Does it means the fast forward is unavailable when transcoding?
  2. Is it possible that execute transcoding only when the aCodec=AC-3 in Matroska video? My device could decode the Matroska video with aac aCodec, but Serviio server still transcodes it, it is unnecessary.
    ---It tried these codes but failed(some videos play muted, some videos can not play and show "unknown error"):
      Code:
    <Video targetContainer="mpegts" targetACodec="aac">
       <Matches container="matroska" aCodec="ac3"/>
    </Video>

Re: Is this code right to transcoding all .mkv to .ts files?

PostPosted: Tue Oct 15, 2019 3:07 am
by atc98092
1. Yes, with a few exceptions trick play (FF/rewind/resume) is not available when transcoding. HLS transcoding allows trick play on most devices, but not all. And some players can perform trick play regardless of transcoding. But with most TVs, the answer is it's not available.

2. Can't explain why that line doesn't work, as it's a match to many others in the various profile. Again, it sounds like something specific to your TV.