Check out the JW Player Secure Token Tutorial

Posted by Derrick on December 27, 2010 under Video Streaming and Compression | Be the First to Comment

Check out the JW Player 5.2 Secure Token Tutorial. This is a great tutorial for those that need to get familiar with how to implement secure token in JW Player for use with Wowza Media Server. You’ll find a reference for installing Flex as well as a hands-on tutorial to guide you through the secure token set-up in JW Player 5.2

Creating a Secure Token SWF for JW Player 5.2

Posted by Derrick217 on August 15, 2010 under Video Streaming and Compression | Be the First to Comment

Creating a Secure Token .SWF for JW Player 5.2 is a process that many delivering secure streaming video content will need to perform. Wowza Media Server 2 supports Secure Token streaming with JW Player 5.2 for video playback. To get this going you must first set up your Secure Token application and have it running on Wowza Media Server 2.  To create a JW Player 5.2 .SWF file that has Secure Token you must first have Flash Professional CS5 and Flex SDK installed. Here are some notes for installing the Flex SDK.

In this tutorial you’ll learn how to create a .SWF file that has your desired Secure Token value using Flash Professional CS5. (Technically you’ll also be using the Flex SDK as well.).  First make sure you download the source code for JW Player 5.2 from trunk from the link below:

http://developer.longtailvideo.com/trac/browser/trunk/fl5

Note: This tutorial is for compiling with the non-commercial JW Player 5.2 license.

Let’s get started with the tutorial.  In Flash Professional CS5 navigate to the File Pull-down menu and choose New to create a new .FLA document.

When the dialog appears select ActionScript 3.0.

Next, you need to save your new document by navigating to the File Menu and choosing Save.

Name your new .FLA file securetoken_sample.fla and save it to the trunk\fl5\src folder within trunk on your computer.

Within your securetoken_sample.fla file move to the Properties Tab and input com.longtailvideo.jwplayer.player.Player into the Class Text box under Publish.

Now, choose Preferences from the File Pull-down menu.

Click on the ActionScript Category

and select the ActionScript 3.0 Settings button

When the Dialog opens, in the Flex SDK Path Text box enter the path to your Flex SDK.

Next, choose Publish Settings from under the File Pull-down menu.

When the Dialog opens choose the Flash tab and click the Settings button next to the Script Drop-down menu where ActionScript 3.0 appears.

Under the Library path tab, edit the entry for $(FlexSDK)/frameworks/libs/flex.swc to read $(FlexSDK)/frameworks/libs by removing flex.swc.  After you make the changes choose OK.

That’s all you need to do to set things up in your securetoken_sample.fla.

You can now open the RTMPMediaProvider.as file within \trunk\fl5\src\com\longtailvideo\jwplayer\media. Next, you’re going to add your Secure Token value that matches the value you have in your Secure Token application on Wowza Media Server 2.

Once you have your RTMPMediaProvider.as file open scroll down approximately to Line 462 and change the following information in your file:

from this:

_connection.call(“secureTokenResponse”, null, TEA.decrypt(evt.info.secureToken, config.token));

