Go Back   CodingForums.com > :: Server side development > PHP > Post a PHP snippet

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-03-2012, 11:52 PM   PM User | #526
Luckyplaya
New Coder

 
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Luckyplaya is an unknown quantity at this point
Give me the Link to the Converter. i test it too.

Last edited by Luckyplaya; 11-04-2012 at 12:50 AM..
Luckyplaya is offline   Reply With Quote
Old 11-04-2012, 04:30 AM   PM User | #527
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Hi guys,

I got hammered by Hurricane Sandy so I will try to get to your questions as soon as possible. Thanks for your patience and for your interest in my app...
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Web Conversion Software on Facebook !! :)
chump2877 is offline   Reply With Quote
Old 11-04-2012, 04:46 AM   PM User | #528
slaine
New Coder

 
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
slaine is an unknown quantity at this point
Quote:
Originally Posted by Luckyplaya View Post
Give me the Link to the Converter. i test it too.
ffmpeg version git-2012-11-04-4a2599b Copyright (c) 2000-2012 the FFmpeg developers
built on Nov 4 2012 05:12:23 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
libavutil 52. 3.100 / 52. 3.100
libavcodec 54. 71.100 / 54. 71.100
libavformat 54. 35.100 / 54. 35.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 21.106 / 3. 21.106
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Hyper fast Audio and Video encoder


a new install of the ffmpeg but wtf it work localy on 192.168.1.65 and on the domain it work 1/10 with other ppl to convert still same issue
slaine is offline   Reply With Quote
Old 11-04-2012, 05:17 AM   PM User | #529
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Quote:
Originally Posted by slaine View Post
ffmpeg version git-2012-11-04-4a2599b Copyright (c) 2000-2012 the FFmpeg developers
built on Nov 4 2012 05:12:23 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
libavutil 52. 3.100 / 52. 3.100
libavcodec 54. 71.100 / 54. 71.100
libavformat 54. 35.100 / 54. 35.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 21.106 / 3. 21.106
libswscale 2. 1.102 / 2. 1.102
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Hyper fast Audio and Video encoder


a new install of the ffmpeg but wtf it work localy on 192.168.1.65 and on the domain it work 1/10 with other ppl to convert still same issue
Have you modified my core code and/or the ffmpeg commands in any way? Can you post the full ffmpeg log file for a failed conversion? Are your failed conversions even generating log files? Your phpinfo looks ok....this is probably a ffmpeg or file permissions problem...If you can convert ok locally, then it's more likely a permissions or file ownership (chown) problem...
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Web Conversion Software on Facebook !! :)
chump2877 is offline   Reply With Quote
Old 11-04-2012, 05:26 AM   PM User | #530
slaine
New Coder

 
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
slaine is an unknown quantity at this point
Quote:
Originally Posted by chump2877 View Post
Have you modified my core code and/or the ffmpeg commands in any way? Can you post the full ffmpeg log file for a failed conversion? Are your failed conversions even generating log files? Your phpinfo looks ok....this is probably a ffmpeg or file permissions problem...If you can convert ok locally, then it's more likely a permissions or file ownership (chown) problem...
There is no logs and everything is chmod 777 that should. any ide if any port on the router should be open other than 80 ! ANd no havnt changed anything in the code. Yes it generates i change path to ffmpeg to try and i got error that it doesnt exist.
slaine is offline   Reply With Quote
Old 11-04-2012, 05:42 AM   PM User | #531
slaine
New Coder

 
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
slaine is an unknown quantity at this point
[QUOTE=slaine;1288352]....../QUOTE]
http://snuthuset.se/fixed/ffmpeg.php


nothing wrong with ffmpeg.
slaine is offline   Reply With Quote
Old 11-04-2012, 05:57 AM   PM User | #532
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Quote:
Originally Posted by slaine View Post
There is no logs and everything is chmod 777 that should. any ide if any port on the router should be open other than 80 ! ANd no havnt changed anything in the code. Yes it generates i change path to ffmpeg to try and i got error that it doesnt exist.
You are running your own server?...you own the server? Might want to try paying for a managed server/service if you are having difficulty on your own...

