INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

Flash with high quality video (MP4 with H264 video and AAC audio)

Forum Index -> How to's -> User guides Printer-friendly version
Goto page 1, 2  Next
Reply to topic
Author Message
Baldrick
Administrator


Joined: 09 Aug 2000
Location: Sweden

Post Posted: Aug 13, 2008 18:23 Posts Comp View users profile Send private message Reply with quote

This very basic guide will show you the steps how to convert any video to high quality flash video, MP4 with H264 and AAC audio, and put it on your website with a flash video player. Using free software only.



Software
Xvid4PSP (Free)
JW FLV Media Player or Flowplayer(free)



Preparation

You can check how it will look like in the example below here, if it wont work be sure to update the Adobe Flash Player here.
If you are going to convert from a commercial DVD then rip it to the HDD using DVDFab Decrypter first.
Install Xvid4PSP.


Convert
Open the source video in Xvid4PSP. Click on Open to open most video formats and DVD to open a DVD or DVD folder on your HDD.
Choose MP4 under Format.


Choose x264 Q16 Turbo under Video Encoding. Click on the E to change advanced settings like the video bitrate that decides the output file size. Choose 1-pass(or 2-pass for even better quality but takes longer to convert) under Encoding mode and you can set the exact bitrate and get the desired output files(see the Output file size: in the screenshot below). Higher bitrate = higher quality =bigger output file size. If you don't need an exact file size then use Constant Quality / Quantizer mode.
Choose AAC-HE CBR 64kbit under Audio Encoding. Click on the E to change advanced settings like the audio bitrate that decides the output file size.


Choose Video->Resolution/Aspect ratio to change the resolution.
Set the Output resolution, higher resolution usually requires that you must use higher bitrate=bigger output file size.
Check so the output aspect ratio is similiar to input aspect ratio or it will look stretched.


Hit Convert.



Put the video on your site
Download JW FLV Player and extract the player.swf and swfobject.js and put on your site with the mp4 video you created above.
Add this code to your webpage that should display the video:
Code:
<p id='preview'>Error - You must you upgrade your flash player to see this video</p>
<script type='text/javascript' src='swfobject.js'>
</script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','player','640','360','9.0.115');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=test.mp4');
s1.write('preview');
</script>

Replace test.mp4 with the filename of your video.
Replace the '640','360' with the resolution/frame size of your video.


Example
Code:
<p id='preview'><a href="http://www.adobe.com/go/getflashplayer" target="_blank"><u>Error- You must upgrade your Adobe Flash Player to see this video, upgrade here</u></a>.</p>
<script type='text/javascript' src='http://forum.videohelp.com/images/guides/355179/swfobject.js'>
</script>
<script type='text/javascript'>var s1 = new SWFObject('http://forum.videohelp.com/images/guides/355179/player.swf','player','672','376','9.0.115');
s1.addParam('allowfullscreen','true');s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=http://forum.videohelp.com/images/guides/355179/test.mp4&stretching=fill&image=flash.jpg');
s1.write('preview');
</script>

Error - You must upgrade your Adobe Flash Player to see this video, upgrade here.




Problems
Add an image to the flash player by adding the &image=flash.jpg to the flashvar setting,
Code:
s1.addParam('flashvars','file=test.mp4&stretching=fill&image=flash.jpg')


If you can't see the video in your web browser be sure to upgrade to latest Adobe Flash player(requires at least Flash Player version 9.0.115 or higher).

If you don't want any black borders in the player you can add &stretching=fill in the url to your mp4 file like http://www.site.com/folder/test.mp4&stretching=fill

If you put the player and video in different folders then add the complete url to to the code like,
Code:
<p id='preview'>Error - You must upgrade your flash player to see this video</p>
<script type='text/javascript' src='http://www.site.com/folder/swfobjects.js'>
</script>
<script type='text/javascript'>
var s1 = new SWFObject('http://www.site.com/folder/player.swf','player','640','360','9.0.115');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=http://www.site.com/folder/test.mp4');
s1.write('preview');
</script>


If Xvid4PSP wont work you can use other all-in-one h264 converters like HandBrake, StaxRip, Ripbot264, avidemux.












Last edited by Baldrick on Oct 01, 2009 10:02, edited 69 times in total


