using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subtitle

psrnet00

New Member
Messages
12
Reaction score
0
Points
0
{sorry for bad english knowledge}

i need to online convert video from url or direct downloadable site so i can download files after conversion

i know some website provide online conversion of video and other files length is near 200 mb, but i need to convert more than 700MB

i am very new to PHP, my question is that

is there any way to create this php script or if you know how to do php script than help me to create this script

or if this script is available than from where i can download this script for free with tutorial

plzzzz do reply
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

I'm going to try to strongly discourage you from trying this at all. Video conversion (decoding, then encoding) requires a lot of processing cycles and a large memory space, and getting conversion speeds significantly faster than real-time (one second of video takes one second to convert) takes a lot of horsepower. It's not even close to practical in a shared environment -- even if the timesharing and memory management were perfect and never allowed your code more than its share of resources, the processing time would increase to the point that burning a disc and hand-delivering it would be a practical alternative.

Even the typical VPS would be underpowered for the task, and it's not something where you can just spawn a new instance to share the load (as you can with a request/reponse web server). That means a dedicated or co-located server with above-average specs. And that means money with a capital M. And you still won't be able to do it fast enough for a browser to wait for the results.

It's far more practical to do the conversion on your local machine/network without the PHP layer, even if the object of the game is to move the files to a web server for download.
 

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

And you DEFINITELY wouldn't want to do this in PHP.
 

psrnet00

New Member
Messages
12
Reaction score
0
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

ok... thanks anyway


i want to change design of php but i can't find it... (x10hosting)
 

GtoXic

x10 Support
Messages
636
Reaction score
17
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

by change the design do you mean the style of the page (eg: colours etc)?

If so, use CSS. You can find CSS help from google.
Thanks for reading, GtoXic
 

Murphy65

New Member
Messages
31
Reaction score
0
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

search in wp site in plugun sections!
 

SierraAR

Community Advocate
Community Support
Messages
827
Reaction score
17
Points
18
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

You would probably have better results using an actual program designed for converting video formats, instead of doing it via an online application anyway.
 

saviorfromthenorth

New Member
Messages
31
Reaction score
0
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

I have the used ffmpeg extension before, it does work. It's not preloaded so you would have to install it yourself. The major problem you will be facing though are the numerous codecs out there that the library does not know how to convert. So you will experience a lot of errors. That's why nobody encourages you to try it.
 

psrnet00

New Member
Messages
12
Reaction score
0
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

TO ADMIN,
TO MEMBERS,
TO THOSE WHO KNOWS FFMPEG,


I look around many threads and posts in different sites, but bcz of less script and functions knowledge i am not able to get anything right, and also i know some sites (other than hosting site) provide this feature but they only allow max. length is 200 mb or less


bcz i downloaded a movie that having different lang, i do not want to download 500 mb again, so i want to extract only audio and download it, i will delete those in 1 hrs after successfully conversion of vid to mp3, i want this for only personnel use and i am not going to allow any person expect me to use it, and even i will use only few times, bcz my main purpose is to learn php and hosting here


so my three points are

1. Admin and members who have privilege and authorized to access my site/domain can do it for me preload it for me plzzzzzzz

2. if ffmapeg is not allowed at here x10hosting than plz admin and member tell me coz i donot want to be banned myself again

3. can anyone explain me in simple and easy to understable that how do i can install ffmpeg on my server and extract audio from mp4/avi/mkv files
 

nirajkum

New Member
Messages
159
Reaction score
0
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

there are lots of open source project you can refer it and if you dont want to write the whole you can integrate tools in your project
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

Why not use a program on your computer? There are an extreme large amount free and paid software that can do this for you. If you only need subs for example, just download a .srt file from a subbing website and then download the CCCP-project and play it in media player classic and you will have the subs playing (subs have to be same name as video). On extracting sound, no idea about what software, but I'm sure there are a lot.

Also, avi, mp4 and mkv is only the containers, not the codec itself. mkv is probably the easiest one to extract stuff from because how it's buit. Demux the mkv with a program like MKVExtractGUI (http://www.videohelp.com/tools/MKVExtractGUI) to get audio, video and subs as separate files. Then use some muxer tool like AVI-Mux GUI: http://www.alexander-noe.com/video/amg/
 
Last edited:

psrnet00

New Member
Messages
12
Reaction score
0
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

galaxyAbstractor,

I think you did not understand my question, :confused:

in simple term i want to know will x10hosting banned me for using ffmpeg

and if they allow me to use it than i need guide on it or preload or install it for me
{sorry for bad english knowledge}

:rolleyes:

{think it - what you wrote in your answer}

:rolleyes:

you talk about subs - if i need just subs then there are already many sites that i know provide subs in many lang,

using program on computer and codec and mkv extractor - i already have many programing software and also for that i have to download movie again and i have really slow connection and think why i will choice to convert downloaded movies when i already got new file/movie


