Jump to content

ffmpeg / ffplay / ampersand's


The Little Guy

Recommended Posts

I would really like #2 to be answered the most...

 

1. Is there a way to get the length of an audio file?

 

2. Ok, When ever I pass a value containing an ampersand, for some reason the file fails.

 

$flvName // this variable contains the ampersand

- it creates the file but i can not play it

- it doesn't create the thumb image

- it does save the file in the database

 

Create the flv file:

exec("/usr/bin/ffmpeg -i '../../tzfiles.com/users/{$_POST['uploadTo']}/$fName' -sameq -qmax 5 -s 640x480 '../../tzfiles.com/users/{$_POST['uploadTo']}/$flvName'");

 

Create a Thumb:

exec("ffmpeg -i '../../tzfiles.com/users/{$_POST['uploadTo']}/$flvName' -an -ss 00:00:03 -t 00:00:01 -r 1 -y -s 120x90 '../../tzfiles.com/users/{$_POST['uploadTo']}/thumbs/videos/$f%d.jpg'");

Link to comment
Share on other sites

I'm not sure exactly how the interaction with your file works from the user-interface, but the ampersand is a special character in a URL and can result in incomplete url-requests if you're expecting to include the ampersand character in the URL name.  You will want to use rawurlencode / rawurldecode in order to get around that difficulty.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.