jmaytum
Member


Joined: 24 Apr 2002

Post Posted: Aug 21, 2008 01:38 Posts View users profile Send private message Reply with quote

How does this application compare to ON2's very awesome encoder?

Thanks in advance!
_________________
Julian Maytum


Baldrick
Administrator


Joined: 09 Aug 2000
Location: Sweden

Post Posted: Aug 21, 2008 02:04 Posts Comp View users profile Send private message Reply with quote

I haven't compared the x264 converter with the on2 converter but I guess you should be able get similiar quality if you know how to configure correctly. I just want to show a free alternative to on2 and flash professional.

jmaytum
Member


Joined: 24 Apr 2002

Post Posted: Aug 25, 2008 22:11 Posts View users profile Send private message Reply with quote

I'm giving it a go.. thanks for the great guide.. I will let you know how I make out smile.gif I would like to use this to replace ON2 hopefully and also to use it to encode video files for my Samsung Instinct!

Thanks again for the guide!
_________________
Julian Maytum


maxamillion
Member


Joined: 27 Aug 2008
Location: United States

Post Posted: Aug 27, 2008 03:39 Posts Comp View users profile Send private message Reply with quote

I will try this as well in the next couple of days and report back
_________________
Bringing your photos and memories to life
www.YourHighlightFilm.com


dsl225
Member


Joined: 28 Aug 2008
Location: Switzerland

Post Posted: Aug 28, 2008 14:27 Posts Comp View users profile Send private message Reply with quote

Excellent guide, thx!

One point is not clear for the code.
You mention:
Quote:
Replace the '640','360' with the resolution/frame size of your video.


After the size, what is the third figure standing for - resolution?
Sometimes you mention '9' and others '0'

If it's standing for the resolution how does this work?

thx


Soopafresh
Craptastic


Joined: 01 Jan 2004
Location: United States

Post Posted: Aug 28, 2008 14:48 Posts Comp View users profile Send private message Reply with quote

This is a great guide, Baldrick! biggrin.gif

Baldrick
Administrator


Joined: 09 Aug 2000
Location: Sweden

Post Posted: Aug 28, 2008 14:56 Posts Comp View users profile Send private message Reply with quote

dsl225 wrote:
Excellent guide, thx!

One point is not clear for the code.
You mention:
Quote:
Replace the '640','360' with the resolution/frame size of your video.


After the size, what is the third figure standing for - resolution?
Sometimes you mention '9' and others '0'

If it's standing for the resolution how does this work?

thx

It should be 9. It is the required flash player version. You can add 9.0.115 so you are sure the user has upgraded flash with h264 support (and add a link to the upgrade, see the example above)

See http://blog.deconcept.com/swfobject/


maxamillion
Member


Joined: 27 Aug 2008
Location: United States

Post Posted: Aug 31, 2008 00:17 Posts Comp View users profile Send private message Reply with quote

why not use 2-pass encoding if you have the extra time = better quality video
this method works pretty well if your converting a shorter video, but not so good if your video is anything over a couple of minutes long


Captain Satellite
Space Cowboy


Joined: 03 Feb 2003
Location: The Twilight Zone

Post Posted: Aug 31, 2008 06:43 Posts Comp View users profile Send private message Reply with quote

Baldrick, What is this 'XviD4PSP 5.0 source code 28.02.2008' file and do I need to download and install it to use Xvid4PSP?

Baldrick
Administrator


Joined: 09 Aug 2000
Location: Sweden

Post Posted: Aug 31, 2008 06:50 Posts Comp View users profile Send private message Reply with quote

maxamillion: Added that you can use 2-pass also.

captain satellite: Nope, you don't need the source code. Just http://download.videohelp.com/download/XviD4PSP_5034_full.exe smile.gif.


Captain Satellite
Space Cowboy


Joined: 03 Feb 2003
Location: The Twilight Zone

Post Posted: Aug 31, 2008 06:57 Posts Comp View users profile Send private message Reply with quote

Thanks!

Captain Satellite
Space Cowboy


Joined: 03 Feb 2003
Location: The Twilight Zone

Post Posted: Sep 19, 2008 18:56 Posts Comp View users profile Send private message Reply with quote