I've never heard of ffmpeg requiring an additional port to be opened to run correctly...

If you aren't getting any log files, then the ffmpeg commands are never even executed. (Assuming your /logs directory permissions are set correctly.)

Maybe you are having trouble with PHP's exec()? Perhaps in some way you need to grant other IPs/users the ability to access and run ffmpeg (or, for that matter, any executable programs on your server)?

I'm really grasping at straws here because you say the code works perfectly for you locally, but usually? doesn't work for other IPs.....so if the code isn't the problem, then there is something wrong with the server configuration...something that I cannot see or detect from where I am, using the information that you have provided....
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Web Conversion Software on Facebook !! :)
chump2877 is offline   Reply With Quote
Old 11-04-2012, 05:59 AM   PM User | #533
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
[QUOTE=slaine;1288356]
Quote:
Originally Posted by slaine View Post
....../QUOTE]
http://snuthuset.se/fixed/ffmpeg.php


nothing wrong with ffmpeg.
did you run that test locally or from a different IP?
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Web Conversion Software on Facebook !! :)
chump2877 is offline   Reply With Quote
Old 11-04-2012, 06:09 AM   PM User | #534
slaine
New Coder

 
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
slaine is an unknown quantity at this point
[QUOTE=chump2877;1288358]
Quote:
Originally Posted by slaine View Post

did you run that test locally or from a different IP?
i ran it from the network localy yes did it work for u ? if not then its permission or the router
slaine is offline   Reply With Quote
Old 11-04-2012, 06:14 AM   PM User | #535
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
[QUOTE=slaine;1288359]
Quote:
Originally Posted by chump2877 View Post

i ran it from the network localy yes did it work for u ? if not then its permission or the router
If that wasn't just the output of some test, but the actual test itself, then, yes, it did appear to work for me...
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Web Conversion Software on Facebook !! :)
chump2877 is offline   Reply With Quote
Old 11-04-2012, 06:32 AM   PM User | #536
slaine
New Coder

 
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
slaine is an unknown quantity at this point
got damn now i have been awake too long with this problem, it wasnt the ports or the permission either, i asked for some test on facebook noone was able to convert mp3. if u came up with some briljant plan im open thanks for today
slaine is offline   Reply With Quote
Old 11-04-2012, 11:08 AM   PM User | #537
Luckyplaya
New Coder

 
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Luckyplaya is an unknown quantity at this point
How can I implement because with the language files?
Have you seen a clue?

EDIT: Have found a solution!

Last edited by Luckyplaya; 11-04-2012 at 12:11 PM..
Luckyplaya is offline   Reply With Quote
Old 11-04-2012, 03:27 PM   PM User | #538
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,530
Thanks: 15
Thanked 128 Times in 121 Posts
chump2877 is on a distinguished road
Quote:
Originally Posted by Luckyplaya View Post
How can I implement because with the language files?
Have you seen a clue?

EDIT: Have found a solution!
Implementing language files wouldn't be terribly hard. Are you looking to set the language manually (perhaps via config class) or give the user the ability to do so via a drop down menu filled with languages? The latter is a little more involved, but both ideas are feasible.

Edit: Very briefly, in either case, you need to generate a bunch of include files filled with constant definitions. The constant names are the same in each file, and the corresponding values are in whatever language a given include file is dedicated to. Then you need to add the constant names to my code where and when they are required. Finally, you need to devise a method for delivering the right include file based on a language selection.


Don't have time to explore a full solution for you now. (Although it seems as if you have figured it out on your own.) I will consider adding support for this kind of thing in my next release of the software. Thanks for the suggestion.
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Web Conversion Software on Facebook !! :)

