Want High Quality Video AND reduce bandwidth? I do .. and now you can too!
Information: Original Test File is 25MB WMV
Default Boonex settings (poor) File was 1.6MB
25FPS and Keep Original Video Format (variable bit-rate) 23MB and looked awesome
My New Settings look as good as HI-Q version but only 6MB File!
How to Do It (And what to Tinker With)
Open /public_html/flash/modules/video/inc/functions.inc.php (save a local backup just in case!)
Line 169 Change
$sTmpl = $sFfmpegPath . " -y -i " . $sInputFile . " -r " . getVideoFps() . " -s " . getVideoSize($sSize) . $sSound;
to
$sTmpl = $sFfmpegPath . " -y -i " . $sInputFile . " -r " . getVideoFps() . " -s " . getVideoSize($sSize) . $sSound . " -qmin 3 -qmax 6 ";
Please note and retain spaces between "'s and command! " -qmin 3 -qmax 6 "
Note: TURN OFF "Keep Original Video Format" and set FPS to 25 in Flash Module Video Settings!
Still not small enough a file for you? -qmin and -qmax can range from 1 - 31. Lower is HIGHER quality. -qmin -qmax at 1 is lossless and totally a waste of bandwidth. But if you want to reduce the file size while minimizing loss of quality, start setting -qmax higher until you find the sweet spot. You may need to flush the cache each time you change the file, I'm not sure.
If you enjoy this Mod and it helps you, Click the Green + on this topic! If you break it, you can keep both pieces!
Sydeburnz
|
Hmm. Interesting.....
Curious? I know resampling and image produces a much clearer result as just resizing it. Would this be the same idea, only for video?
http://towtalk.net ... Hosted by Zarconia.net! |
It’s a slightly complicated subject but think of qmin and qmax as how much quality you want to take away from your video, between those two numbers. The minimum qmin and qmax is 1 and the maximum is 31.
The setting -qmin 3 -qmax 6 for streaming video is very, very good and very close to the original without being massive in size. (25MB input 6MB output)
It would be nice if those settings were added to the Flash Module Settings Panel to make it easier to test.
|
Thank You!
I think Dolphin just became a much better piece of software for me. I have been worried about exactly how I was going to deal with my uploaded movies.....
http://towtalk.net ... Hosted by Zarconia.net! |
Great advice! I'm going to tinker away... Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net |
In RC4 the code has changed (minimally). As the 'spacing' is important, how do you add your code mod?
Thanks in advance.
Stuart
There are none so blind as those that will not see. |
I tried this mod with a .mov video file and get better video quality(bigger .flv file).
However, this mod make my site failed to play video. It was loading forever.
|
|
I tried this mod with a .mov video file and get better video quality(bigger .flv file).
However, this mod make my site failed to play video. It was loading forever.
Without knowing the size of the file and maybe a test link I can't really offer any suggestions. If it's loading but slowly that sounds like a bandwidth issue. Once it processes and is available for viewing it is out of my hands. You should increase qmax and get it to a point where you are confortable with the files size (performance)
|
In RC4 the code has changed (minimally). As the 'spacing' is important, how do you add your code mod?
Thanks in advance.
Stuart
I see no change that affects this MOD as of Release 7.0
|
Good to know it was not changed to 7.0 release, which means I can still tinker with it to find the best combination. Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net |
How about some new input from this.... I finally got my site working the way I want. I can now successfully upload up to a 150 MB file.
I did a test using a 120MB .MP4 file
1st upload. Set to 85% and 15 fps, save full quality enabled
- FLV size - 492594 k
- MP4 size - 93549 k
- MPG size - 496810
- Quality was terrific but couldn't stream it if you had an OC3 connect.
2nd upload. Set to 85% & 15 fps. save full quality disabled
- FLV size - 53017 k
- MP4 size - 93549 k (the same?)
- MPG size - 48182 k
- Streamed very well but quality was freakin horrible. My dog even got tired of watching it.
3rd upload. Set back to default 75% & 25 fps (as recommended), full quality disabled.
- FLV size - 185954
- MP4 size - 63502 k (smaller!)
- MPG size - 193326 k
- Quality was very good but not excellent. Would almost stream on a 1.5 MB connect.
Now, the way I see it, this is a 120 MB Video MP$ that's 10 minutes in length. Anyone with a connect better than my T1 would probably have no trouble streaming the third choice. I think the mod works very well and it gives you an ability to fine tune your site that other users wouldn't have.
I'm going to leave it in. Great work Sideburnz!
http://towtalk.net ... Hosted by Zarconia.net! |
thxxx!!!and here if some one wants to change the thumb pic if you
don't want to take a thumb in the beginning of the video
you can
change it from here
Line 259
/flash/modules/video/inc/functions.inc.php
function grabImages($sInputFile, $sOutputFile,
$iSecond = 0, $bForse = false)
I changed it to
function
grabImages($sInputFile, $sOutputFile, $iSecond = 20, $bForse = false)
I
thought i just share it with you :)
|
Thats great!
Only prblem I see with that would be if the video is only 15 seconds long. I think it might be better to do it as a function of percentage. Somehoe tell it to grab a thumb at 25% of the video (or 50%) like youtube does.
What would replace the '$iSecond = 0' ?? '$iPercentage = 25' ??? (lol)
http://towtalk.net ... Hosted by Zarconia.net! |
I changed that setting. Made no difference
That line actually exists in 2 locations. make sure you have the right line. (I'm a little slow)
http://towtalk.net ... Hosted by Zarconia.net! |
I think if you made the thumb at 5 seconds your good, if anyone has black for 5 seconds they have a bad video and this lets people know its a bad video. |
i tried to look for a percentage but no luck
and yes ur right
i changed it after i tried 20 sec its a bet long .. so i changed it to 5 and it was better
|
How about some new input from this.... I finally got my site working the way I want. I can now successfully upload up to a 150 MB file.
I did a test using a 120MB .MP4 file
1st upload. Set to 85% and 15 fps, save full quality enabled
- FLV size - 492594 k
- MP4 size - 93549 k
- MPG size - 496810
- Quality was terrific but couldn't stream it if you had an OC3 connect.
2nd upload. Set to 85% & 15 fps. save full quality disabled
- FLV size - 53017 k
- MP4 size - 93549 k (the same?)
- MPG size - 48182 k
- Streamed very well but quality was freakin horrible. My dog even got tired of watching it.
3rd upload. Set back to default 75% & 25 fps (as recommended), full quality disabled.
- FLV size - 185954
- MP4 size - 63502 k (smaller!)
- MPG size - 193326 k
- Quality was very good but not excellent. Would almost stream on a 1.5 MB connect.
Now, the way I see it, this is a 120 MB Video MP$ that's 10 minutes in length. Anyone with a connect better than my T1 would probably have no trouble streaming the third choice. I think the mod works very well and it gives you an ability to fine tune your site that other users wouldn't have.
I'm going to leave it in. Great work Sideburnz!
You tested that after applying Sydeburnz 's suggestion? Just curious...
I only have 100 gig disk space on my vps... aren't you afraid that you will run out of disk space quickly with 1,000 busy members?
Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net |
how about video comments? I tried editing /inc/functions.php in the video comments folder.
I changed line 97 to $sTmpl = $sFfmpegPath . " -y -i " . $sInputFile . " -r " . getVideoFps() . " -s " . getVideoSize($sSize) . $sSound . " -qmin 3 -qmax 5 ";
That didn't seem to make any difference.
I tested your mod for video module, it worked great!
Please advise.
Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net |
I tried this but it just keeps "being processed". If I put the original functions.inc.php back in it works. But the video quality is "pixeled". I've contacted sydeburnz about it, will post here if I hear from him.
Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net |
No actual processing is taking place in the Video Comments Functions.php. All it is doing with FFMPEG is getting FPS information. Pretty certain now that the RMS server handles all live video and that should be controlled by Video Quality and FPS settings in the Flash Module.
Syde
|
No actual processing is taking place in the Video Comments Functions.php. All it is doing with FFMPEG is getting FPS information. Pretty certain now that the RMS server handles all live video and that should be controlled by Video Quality and FPS settings in the Flash Module.
Syde
AH, I got it.
I'm going to want to do the same compression type for video comments as well as video recorder. I tested this with leave video quality on, however it takes A lot of disk space that I cannot sacrifice at the moment.
Suggestions, please?
Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net |
Nice! Before and after this mod, I still get hiccups... like every 6 seconds more or less. I have tried numerous of times with different quality and fps but made no differences. Any suggestion? |
Nice! Before and after this mod, I still get hiccups... like every 6 seconds more or less. I have tried numerous of times with different quality and fps but made no differences. Any suggestion?
Its your bandwidth. Have someone else test it from a faster connection. Look at the file folder and compare file size. If you reduced a 25MB file to 6MB and you still see streaming issues its either you, or the servers, bandwidth. If you are on a shared account then all bets are off. This was not meant to be run on shared servers. although it "works", it will never be the "killer" app you want to gen money ... only good for friends and family ... anyone wanting to make this a business has to pay up for a dedicated server with globs of bandwidth. Period
|
No actual processing is taking place in the Video Comments Functions.php. All it is doing with FFMPEG is getting FPS information. Pretty certain now that the RMS server handles all live video and that should be controlled by Video Quality and FPS settings in the Flash Module.
Syde
AH, I got it.
I'm going to want to do the same compression type for video comments as well as video recorder. I tested this with leave video quality on, however it takes A lot of disk space that I cannot sacrifice at the moment.
Suggestions, please?
Without looking at RMS I cant say. If you wish to provide me FTP / Server access I'd be more than willing to peek and poke. Either there is a command line we can edit like the static content, or the only options are Percentage of Quality and FPS. I just don't know with out looking at it.
A possible MOD would be to have FFMPEG process RMS output after the fact via CRON.
Syde
|
Ok, yes... I am currently on shared account. Hey, it's my first year. Gimme a break! LOL. Well, I look forward to have my own server in the near future. Thanks for the heads up.
|
No actual processing is taking place in the Video Comments Functions.php. All it is doing with FFMPEG is getting FPS information. Pretty certain now that the RMS server handles all live video and that should be controlled by Video Quality and FPS settings in the Flash Module.
Syde
AH, I got it.
I'm going to want to do the same compression type for video comments as well as video recorder. I tested this with leave video quality on, however it takes A lot of disk space that I cannot sacrifice at the moment.
Suggestions, please?
Without looking at RMS I cant say. If you wish to provide me FTP / Server access I'd be more than willing to peek and poke. Either there is a command line we can edit like the static content, or the only options are Percentage of Quality and FPS. I just don't know with out looking at it.
A possible MOD would be to have FFMPEG process RMS output after the fact via CRON.
Syde
For testing purposes in regards to possible like compression used for video mod with qmin/qmax, I'll be happy to give you access to my VPS with RMS. Do you need root to RMS setting as well or you can just tinker around my development test site? Although, I'm using standard dolphin 7 script. I can give you access to RMS for testing purposes. I understand that I just need to add your IP address to allowed list. Please PM me.
Thanks.
Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net |
I have over 6GB bandwidth this month already on a shared account and I still don't know what their max is. I decided to completely wipe out Dolphin 7 to a clean slate. Now I get no hiccups! |
I have over 6GB bandwidth this month already on a shared account and I still don't know what their max is. I decided to completely wipe out Dolphin 7 to a clean slate. Now I get no hiccups!
6gb a month hmmm that should have been the limit like 5 years ago
mine is on shared/host also allowance 1.000 GB
currently using about 20gb a month
|
I have over 6GB bandwidth this month already on a shared account and I still don't know what their max is. I decided to completely wipe out Dolphin 7 to a clean slate. Now I get no hiccups!
6gb a month hmmm that should have been the limit like 5 years ago
mine is on shared/host also allowance 1.000 GB
currently using about 20gb a month
He said that so far, he has used 6GB of bandwidth this month, and he is unaware of what the max amount is that he can consume in one month. I myself have with my web hosting package 100GB disk space and 1TB bandwidth. Fortunately, I do not need to worry about being suspended for going over my alloted resources, as my web hosting company just bills me for overages. In my opinion, that's the way it should go with every web hosting company.
Audanbal, you should have seen the limit placed on your web hosting package when you were ordering it. If you do not know, I would recommend that you contact your web hosting company to find out. It's better safe, than sorry.
BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin |
As far as Bandwidth and HDD space goes, there is no limit. If your website becomes extremely popular you are going to get buried.
A dedicated server is going to be a must on the most popular of websites as you will be forced to add processor, ram and hdd space as required. Naturally, the way to offset the costs is to offer a limited amount (if any) of video uploads to free accounts and then charge for Full blown video upload/download, video comments and video chat. I see no other way to justify the exponentially rising cost of supporting more and more users indefinitely.
The homepage of Dolphin for most of us is already well over 1MB, regardless of what your http compression test says. Access your homepage via your cell phone and see how much you really download :) This thing is a huge unwieldy beast, not optimized for saving bandwidth or playin nice on shared servers.
But it sure is sweet :)
Syde
|
i cant find the line
$sTmpl = $sFfmpegPath . " -y -i " . $sInputFile . " -r " . getVideoFps()
. " -s " . getVideoSize($sSize) . $sSound;
with the update 7.1
|
i cant find the line
$sTmpl = $sFfmpegPath . " -y -i " . $sInputFile . " -r " . getVideoFps() . " -s " . getVideoSize($sSize) . $sSound;
with the update 7.1
It is not there I looked as well sent sydeburnz a message maybe he can help?
Csampson |
|
thxxx!!!and here if some one wants to change the thumb pic if you don't want to take a thumb in the beginning of the video
you can change it from here
Line 259
/flash/modules/video/inc/functions.inc.php
function grabImages($sInputFile, $sOutputFile, $iSec alt= 0, $bForse = false)
I changed it to
function grabImages($sInputFile, $sOutputFile, $iSec alt= 20, $bForse = false)
I thought i just share it with you :)
In Vers 7.0.1, it's on line 278.....
http://towtalk.net ... Hosted by Zarconia.net! |
I just built ffmpeg and supporting libs from source, and would like to use that instead of ffmpeg.exe. I changed
sFfmpegPath to /user/local/bin/ffmpeg (returned by which), then I just changed it to 'ffmpeg'. First option fails instatnly, second option sits in pending.
I think the newest FFMpeg should really help speed and size, and would like to give it a shot.
If any of the video modules posted in the market supports this out of the box - please let me know.
Thanks!!
|