Baldrick, What would be the best settings for the ultimate quality video if time was not a concern, only best quality. Those settings worked great, just wondering if it could be even better.

Thanks for a great, simple to use guide!


waefwaeefwaefw
Member


Joined: 20 Feb 2008
Location: United States

Post Posted: Sep 30, 2008 01:17 Posts Comp View users profile Send private message Reply with quote

Hey bro' How can I do this through Flash CS3?
I want to place a high quality video in my flash site.

Can you show me PLEASE??
Thanks.


FulciLives
UNDEAD OVERLORD


Joined: 09 May 2003
Location: Pittsburgh, PA in the USA

Post Posted: Sep 30, 2008 01:23 Posts Comp View users profile Send private message Reply with quote

What a great guide !!!

Very kewl !!!

I'll have to try it smile.gif

- John "FulciLives" Coleman
_________________
"The eyes are the first thing that you have to destroy ... because they have seen too many bad things" - Lucio Fulci
EXPLORE THE FILMS OF LUCIO FULCI - THE MAESTRO OF GORE


greymalkin
Member


Joined: 19 Oct 2004
Location: United States

Post Posted: Nov 14, 2008 14:07 Posts Comp View users profile Send private message Reply with quote

I love the JW FLV player..I use it on my website with the playlist feature so people can view movies, images, and songs all from the same playlist.

assman24
Member


Joined: 08 Aug 2008
Location: United States

Post Posted: Nov 29, 2008 14:06 Posts View users profile Send private message Reply with quote

Thanks Rick, this guide is great.

Is there a way to do batch converts? I have like 100+ videos that I want to convert.


Thanks,
Adam


TexasEx
Member


Joined: 02 Oct 2008
Location: Houston, TX

Post Posted: Dec 11, 2008 14:58 Posts View users profile Send private message Reply with quote

I followed the instructions, but my video won't play. What did I do wrong? Is there a file size limit or might I have an issue with my host?

My video can be found on www.busttheclock.com


aedipuss
aBigMeanie


Joined: 25 Oct 2005
Location: 666th portal

Post Posted: Dec 11, 2008 15:35 Posts Comp View users profile Send private message Reply with quote

TexasEx wrote:
I followed the instructions, but my video won't play. What did I do wrong? Is there a file size limit or might I have an issue with my host?

My video can be found on www.busttheclock.com


if this is you index page then are all the required files in your root directory? both the player files and the video?
_________________
--
"a lot of people are better dead" - prisoner KSC2-303


TexasEx
Member


Joined: 02 Oct 2008
Location: Houston, TX

Post Posted: Dec 11, 2008 15:39 Posts View users profile Send private message Reply with quote

aedipuss wrote:
TexasEx wrote:
I followed the instructions, but my video won't play. What did I do wrong? Is there a file size limit or might I have an issue with my host?

My video can be found on www.busttheclock.com


if this is you index page then are all the required files in your root directory? both the player files and the video?


Yes, all the files are in one folder. I have several domains under my host and created folders for each one to keep them straight.


aedipuss
aBigMeanie


Joined: 25 Oct 2005
Location: 666th portal

Post Posted: Dec 11, 2008 15:47 Posts Comp View users profile Send private message Reply with quote

if the files are in a different folder than the html page then you need to use the url of the files. as in

[edit] i can't seem to type in the text without it thinking it's a video to play

anyway the files need full url addresses - 'http://www.yoursite.com/folder/player.swf','player','672','480','9.0.115'
_________________
--
"a lot of people are better dead" - prisoner KSC2-303


Baldrick
Administrator


Joined: 09 Aug 2000
Location: Sweden

Post Posted: Dec 11, 2008 15:58 Posts Comp View users profile Send private message Reply with quote

aedipuss: Use the [code][/code]-bbcode for html in this forum section.

aedipuss
aBigMeanie


Joined: 25 Oct 2005
Location: 666th portal

Post Posted: Dec 11, 2008 16:05 Posts Comp View users profile Send private message Reply with quote

Baldrick wrote:
aedipuss: Use the
Code:
-bbcode for html in this forum section.



thanks

that will put it in a quote like box and not run it?
_________________
--
"a lot of people are better dead" - prisoner KSC2-303


TexasEx
Member