Why not use a program on your computer? There are an extreme large amount free and paid software that can do this for you. If you only need subs for example, just download a .srt file from a subbing website and then download the CCCP-project and play it in media player classic and you will have the subs playing (subs have to be same name as video). On extracting sound, no idea about what software, but I'm sure there are a lot.

Also, avi, mp4 and mkv is only the containers, not the codec itself. mkv is probably the easiest one to extract stuff from because how it's buit. Demux the mkv with a program like MKVExtractGUI (http://www.videohelp.com/tools/MKVExtractGUI) to get audio, video and subs as separate files. Then use some muxer tool like AVI-Mux GUI: http://www.alexander-noe.com/video/amg/
 

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

in simple term i want to know will x10hosting banned me for using ffmpeg

and if they allow me to use it than i need guide on it or preload or install it for me
{sorry for bad english knowledge}

It can't be used on free hosting. You could probably use it on a VPS, though :)
 

psrnet00

New Member
Messages
12
Reaction score
0
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

does VPS exits in free trail

or

free use with some restriction so i can first check that

"am i ok with it or not"

and than i can buy it
 

iearn.tk54

New Member
Messages
85
Reaction score
1
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

PHP video conversion script

Video workshop - v1.0

This is a video conversion PHP script created by me.

It uses mencoder/ffmpeg for encoding videos from one format to another.

There are several supported extensions :
flv
avi
3gp
mov
mp4
mp3

There are various conversion options that let you change video bitrate,audio bitrate,video dimensions,audio frequency and channels. You can also watermark your videos using this script.

Requires : FFmpeg / MenCoder installed on server.

The script is best suited for video based sites hosted on a VPS / dedicated server.

Installation : Follow readme.txt and then upload all files to your webhost.

Download Page

---------- Post added at 06:30 AM ---------- Previous post was at 06:27 AM ----------

Also 1 More.................

20110722055234_1505_1478661_1979795235_logo_codecanyon_v2.jpg


Conversion options:

- Upload & convert
- Convert from url
- Cron job

including:
Flash xml video uploader (AS3)

Features:
- supported input files: 3gp, avi, mpg, mpeg, mpe4, mov, m4a, mj2, flv, wmv, mp3, ogg, webm
- converts to .flv, mp4, avi, wmv, mp3, ogg, webm
- custom audio & video quality
- custom video size
- calculate video duration in next format 00:00:00 (hh:mm:ss)
- upload progress bar
- conversion progress bar
- custom number of extracted images
- custom size of extracted images
- video preview with slideshow of extracted images on mouse over( like seen on dailymotion.com)
- auto reloading pages when part of process is finished (no need to wait for click)
- everything is stored in database
- easier usage

Flash uploader
– xml driven
– all tweeneng made by AS3
– auto load next page after uploading is finished (with 10 sec. delay – can be set in AS)
– max. input file size, suported input types, where to go after uploading is finished and displaying status messages can be set in xml file
– CS3 & CS4 .fla
– can be used for uploading other types of files, like documents or images. Explination in help file.

Convert from url:

-. support downloading and converting videos from internet (if video is allowed to be download)
- sample of link: http://www.example.com/videos/test_video.mp4
- custom maximum allowed video size
- all features mention above

Cron job – Upload now and convert later

User can upload and set output quality for output video, when cron job is started conversion is made automaticly and after conversion is finished, it sends the user link for download new video (via e-mail in this example)



Link Page
 

saviorfromthenorth

New Member
Messages
31
Reaction score
0
Points
0
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

To install ffmpeg you will need to access your webhost via SSH, which is locked in a free account. So I guess using it is not possible. Not unless x10hosting would grant you special priviledges :).
 

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

does VPS exits in free trail

No - just buy a month and then if you like it, renew it for longer.


To install ffmpeg you will need to access your webhost via SSH, which is locked in a free account. So I guess using it is not possible. Not unless x10hosting would grant you special priviledges :).

Again incorrect - you would need SSH (or something similar) and permissions to install stuff on the server. ffmpeg will not be installed on free hosting.
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Re: using PHP - how to convert video (avi, mp4, mkv) or even extract audio/video/subt

I still can't understand why you want to convert the video on a hosting server using PHP? IF you were able to, you would still have to upload the video to the server. Upload speeds are usually 10 - 20 times slower than download speeds, then you have to download the converted video. Then it would be faster to just download the video with correct language, or just get some software and do it on your computer. Or are you intending to start a service for this? If so, you would probably need a couple of dedicated servers for that.
 

id0tx10m

New Member
Messages
4
Reaction score
0
Points
1
I found a way to enable ffmpeg. Change CPanel theme to the classic theme, and then scroll down to the "Select PHP Version" option. Click it and you will see a bunch of checkboxes, including FFmpeg! Check FFmpeg and click "Save"
 

id0tx10m

New Member
Messages
4
Reaction score
0
Points
1
yeah i had wanted to create a service for it but its ok, there are already some that exist and ive found some success on another site that uses Node instead of PHP. Thank you for the help!
edit: wait i didnt post this nvm lmao
 
Top