Last edited by chump2877; 11-04-2012 at 03:39 PM..
chump2877 is offline   Reply With Quote
Old 11-04-2012, 06:19 PM   PM User | #539
Luckyplaya
New Coder

 
Join Date: Sep 2012
Location: Germany
Posts: 32
Thanks: 8
Thanked 1 Time in 1 Post
Luckyplaya is an unknown quantity at this point
I have tried so

index.php
PHP Code:

<?php 
$lang 
$_GET["lang"]; 
if(
$lang == ""
 {  
  
$lang "de";   
 } 
include(
"language/lang_".$lang.".php"); 

...

?>
<?php 
echo '<?xml version="1.1" encoding="iso-8859-1"?>'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title><?php echo $Titel ?></title>

...
lang_de.php
PHP Code:
<?php 
$Titel 
"Video2MP3.eu - Youtube und Dailymotion Videos Online umwandeln";
$Convert "Video wird umgewandelt. . .";
$Success "Abgeschlossen";
$Download_File "Datei runterladen";
$Create_Ringtone "Klingelton erstellen";
$Error_gen_file "Fehler beim erzeugen der Convertierten Datei";
$Wait_Convert "...Bitte warten, das Video wird umgewandelt:";
$Video_Download "Video runterladen. . .";
$Error_Download "Fehler beim Download, bitte versuche es erneut!";
$Wrong_url "Falsche video URL oder dateityp! Bitte versuche es nochmal.";
$Vaild_url "Gib eine g&uuml;ltige YouTube.com oder Dailymotion.com Video URL ein";
$Choose_file_type "In welches Format soll das Video umgewandelt werden?";
$Convert_Video_Button "Video Umwandeln";
$Format "Format";
$Codec "Codec";
$Bitrate "Bitrate";
$Type "Typ";
$HD "* = 2000 kbit/s nur wenn das Video in HD vorliegt.";
$iOS_Support "² = iPhone, iPad, iPod geeignet.";

$Footer_text "evtl. Darstellungsprobleme mit dem Internet Explorer.";

$Twitter_Tweet "Twittern";
$Twitter_lang "de";

?>
lang_en.php
PHP Code:
<?php 
$Titel 
"Video2MP3.eu - Convert Youtube und Dailymotion Videos Online";
$Convert "Converting video. . .";
$Success "Success";
$Download_File "Download your converted file";
$Create_Ringtone "Create Ringtone";
$Error_gen_file "Error generating converted file!";
$Wait_Convert "...Please wait while I try to convert:";
$Video_Download "Downloading video. . .";
$Error_Download "Error downloading video, please, try again!";
$Wrong_url "Invalid video URL or file type! Please, try again.";
$Vaild_url "Enter valid Youtube.com or Dailymotion.com video URL";
$Choose_file_type "Choose file type to convert video to:";
$Convert_Video_Button "Convert Video";
$Format "Format";
$Codec "Codec";
$Bitrate "Bitrate";
$Type "Type";
$HD "* = 2000 kbit/s only when the video is in HD.";
$iOS_Support "² = iPhone, iPad, iPod support.";

$Footer_text "possibly display issues with Internet Explorer.";

$Twitter_Tweet "Tweet";
$Twitter_lang "en";
?>
the translation also works great, but when I choose English and then convert a video , it automatically jumps to the default language (German) .



you can test it here: http://video2mp3.eu/test/?lang=en

Last edited by chump2877; 11-04-2012 at 06:54 PM.. Reason: just editing out some code from paid version
Luckyplaya is offline   Reply With Quote
Old 11-04-2012, 06:59 PM   PM User | #540
slaine
New Coder

 
Join Date: Nov 2012
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
slaine is an unknown quantity at this point
Quote:
Originally Posted by Luckyplaya View Post
you can test it here: http://video2mp3.eu/test/?lang=en
maybe u have to save the choosen lang in a cookie.
slaine is offline   Reply With Quote
Reply

Bookmarks

Tags
audio, class, conversion, dailymotion, ffmpeg, mp3, php, script, video, youtube

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:18 AM.


Advertisement
Log in to turn off these ads.