Joined: 02 Oct 2008
Location: Houston, TX

Post Posted: Dec 11, 2008 16:09 Posts View users profile Send private message Reply with quote

aedipuss wrote:
if the files are in a different folder than the html page then you need to use the url of the files. as in

[edit] i can't seem to type in the text without it thinking it's a video to play

anyway the files need full url addresses - 'http://www.yoursite.com/folder/player.swf','player','672','480','9.0.115'


The html page, .mp4 file, swf player, etc. are all in one folder.


aedipuss
aBigMeanie


Joined: 25 Oct 2005
Location: 666th portal

Post Posted: Dec 11, 2008 17:03 Posts Comp View users profile Send private message Reply with quote

your source code is missing part of the scripts first line - it should b like this
Code:
  <p id='preview'><a href="http://www.adobe.com/go/getflashplayer" target="_blank">
      <u>Error- You must upgrade your Adobe Flash Player to see this video, upgrade here</u></a>.</p>


and i would still use full urls for all files. you might also reduce the flash player version to 9.0.115
_________________
--
"a lot of people are better dead" - prisoner KSC2-303


TexasEx
Member


Joined: 02 Oct 2008
Location: Houston, TX

Post Posted: Dec 11, 2008 17:15 Posts View users profile Send private message Reply with quote

aedipuss wrote:
your source code is missing part of the scripts first line - it should b like this
Code:
  <p id='preview'><a href="http://www.adobe.com/go/getflashplayer" target="_blank">
      <u>Error- You must upgrade your Adobe Flash Player to see this video, upgrade here</u></a>.</p>


and i would still use full urls for all files. you might also reduce the flash player version to 9.0.115


The disclaimer takes away the player when you add it to the script. The full address isn't doing anything. I did reduce the flash player, however, to the older version. Do I need to add %20 or whatever the characters are when you save a pdf in a certain application since I have spaces in the title of my video?


aedipuss
aBigMeanie


Joined: 25 Oct 2005
Location: 666th portal

Post Posted: Dec 11, 2008 17:49 Posts Comp View users profile Send private message Reply with quote

it's possible your server can't deal with spaces in file names. i use the _ to connect rather than spaces.

the first line i posted works, it's right off a page on my site and it's what baldrick used for the video to play in this thread.
_________________
--
"a lot of people are better dead" - prisoner KSC2-303


CineManno
Member


Joined: 27 Mar 2007
Location: Netherlands

Post Posted: Jan 25, 2009 13:18 Posts Comp View users profile Send private message Reply with quote

There is something I don't fully understand. The code adds the JW FLV Player to the site. I thought this player can playback the MP4 file. Then why is it still required to have Adobe Flash Player version 9 or higher? I thought that you need EITHER Adobe Flash Player 9 OR JW FLV Player. Could someone explain this in more detail? I am confused about this.

Captain Satellite
Space Cowboy


Joined: 03 Feb 2003
Location: The Twilight Zone

Post Posted: Mar 07, 2009 00:36 Posts Comp View users profile Send private message Reply with quote

I doubt this player works any longer. I can't get any of this to work as before.

Captain Satellite
Space Cowboy


Joined: 03 Feb 2003
Location: The Twilight Zone

Post Posted: Mar 07, 2009 11:25 Posts Comp View users profile Send private message Reply with quote

Can anybody explain to me why this player won't work? I even added the whole url for everything even though it's all in the same folder. I did this a while back. Here's my link and code. Please help,

http://myfavoritevideoclips.com/videopage/index.html

Code:

<p id='preview'>The player will show in this paragraph</p>

<script type='text/javascript' src='http://myfavoritevideoclips.com/videopage/swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('http://myfavoritevideoclips.com/videopage/player.swf','player','400','300','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','http://myfavoritevideoclips.com/videopage/video.flv');
s1.write('preview');
</script>

Edit: Great the code isn't showing up. sad.gif


Reply to topic All times are GMT - 6 Hours
Goto page 1, 2  Next
Forum Index -> How to's -> User guides Page 1 of 2





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You can vote in polls in this forum



Jump to:  
Display:   
DVDFab DVD to DVD and Blu-ray to Blu-ray offers a 20% discount until Nov 22, 2009. More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics