How it works.

Any thing to do with the transcoding implementation.

How it works.

Postby Jim » Sun Feb 13, 2011 8:33 pm

1. There is a check box in the server's option window to turn the feature on/off.

2. The first time you access a video with the option on, Chaneru will present a browse window to locate the VLC exe. This is normally installed in C:\Program Files (x86)\VideoLAN\VLC\ but you can have it any where.

3. There is a file created with default settings in "My Roku"/VLC_param.txt Since there is no user interface, you can modify this file to try and get optimal speed and quality. The parameters are contained in the first three lines of the file. A line can be duplicated and the original can be commented out with a # in column one. You can have anything after the first three uncommented lines. This allows you to make notes or keep trial parameters.

4. Here is a link to most of the x264 parameters and their usage. http://www.chaneru.com/Roku/HLS/X264_Settings.htm

5. You should be able to run any version of VLC. This does not require the "unreleased nightly build". The current version of VLC is 1.1.7

6. They way it works is when you click on a video, Chaneru will build a runstream using the parameters from step three. Then, exec() VLC and wait till it creates the data stream file in "My Roku/Live Stream". Then it creates a new thread to buffer the data into .ts files and update the index .m3u8 file. The channel request for the movie has been redirected to use the stream's .m3u8 file and this is passed to Roku. The initial 10 .ts files are in 1 second segments to try and get it playing faster. After that, they are in 10 second chunks. When the movie completes or is canceled the interim index and data files are removed. There is also a runstream and diag file for each movie that is played. These files can be used to view what VLC did or didn't do to the file. If you run with the "V" option on the server, it won't remove these files. This could be useful to get a file decoded and save the resultant m3u8 and ts files for another playback.

7. One advantage of transcoding is you can startup a video, watch a couple of minutes, kill it and then tweak the settings and try again till it looks good. This is much better than waiting an hour to find out it still fails. Then you can offline encode it to Roku's liking.

8. The next update will hopefully get the mac version going and have a user interface to control the options.

Jim
Jim
Site Admin
 
Posts: 879
Joined: Thu Jul 15, 2010 12:35 pm

Re: How it works.

Postby mrmambo » Sun Mar 27, 2011 8:29 am

Quick question: how do you turn on the Transcode option in the preferences on the Mac? I'm running 1.4 and that option doesn't appear.

Do I need to add an entry to the options.txt file?

Also, does each option appear on a single line in the options.txt file or all on one line? The directions are a little confusing.

My file looks like this right now:
SMITLVC

Thx!
mrmambo
 
Posts: 11
Joined: Sun Mar 27, 2011 8:27 am

Re: How it works.

Postby Jim » Sun Mar 27, 2011 8:50 am

You need to load the 1.4b beta version.
Go to http://www.chaneru.com "downloads" and that will show you how to load the private BETA channel on the Roku.
Also make sure you download the beta version of the server.
The levels have to match !

After that, there is a checkbox in the server's options:
1. Turns on transcoding. You need VLC installed. I think the current release is 1.1.7
2. Stream, turns on http streaming verses using a file for the transfer between VLC and Chaneru

Stream takes less out of the CPU but I have had some problems with some clips having audio but no video ????? and they work in file mode ????

Let me know how it goes !

The options file is all on a single line.
Jim
Site Admin
 
Posts: 879
Joined: Thu Jul 15, 2010 12:35 pm

Re: How it works.

Postby mrmambo » Sun Mar 27, 2011 11:41 am

Hey, Jim:

Thanks for the suggestions—I didn't realize there were betas of both the server and player; that's why I wasn't seeing the Transcode options.

No luck so far; I'm trying XviD and other AVIs that VLC handles correctly, but no luck with Chaneru. I've tried having both Transcode and Stream checked and then either one or the other. If I choose just Transcode or Transcode & Stream, I get the error, "The format is not supported or the media is corrupt."; if I choose Stream, I get the error, "An unexpected problem (but not server timeout or HTTP problem) has been detected."

I don't see any way to set the VLC app path, but I do have 2 new files: vlc_Capture and VLC_param.txt (which doesn't have a VLC path in it either).

Anything you want to know or see?

-m-
mrmambo
 
Posts: 11
Joined: Sun Mar 27, 2011 8:27 am

Re: How it works.

Postby Jim » Sun Mar 27, 2011 12:09 pm

Go into finder and look at the info. Then try and set the VLC_params.txt to match.
Especially the audio sample rate and the video fps.

Hopefully on the final 1.5, you will have a dialog window with all the options. Then you can save them as moviename.vlp or some such extension or as default for the folder or default in My Roku.

