Page 1 of 3

Profile for Chaneru

PostPosted: Sun Apr 07, 2013 10:18 pm
by atc98092
I'm wondering if one of you transcoding experts can look at the following text and see if there's an error. This was created by the developer of Chaneru, who is making a DLNA plugin for Roku. He is still having issues with browsing the movie lists, but it will browse my playlists just fine. Since Roku supports limited file types, transcoding seems to be necessary. Roku claims to support MKV h.264 format, but none of mine will play. Using Chaneru I can play MP4 with no issues, so that's what we need to transcode into.

Any suggestions would be helpful. I am not associated with Chaneru in any way, other than someone who has offered to assist him with testing/troubleshooting.

Re: Profile for Chaneru

PostPosted: Tue Apr 09, 2013 10:33 am
by zip
You cannot transcode to mp4 on the fly. Only mpegps/mpegts/asf.

Re: Profile for Chaneru

PostPosted: Tue Apr 09, 2013 12:32 pm
by atc98092
zip wrote:You cannot transcode to mp4 on the fly. Only mpegps/mpegts/asf.


Thanks Zip. I had a feeling. I don't think the Roku boxes will do any of those, but I'll check again.

Re: Profile for Chaneru

PostPosted: Mon Jun 17, 2013 10:21 pm
by chaneru
I'm trying to enable transcoding for Roku using Chaneru by converting h.264 HTTP streams into HLS format. I have this working in a test environment using the Chaneru server. But now I ran into a problem with Serviio. The CHUNKED transfers. The Roku has very limited resources and the programing interface leaves a lot to be desired. I don't have an effective way to repackage the stream without looking at every byte in the block. On Roku this is a tremendous overhead.

I saw a post about turning OFF chunked transfers in the profiles. Has this been implemented ? If so, how ?

Re: Profile for Chaneru

PostPosted: Tue Jun 18, 2013 10:14 am
by zip
It has not been implemented yet.

Re: Profile for Chaneru

PostPosted: Wed Jun 26, 2013 1:46 am
by atc98092
zip wrote:It has not been implemented yet.


Zip, any idea where it fits in your development schedule?

Thanks!

Dan

Re: Profile for Chaneru

PostPosted: Mon Jul 08, 2013 12:11 am
by Fig
Zip:
On a related (but not too related) note, before I read this post I tried to add this profile to profiles.xml. When I tried to use it, serviio would not start. Was it for the reason you stated above, or is there something syntactically wrong? I am running an older version of serviio (0.6.0.1) in a jail on Freenas 8.3. In the attached file, Chaneru is the last one on the list (Profile ID ="21"). All the editing was done in vi.

Thanks

Fig

Re: Profile for Chaneru

PostPosted: Mon Jul 08, 2013 9:11 pm
by zip
It should tell you in the log what the problem is.

Re: Profile for Chaneru

PostPosted: Mon Jul 08, 2013 10:59 pm
by chaneru
The CHUNK transfer coding appears to work. A little slow for my liking.
I have this in the Chaneru profile for video.
  Code:
<Transcoding>
   <Video targetContainer="mpegts" targetVCodec="mpeg2video" targetACodec="aac">
      <Matches container="avi" />
      <Matches container="mpeg" />
   </Video>
</Transcoding>

When a .MPG is selected I get 3 protocols returned. If I select MPEG_TS_SD_NA_ISO-O, I'm able to load the stream and split in to 10 second increments for the HLS format. But on the Roku, I get NO video, the audio plays OK. I have a captured test stream of the same file transcoded with VLC and it plays fine. SO I'm assuming all my frame handling is functioning.

Where does Serviio save the output stream files ? Maybe I can run FFPROBE and see if it is decoding correctly or if I have the profile set correctly.

I had to replace FFMPEG with a newer copy before I got anything.

Re: Profile for Chaneru

PostPosted: Mon Jul 08, 2013 11:28 pm
by chaneru
Found the stream.
Serviio Stream
  Code:
ffprobe version N-54499-g63d7684 Copyright (c) 2007-2013 the FFmpeg developers
  built on Jul  6 2013 10:30:06 with gcc 4.7.3 (GCC)
Input #0, mpegts, from 'Serviio_transcoded.stf':
  Duration: 00:03:48.65, start: 1.410144, bitrate: 1603 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101]: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 212 kb/s

VLC Stream
  Code:
ffprobe version N-54499-g63d7684 Copyright (c) 2007-2013 the FFmpeg developers
  built on Jul  6 2013 10:30:06 with gcc 4.7.3 (GCC)
Input #0, mpegts, from 'VLC_transcoded.mpg':
  Duration: 00:03:48.60, start: 1.430456, bitrate: 469 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 320x240 [SAR 1:1 DAR 4:3], 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x101]: Audio: aac ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 149 kb/s

Question: How do I get h264 to be the transcoded output ?

Re: Profile for Chaneru

PostPosted: Tue Jul 09, 2013 12:05 pm
by zip
HLS and h264 target format is implemented in 1.3.

Re: Profile for Chaneru

PostPosted: Tue Jul 09, 2013 1:17 pm
by chaneru
Would it be possible to get in on the beta, so I can put this to rest ?
Still have other issues, picking the correct protocol, removal of processed segments, making it faster.