to this:
_connection.call(“secureTokenResponse”, null, TEA.decrypt(evt.info.secureToken, “#sa%m0#p@7″));

If you’re following along with the Wowza Media Systems’ tutorial use the default secure token value that they’ve supplied and change your RTMPMediaProvider.as file

to display this:

_connection.call(“secureTokenResponse”, null, TEA.decrypt(evt.info.secureToken, “#ed%h0#w@1″));

After you apply your settings you can save your RTMPMediaProvider.as file and close it.

Finally, you can go back to your securetoken_sample.fla file to export out a new .SWF.  In Flash Professional CS5 navigate to the File pull-down menu and choose Export Movie from the Export Sub-menu.

Save your file in the src folder you saved your securetoken_sample.fla file in earlier and name the new .SWF file securetoken_sample.swf and choose Save.  Congratulations! Now you can take your new .SWF file with Secure Token and use it for authoring your web pages with JW Player 5.2.

Encoding Flash Linked Downloadable Streaming Videos with Squeeze 6

Posted by Derrick on February 5, 2010 under Video Streaming and Compression | 2 Comments to Read

Encoding Flash Linked Downloadable Streaming videos with Sorenson Media’s Sorenson Squeeze 6 is enhanced.  This tutorial will help you if you’ve upgraded to Sorenson Squeeze 6 or purchased the new version and new Squeeze 6 license.  This workflow in this tutorial is helpful if you need to encode Flash Linked .SWF and .FLV using the Sorenson Media player skins for Download Streaming.    We’ll show you how to create a Flash Linked Downloadable Streaming video that is geared for high broadband users.   The video that we’re encoding is a 720 x 480 DV progressive source with PCM audio and black edges.

Now, let’s get started.

Navigate to the Formats tab located in the Presets section.  Twirl down the Adobe Flash Movie (.swf) templates and navigate to the F8 SWF 360p (4×3) compression preset.  Now copy the preset to create a version you can customize.  Select the preset and Right-click your mouse and select Copy Audience Preset from the Contextual Menu.  You can also select the Creates a Copy button below the presets.  Locate your new preset which should have copy at the end of the Preset name.  Double-click the preset to open it for editing.

Once your preset opens you can adjust your settings but first you need to name your new preset.  For this tutorial name your preset F8_flashlinked_DL_360.  Remember it’s best to make sure you don’t have any spaces in your preset names as they are included in the name of your output file.  Removing spaces mainly helps in the web authoring process.

OK.  Now move to the Codec settings within the Video Tab. You’ll adjust our preset for Downloadable Streaming video for high broadband users.  Keep in mind this is general preset.  You might have to do some additional tweaking to get your desired quality for output.  In your preset the On2 VP6 Pro Codec should be selected along with 2-Pass VBR.  Since the video frame rate is 29.97 frames per second adjust your output frame rate to 15 fps.  By doing this you’re cutting the frame rate in half which will give you smooth motion.  For your target Data Rate adjust it to 600Kbps.  You can keep VP6-E for the Profile with Auto Key Frames Enabled with an Auto Key Frame Threshold of 70.

For Frame Size select 480 x 360.  You can select Maintain Aspect Ratio with Key Frames set to Key Frame Every 90 frames.  So in this case the codec will ad a new key frame at least every 6 seconds since 15 fps is our output frame rate.

Moving onto the Audio settings within the Audio tab.  The Fraunhofer MP3 Codec should be selected.  Adjust your datarate to 40Kbps, Sample Rate set to 22050,  Channels to Stereo and 16 bit for your Sample Size.

Next move to the Player Options Tab.  At this point you’re going to determine the Player/Skin that you want to surround your video for playback on the web.  For this tutorial select the Aluminum Player.

For the Video location you can leave the default value of http:// for the URL/Path and make sure Play Automatically is selected.

A new feature in Squeeze 6 is you can actually attach Filter presets within your compression presets.  However, in this tutorial you want to create a filter that we can apply to other videos as well.  Moving on, navigate to the Filters section on the left hand side within Squeeze 6.

Move down to the Web Generic Filter and select it then click the Creates a Copy button.  Now double-click the Web Generic copy Filter you just created.  When the Filter preset opens change your filter name to SD_Cropping_NoDeinterlace.  You’re giving your Filter this name because you’re making a Filter preset for encoding Progressive SD sources that have blacking edges.

In the Filter preset settings you can check on uncheck items you don’t want to include.  For this Filter uncheck Deinterlace since the source is progressive.  Now check Crop, Brightness, Contrast and Audio Volume.  For Brightness adjust to your setting to 10.  For contrast adjust your setting to 15,  and for Audio Choose Normalize and adjust to 90.  Keep in mind if your source file is really bright you might need to deselect the Contrast and Brightness values.

For cropping off our black edges you’ll multiply the aspect ratio of 4:3 times 8 in which you’ll crop 32 pixels off the left and right and 24 pixels off the top and bottom.  So for the Top input 12 pixels, for Bottom input 12 pixels, for the Left 16 pixels and for the Right input 16 pixels.  Click OK once you’ve made all of your adjustments.

Now onto compressing your video.  Drag your source file into the Batch Tree.  You can also choose Import File from the Input Options and navigate to your desired video and click Open.

Next Select your F8_flashlinked_DL_360 Compression preset and drag it onto your video.  In my case, I’ll drag the F8_flashlinked_DL_360 preset on top of my video called Car02 in the Batch Tree.   Then drag your Filter preset over top of your Compression Preset in the Batch Tree.  Looking at the image above you would drag your Filter preset over top of F8_flashlinked_DL_360 located under Source Settings.  You’ll know your filter is applied when you see Filter : SD_Cropping_NoDeinterlace display within your applied Compression preset.

To select a custom output for you file you can adjust this within the Squeeze Preferences.  Click the Edit Pull-down menu and choose Preferences.

When the dialog opens click the Output Tab and the Browse button to create an output location for all of your encodes.  If you don’t select a custom output for your video Squeeze will put your output videos in the same location as your source.  Click OK on the Preferences tab once you’re done.

Now you’re all set to encode your video.  Click the Squeeze It! button.

Once your video is finished encoding you will have 3 files in your output location.  All files will have the same name except for the file extension.  One file is the .SWF file, another if the Flash .FLV file and the final file is an .HTML file.  You will need these files when you author your video for your Web Page. For details on the authoring process for Flash Linked .SWF and .FLV files view the tutorial Authoring a Web Page for Flash Linked Downloadable Streaming with Dreamweaver CS4. Other tutorials are available on our blog as well.

Encoding HD Video for Flash Downloadable Streaming with Episode Encoder

Posted by Derrick on November 23, 2009 under Video Streaming and Compression | Be the First to Comment

Encoding HD Video for Flash Downloadable Streaming with Episode Encoder is what is taught in this video tutorial. If you need to get familiar with compression using Episode Encoder for Flash, this tutorial will get you started. Make sure you take advantage of the Full Screen View for better viewing.