I don't know if you saw it anywhere but Chaneru will take a filename.vlc as a VLC playlist. But you can only have one item. I tried to get him to append the first item but not yet.

The path for VLC is fixed on the mac as the normal Applications folder
Jim
Site Admin
 
Posts: 879
Joined: Thu Jul 15, 2010 12:35 pm

Re: How it works.

Postby mrmambo » Sun Mar 27, 2011 12:51 pm

Jim wrote:Go into finder and look at the info. Then try and set the VLC_params.txt to match.


Sorry—what should I be looking at in the Finder? I don't see an info file, so I thought you meant the video file info or VLC player info/preferences, but the VLC isn't showing any file info within the app.

Do I need to configure the player for each video file? I have lots of different video files from different sources using multiple codecs and settings. I thought your player, esp if it's using VLC, would handle any playback.

And sorry for confusion over transcoding/streaming (I used to work in video compression, so I do understand this for the most part!), but if I choose transcoding, is it converting it and then playing back the file upon conversion completion? And if it's streaming, it's doing it in real-time (maybe slight delay at beginning)? And what happens if I choose both options.

Thx again!
mrmambo
 
Posts: 11
Joined: Sun Mar 27, 2011 8:27 am

Re: How it works.

Postby mrmambo » Sun Mar 27, 2011 1:13 pm

Looking in the finder, I see lots of files within the Live Stream folder; they look like partial video conversion files anywhere from 500-1.2meg in size with the .ts extension.
[3:58pm E: just realized these files are from the V and C options set in options.txt. I forgot!]

Also, the VLC_capture file is 34.6 meg in size.

Is it creating files both for Streaming and Transcode? Sorry, I'm getting so confused by all this.
mrmambo
 
Posts: 11
Joined: Sun Mar 27, 2011 8:27 am

Re: How it works.

Postby Jim » Sun Mar 27, 2011 3:40 pm

The V option will retain all the files associated with the stream, mainly for debuging.
The C option will produce a single file with the h264 encode, mainly for debuging.

It's possible to take the C option (capture) file and play it back in VLC. I don't know why you would want to ?

The V option, you could transcode the whole movie and then save the m3u8 and all the ts files in another folder for playback.
I created a link in Chaneru to a "Live" folder and then I can copy those files into it and play it back. Again, why would you want to ?

The file "capture" and the vlc files, I use to try and debug how VLC is doing.

If you don't have the Stream option selected, VLC will transcode to a file streamXX. The server takes that file as it is filling and produces the HLS m3u8 and ts files for Roku. If you do have the Stream option, the output from VLC will be http streamed to the server who then makes the HLS files.
Jim
Site Admin
 
Posts: 879
Joined: Thu Jul 15, 2010 12:35 pm

Re: How it works.

Postby mrmambo » Sun Mar 27, 2011 4:08 pm

Thanks, Jim--not sure if you saw the note just previous to that one, but I still can't it to work.

I wasn't sure what file info you wanted me to look at in the Finder and compare to the VLC settings. I can't find clear directions on how to set-up VLC to transcode/stream in the easiest fashion, reliably, without ongoing adjustments for me.

Well, actually, I can't get Chaneru to display any video except .MP4s I've created via Handbrake.
mrmambo
 
Posts: 11
Joined: Sun Mar 27, 2011 8:27 am

Re: How it works.

Postby Jim » Sun Mar 27, 2011 6:35 pm

Ok, do you have the transcode checkbox set in the server's options ?

That will cause ALL videos to be sent to VLC. There is a timing issue, if VLC does not startup and doesn't produce enough data to generate the first TS file, Chaneru will bypass that method and send the video file directly to Roku. I think I have the timeout set for 30 seconds, which seems long. But if the first TS file is generated, the m3u8 file will be created and a redirect from the original video to the stream m3u8 file will be sent to Chaneru.

Can you tell if VLC started ? There should be a VLC debug file created with some info in it.
If it's functioning, you should see the TS files being moved on the server window.
It's more difficult to tell on the mac. On windows, an actual VLC player pops up because of the way I have implemented it.

One thing, it takes a long time for the video to start but I'm working on modifying the code to force Roku to start playing faster. On the testing I've done, I'm able to get Roku to start after the 4th TS file is passed to him. The way it is now, sometimes he waits till the 18th TS is passed. These TS files have a duration of 10 seconds playback except the first, it is 1 sec. The reason it's one second is to quickly tell if things are working and get the transfers to Roku going. These one second and ten second TS files, is not elapsed time for creation. It's actual display time.
Jim
Site Admin
 
Posts: 879
Joined: Thu Jul 15, 2010 12:35 pm

Next

Return to Transcoding

Who is online

Users browsing this forum: No registered users and 1 guest

cron