Are you going to provide a link to a m3u8 for HLS or just the stream ?

Re: Profile for Chaneru

PostPosted: Wed Jul 10, 2013 7:10 pm
by zip
Added you to the group.

I'll serve m3u8 files. I mostly tested it for the CDS API but it should work via DLNA too.

Re: Profile for Chaneru

PostPosted: Thu Jul 11, 2013 12:09 am
by chaneru
Where do I download it from ?

Re: Profile for Chaneru

PostPosted: Thu Jul 11, 2013 10:42 am
by zip
Go to the Betatesters forum

Re: Profile for Chaneru

PostPosted: Thu Jul 11, 2013 10:20 pm
by chaneru
Using the beta with this profile
<Video targetContainer="mpegts" targetVCodec="h264" targetACodec="aac"> OR
<Video targetContainer="hls" targetVCodec="h264" targetACodec="aac">

Gives protocol = AVC_TS_MP_SD_AAC_MULT5_ISO-0

Produces a h.264 stream BUT is there a way to produce a .M3U8 file to save me the overhead of converting the stream to a m3u8 file inside of the Roku ? Just processing the stream is too slow, lots of rebuffering.

Re: Profile for Chaneru

PostPosted: Thu Jul 11, 2013 11:39 pm
by zip
try

  Code:
<Video targetContainer="applehttp" targetVCodec="h264" targetACodec="aac">

Re: Profile for Chaneru

PostPosted: Sat Jul 13, 2013 5:06 pm
by chaneru
Thanks !
It works, rebuffers a lot, changed max video down to 1500 and much better. I guess this would depend on your network. It wasn't Serviio, transcoding was done, Roku couldn't handle the rate across WIFI. Need to try it on a LAN connection.

No problem with my FLV or AVI files. HD MKV files don't appear to be selected for transcoding ?
Ran a AVI movie from the same Serviio server simultaneously from 4 different Roku boxes (HD, Roku XDS, Roku 2 XS and Roku 3) and all played fine.

Is there any way to throttle ffmpeg besides cutting down on the number of cores ?

Can this profile be improved ?
  Code:
   <Profile id="Roku" name="Chaneru" extendsProfileId="1">
           <Detection>
         <HttpHeaders>
            <User-Agent>(.*ROKU.*)|(.*CHANERU.*)</User-Agent>
         </HttpHeaders>
      </Detection>
      <DeviceDescription>
         <ModelName>Chaneru for Serviio</ModelName>
         <Manufacturer>Chaneru Inc</Manufacturer>
      </DeviceDescription>
      <MediaFormatProfiles>
         <MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_SD_AAC_MULT5</MediaFormatProfile>         
         <MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_SD_MPEG1_L3</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_SD_AC3</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_HD_720p_AAC</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mp4">AVC_MP4_MP_HD_1080i_AAC</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mp4">AVC_MP4_HP_HD_AAC</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mp4">AVC_MP4_LPCM</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mp4">MPEG4_P2_MP4_ASP_AAC</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mp4">MPEG4_P2_MP4_SP_L6_AAC</MediaFormatProfile>
         <MediaFormatProfile mime-type="video/mp4">MPEG4_P2_MP4_NDSD</MediaFormatProfile>         
         <MediaFormatProfile mime-type="audio/mpeg">MP3</MediaFormatProfile>
      </MediaFormatProfiles>
      <Transcoding>
         <Video targetContainer="applehttp" targetVCodec="h264" maxVBitrate="1500" targetACodec="aac">
                     <Matches container="asf" />
                     <Matches container="mpegvideo" />
                     <Matches container="mpeg" />
                     <Matches container="mpegts" />
                     <Matches container="matroska" />
                     <Matches container="avi" />
                     <Matches container="flv" />
                     <Matches container="wtv" />
                     <Matches container="ogg" />
                     <Matches container="3gp" />
                     <Matches container="rtp" />
                     <Matches container="rtsp" />
                     <Matches container="rm" />
               </Video>

         <Audio targetContainer="mp3">
            <Matches container="*" />   <!-- Convert everything to mp3 -->
         </Audio>
      </Transcoding>

      <AutomaticImageRotation>true</AutomaticImageRotation>

   </Profile>

Re: Profile for Chaneru

PostPosted: Sun Jul 14, 2013 2:20 am
by atc98092
chaneru wrote:Thanks !
It works, rebuffers a lot, changed max video down to 1500 and much better. I guess this would depend on your network. It wasn't Serviio, transcoding was done, Roku couldn't handle the rate across WIFI. Need to try it on a LAN connection.



My Roku boxes are wired, so as soon as my wife if finished watching a movie I'll add this code and test it out. If it plays MKV files, I'll do a happy dance. Over 95% of my files are MKV, and there's about 1300 of them. Don't want to have to redo them all!

This may also resolve my problem with the few MP4 videos I have tried that were Blu-Ray rips. The Roku couldn't handle the bitrate.

Re: Profile for Chaneru

PostPosted: Sun Jul 14, 2013 12:00 pm
by zip
chaneru wrote:Is there any way to throttle ffmpeg besides cutting down on the number of cores ?

On the transcoding tab, uncheck Best video quality.