Webmastersite.net
Register Log In

FLV & Attachments.
New Install, FLV Conversion error, Deletion error

Comments on FLV & Attachments.

Rob Dalzell
Member

Usergroup: Customer
Joined: Sep 23, 2004
Location: The Sunny Okanagan

Total Topics: 5
Total Comments: 13
Posted Dec 24, 2007 - 1:16 PM:

Hi Paul.

Happy Holidays,. I am having a problem with attachments, in 2 ways.

The first is that I am trying to use the FLV conversion on upload. I have installed the ports required including
the FFMpeg for php5. I have adjusted my php.ini files to allow 100meg uploads, longer script times etc. I have tried with a very small AVI file that I have successfully converted myself with another program, so I know that the
avi can be converted without error. It does not seem to convert on upload with WSN Links. At the end of the
upload, the file name can be seen with the .flv extention, but the file size is 0 and there is no
sign of the file in the attachments directory.

It might be important to point out that I have switched to Attachments directory as category tree.

Thumbnailed Jpegs work correctly, they are uploaded, cropped and 2 files are created in the attachment directory within the correct category directory name.

Is there something common I might have overlooked?

My second issue is with removing attachments,. I have 4.1.22 installed brand new, and I have been trying to remove attachments either by hard deleting the link that the attachments belong to, deleting the attachments individually from within theedit link area, also, I have tried the Maintenance>Unused Attachments option to try and remove attachments, as well as regenerate everything.

Though they still remain in the file system tree, and as well, they can not be deleted by webmaster, I must superuser and delete files. They apper to be given chown www.

The attachment directory is chmod 777 and chown Webmaster.

An issue that I am seeing that I'm not sure is normal, is that after uploading an attachment, I'm immediatly redirected to a search page (after I hit the browse file, and then attach button). This is becoming a bit of a pain as I'd have multiple files to upload per link, and for some reason I don't believe it was behaving like this on an WSNLINKS install I created earlier last week. If I remember correctly it had an ajax like feel that made the new file appear on the page without refresh, or redirect.

I'm unclear if it's my server or script, and I'm hoping you might have some hints.

Thanks for your time
Rob
Rob Dalzell
Member

Usergroup: Customer
Joined: Sep 23, 2004
Location: The Sunny Okanagan

Total Topics: 5
Total Comments: 13
Posted Dec 25, 2007 - 5:09 PM:

I wanted to update my post that I can confirm that FFMPeg Lame and the other required ports are installed and running on my server. To experiment, I installed a program called phpmotion.com which is an MPG/AVI to FLV on upload script.

I did have to change the script options to look in /usr/local/bin/ rather then the default /usr/bin. I have not found a place in wsnlinks to modify the installed directy for ffmpeg, which makes me wonder if this could be a solution?

I also had an issue with phpmotion not performing background shell commands for flv conversion and automatic deletion of avi. This was fixed by providing the full php path /usr/local/bin/php to the script in an optional config file, apearently (according to phpmotion) my server has issues using php in CLI mode. Which I find troublesome, because it has been compiled as CLI,CGI & Apache mod.

With phpmotion, I am able to upload the same avi I mention above, it is converted, the avi file is automatically deleted. The avi plays fine with sound, I can then delete the file from the admin panel, and the script will correctly delete the flv file from the harddrive.

I am still not able to reproduce this with wsnlinks, avi will not convert and even the normal attachments will not delete from hard drive.

thanks
Rob Dalzell
Member

Usergroup: Customer
Joined: Sep 23, 2004
Location: The Sunny Okanagan

Total Topics: 5
Total Comments: 13
Posted Dec 26, 2007 - 2:57 PM:

Hi,.

To experiment some more, I just downgraded to 4.1.21 from .22 I have noticed that files will correctly delete themselves so long as the Attachments directory as category tree switch is off. I can delete the attachments from the bulk edit links then select link select attachment and remove, or delete the link entirely and run the unused attachments under maintenance. So my ablility to delete attachments seems to be with the switch.

On top of that, 4.1.21 allows me to upload several attachments with out the page redirecting me to an admin search page like in .22 The problem I was having in .22 is that as soon as I hit the "Attach" button, it acts as the submit button, taking me away from the edit.php?action=link and sending me to admin searchedit page.

Still haven't found a place to play with my FLV settings.

Thanks
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 26, 2007 - 5:44 PM:

The unused attachments option only works with the tree off. Doing it with the tree on is unlikely anytime soon as it'd require traversing potentially thousands of directories to build the list, almost inevitably causing it to time out unless done in some completely new way.

As for FLV conversion, what resolution do you have set at Admin -> Settings -> Links? 400x300 is the default. I recall that uneven numbers will kill it.

Try running this manually via SSH (while in a directory with a video.avi):
ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 400x300 - video.flv

Do you get an error message?
Rob Dalzell
Member

Usergroup: Customer
Joined: Sep 23, 2004
Location: The Sunny Okanagan

Total Topics: 5
Total Comments: 13
Posted Dec 28, 2007 - 12:19 PM:

Hi Paul

It seems that the majority of my problems was with the file system tree switch, a new install of 4.1.22 without touching the switch, and everything looks good other then FLV.

Paul wrote:

Try running this manually via SSH (while in a directory with a video.avi):
ffmpeg -i video.avi -ar 22050 -ab 32 -f flv -s 400x300 - video.flv

Do you get an error message?


Tried what you suggested from shell, the conversion completed without error, I downloaded the converted FLV and it plays with sound & looks good. I'm using WSN's Default setting 400x300, but still no go for conversion on upload. I have noticed that once uploaded, I can not find the avi file on the harddrive, I'm wondering where the temp avi is held before conversion and if that could be a problem? Maybe it's not making it to my system? With the FLV switch off the same avi is uploaded with no problems.raised eyebrow

Thanks
Rob
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 29, 2007 - 1:36 AM:

I'm wondering where the temp avi is held before conversion

It's just uploaded the same as any file is, no different from a .jpg until conversion time.

Tested with my .mov files and they're processed properly.

Are you on a shared server? Maybe PHP is configured to not be allowed to run shell commands. Turn on debug mode (show all queries -- Admin -> Settings -> System) and stop the page after submitting the video, and post the output.
Rob Dalzell
Member

Usergroup: Customer
Joined: Sep 23, 2004
Location: The Sunny Okanagan

Total Topics: 5
Total Comments: 13
Posted Dec 29, 2007 - 1:42 PM:

I think this is the correct output,. just after an upload:

Load time so far: 0.01 seconds.



Query 2: SELECT `name`,`value` FROM wsnlinks_switches WHERE id>0

Number of rows is 93

Load time so far: 0.02 seconds.



Query 3: SELECT `id`,`type`,`original`,`replacement`,`description`,`originalclose`,`replacementclose`,`sortorder` FROM wsnlinks_markup WHERE type='wsncode' ORDER BY sortorder

Number of rows is 26

Load time so far: 0.02 seconds.



Query 4: SELECT `id`,`title`,`caneditown`,`caneditall`,`canvote`,`isadmin`,`canpost`,`canemail`,`validatecats`,`validatecomments`,`validatelinks`,`validateedits`,`cansubmitlinks`,`cansubmitcategories`,`cansubmitcomments`,`caneditownlinks`,`caneditowncategories`,`caneditowncomments`,`caneditownprofile`,`caneditalllinks`,`caneditallcategories`,`caneditallcomments`,`caneditallprofiles`,`candownloadfiles`,`canupload`,`canviewip`,`limitlinks`,`canemailmembers`,`canusehtml`,`limitlinksdaily`,`canalias`,`cancopy`,`candeleteown`,`candeleteall`,`candofulledit`,`candeletecategories`,`candeletecomments`,`candeleteowncategories`,`candeleteowncomments`,`candeletemembers`,`candeleteownmembers`,`canaliascategories`,`canviewpages`,`caneditvotes`,`numaliases`,`canviewvotes`,`canhideownlinks`,`canhideowncategories`,`canhideowncomments`,`canhidealllinks`,`canhideallcategories`,`canhideallcomments`,`canratecomments`,`bytespermem`,`canpm`,`canim`,`canharddelete`,`limitpms`,`limitpmsdaily`,`canviewdeleted`,`cansubmitpolls`,`candeletepolls`,`candeleteownpolls`,`caneditpolls`,`caneditownpolls`,`attachperpost`,`attachperpm`,`canviewshouts`,`caneditshouts`,`caneditownshouts`,`candeleteshouts`,`candeleteownshouts`,`cansubmitshouts`,`canpollvote`,`customtitle`,`canviewinvisible`,`namestyle`,`canpmimportant`,`canviewmodlog`,`isleader`,`cansubmitquotes`,`validatequotes`,`candeletequotes`,`candeleteownquotes`,`canreport`,`canusesearch`,`attachperlink`,`validateattachments`,`caneditownquotes`,`caneditallquotes`,`canviewchat`,`caneditownevents`,`caneditallevents`,`candeleteownevents`,`candeleteevents`,`cansubmitevents`,`validateevents`,`bulkpms`,`issupermod`,`numinv`,`allowugspec`,`validateemails`,`validatesponsorlinks`,`cansubmittags`,`candeletetags`,`cansubmitfeeds`,`validatefeeds`,`validatefeeditems`,`numaliasestot`,`shoutsperday`,`validatetrader`,`renewdays`,`renewtimes`,`canviewownfulltrc`,`canviewallfulltrc` FROM wsnlinks_membergroups WHERE id>0

Load time so far: 0.02 seconds.



Query 5: SELECT `id`,`name`,`links`,`comments`,`time`,`usergroup`,`password`,`ip`,`totalhits`,`totalhitsin`,`email`,`validated`,`template`,`language`,`lastattempt`,`allowemail`,`signature`,`avatarname`,`stylesheet`,`allowuseremail`,`albumid`,`failedattempts`,`totalbytes`,`funds`,`notifyoflinks`,`lastvisit`,`timezone`,`rating`,`pmfolders`,`notifyofpms`,`acceptpms`,`cookieduration`,`banned`,`location`,`homepage`,`occupation`,`bio`,`aim`,`icq`,`msn`,`yahoo`,`inactive`,`timeonline`,`totalpms`,`buddies`,`ignored`,`isonline`,`acceptims`,`adminpermissions`,`referrer`,`groupreverttime`,`grouprevertto`,`moderationpm`,`secondarygroups`,`linksperpage`,`commentsperpage`,`shouts`,`customtitle`,`shoutban`,`topicbans`,`forumbans`,`visibility`,`birthdate`,`lastsession`,`interests`,`posteditor`,`forumaccess`,`pmpopup`,`pmnotify`,`modnotes`,`guestnotes`,`salt`,`lastmodnote`,`newpms`,`imflag`,`orderalbums`,`lastguestnote`,`autosubscribe`,`notifymethod`,`showavatars`,`showsigs`,`warninglevel`,`topics`,`posts`,`chatcolor`,`traderrating`,`invitessent`,`validatedemail`,`calsub`,`macros`,`guestnotify`,`keychecktime`,`notifykeywords`,`autosubscribepost`,`blogrss`,`positivepct`,`notifytrader` FROM wsnlinks_members WHERE id='1' AND validated=1

Load time so far: 0.03 seconds.



Query 6: SELECT `original`,`replacement`,`description`,`id`,`sortorder` FROM wsnlinks_markup WHERE type='smilie' ORDER BY sortorder

Number of rows is 14

Load time so far: 0.03 seconds.



Query 7: SELECT `id`,`title`,`url`,`description`,`rating`,`votes`,`validated`,`catid`,`sumofvotes`,`email`,`time`,`hits`,`numcomments`,`hide`,`ownerid`,`voterips`,`voterids`,`lastedit`,`type`,`notify`,`suspect`,`pendingedit`,`funds`,`suspended`,`alias`,`expire`,`ip`,`inalbum`,`typeorder`,`recipurl`,`hitsin`,`recipwith`,`hitsinips`,`hitsoutips`,`lastcomment`,`related`,`inhidden`,`viewers`,`threadviewers`,`hitsintemp`,`hitsouttemp`,`origtype`,`importance`,`parentids`,`timesdead`,`timesemailed`,`threadclosed`,`threadposters`,`lastposterid`,`lastpostername`,`ownername`,`deleted`,`deletionreason`,`movedto`,`deletedby`,`timevalidated`,`filefield`,`message`,`sticky`,`downloads`,`pollid`,`posticon`,`savedby`,`validatedemail`,`unpaid`,`recipverified`,`effectivetime`,`sugcatid`,`pagerank`,`wysihtml`,`movedid`,`unrevised`,`feedurl`,`feedcache`,`feedcachetime`,`tags`,`xmlsource`,`ordercomments`,`lastpadupdate`,`padfile`,`lastmonthlycheck`,`invisibleto`,`profileurl`,`lastprofileurl`,`timesrenewed`,`timedeleted` FROM wsnlinks_links WHERE id=4

Load time so far: 0.04 seconds.



Query 8: SELECT `id`,`name`,`parent`,`validated`,`description`,`time`,`parentnames`,`parentids`,`numlinks`,`hide`,`lastlinktime`,`custom`,`lastedit`,`moderators`,`headerinfo`,`related`,`numsub`,`type`,`permissions`,`subscribers`,`subscriber`,`mixtypes`,`isalbum`,`orderlinks`,`totalcomments`,`ulsearchmax`,`ulsearchquery`,`ulsearchadult`,`alias`,`catcols`,`linkcols`,`dmozpath`,`sponsorlinks`,`views`,`customwrap`,`deleted`,`reqlinks`,`reqcoms`,`reqlinksdelay`,`priority`,`levelsdeep`,`lastposterid`,`lastpostername`,`lastcommenttime`,`lastthreadid`,`lastthreadtitle`,`linkshere`,`unvalidatedlinks`,`unvalidatedcomments`,`actaslink`,`countposts`,`subcatshtml`,`linksperpage`,`wysihtml`,`numonline`,`sponsorship`,`lastprofileurl`,`defaultnoaccess`,`lastthreadurl`,`lastposturl` FROM wsnlinks_categories WHERE id=1

Load time so far: 0.04 seconds.



Query 9: SELECT `id`,`name`,`parent`,`validated`,`description`,`time`,`parentnames`,`parentids`,`numlinks`,`hide`,`lastlinktime`,`custom`,`lastedit`,`moderators`,`headerinfo`,`related`,`numsub`,`type`,`permissions`,`subscribers`,`subscriber`,`mixtypes`,`isalbum`,`orderlinks`,`totalcomments`,`ulsearchmax`,`ulsearchquery`,`ulsearchadult`,`alias`,`catcols`,`linkcols`,`dmozpath`,`sponsorlinks`,`views`,`customwrap`,`deleted`,`reqlinks`,`reqcoms`,`reqlinksdelay`,`priority`,`levelsdeep`,`lastposterid`,`lastpostername`,`lastcommenttime`,`lastthreadid`,`lastthreadtitle`,`linkshere`,`unvalidatedlinks`,`unvalidatedcomments`,`actaslink`,`countposts`,`subcatshtml`,`linksperpage`,`wysihtml`,`numonline`,`sponsorship`,`lastprofileurl`,`defaultnoaccess`,`lastthreadurl`,`lastposturl` FROM wsnlinks_categories WHERE id=1

Load time so far: 0.04 seconds.



Query 10: SELECT COUNT(id) FROM wsnlinks_attachments WHERE type='link' AND objectid=4

Count is 0

Load time so far: 0.04 seconds.



Query 11: UPDATE wsnlinks_members SET totalbytes='3749471' WHERE id='1'

Command: ffmpeg -i /mypath/test793e.avi -ar 22050 -ab 32 -f flv -s 400x300 - /mypath/test793e.flv ... result is

Command: flvtool2 -U /mypath/test793e.flv /mypath/test793e.flv ... result is

Command: ffmpeg -i /mypath/test793e.flv -vcodec png -vframes 1 -an -f rawvideo -s 400x300 /mypath/preview_test793e.png ... result is

Load time so far: 0.05 seconds.



Query 12: SELECT `id`,`name`,`links`,`comments`,`time`,`usergroup`,`password`,`ip`,`totalhits`,`totalhitsin`,`email`,`validated`,`template`,`language`,`lastattempt`,`allowemail`,`signature`,`avatarname`,`stylesheet`,`allowuseremail`,`albumid`,`failedattempts`,`totalbytes`,`funds`,`notifyoflinks`,`lastvisit`,`timezone`,`rating`,`pmfolders`,`notifyofpms`,`acceptpms`,`cookieduration`,`banned`,`location`,`homepage`,`occupation`,`bio`,`aim`,`icq`,`msn`,`yahoo`,`inactive`,`timeonline`,`totalpms`,`buddies`,`ignored`,`isonline`,`acceptims`,`adminpermissions`,`referrer`,`groupreverttime`,`grouprevertto`,`moderationpm`,`secondarygroups`,`linksperpage`,`commentsperpage`,`shouts`,`customtitle`,`shoutban`,`topicbans`,`forumbans`,`visibility`,`birthdate`,`lastsession`,`interests`,`posteditor`,`forumaccess`,`pmpopup`,`pmnotify`,`modnotes`,`guestnotes`,`salt`,`lastmodnote`,`newpms`,`imflag`,`orderalbums`,`lastguestnote`,`autosubscribe`,`notifymethod`,`showavatars`,`showsigs`,`warninglevel`,`topics`,`posts`,`chatcolor`,`traderrating`,`invitessent`,`validatedemail`,`calsub`,`macros`,`guestnotify`,`keychecktime`,`notifykeywords`,`autosubscribepost`,`blogrss`,`positivepct`,`notifytrader` FROM wsnlinks_members WHERE id='1'

Number of rows is 1

Load time so far: 0.05 seconds.



Query 13: UPDATE wsnlinks_members SET totalbytes='3749471' WHERE id='1'

Query 14: INSERT INTO wsnlinks_attachments(`type`,`objectid`,`filename`,`filetitle`,`filesize`,`width`,`height`,`memberid`,`time`,`deleted`,`field`,`downloads`,`validated`,`ownerip`,`catid`,`importurl`) VALUES('link','4','test793e.flv','test.flv','','','','1','1198956778','','','','1','207.81.99.70','1','')

Load time so far: 0.05 seconds.



Query 15: UPDATE wsnlinks_links SET filefield='1' WHERE id=4

Load time so far: 0.05 seconds.



Query 16: SELECT COUNT(id) FROM wsnlinks_links WHERE alias=4 AND validated=1

Count is 0

Load time so far: 0.07 seconds.



Query 17: SELECT `id`,`type`,`objectid`,`filename`,`filetitle`,`filesize`,`width`,`height`,`memberid`,`time`,`deleted`,`field`,`downloads`,`validated`,`ownerip`,`catid`,`importurl` FROM wsnlinks_attachments WHERE type='link' AND objectid=4 ORDER BY time ASC

Number of rows is 1

Load time so far: 0.08 seconds.



Query 18: SELECT `catid` FROM wsnlinks_links WHERE alias=4 ORDER BY catid ASC

Number of rows is 0

Load time so far: 0.09 seconds.



Query 19: SELECT `value` FROM wsnlinks_switches WHERE name='ims'
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Dec 29, 2007 - 9:19 PM:

Rob Dalzell wrote:
Command: ffmpeg -i /mypath/test793e.avi -ar 22050 -ab 32 -f flv -s 400x300 - /mypath/test793e.flv ... result is

Command: flvtool2 -U /mypath/test793e.flv /mypath/test793e.flv ... result is

Command: ffmpeg -i /mypath/test793e.flv -vcodec png -vframes 1 -an -f rawvideo -s 400x300 /mypath/preview_test793e.png ... result is


No errors shown there. If
ffmpeg -i /mypath/test793e.avi -ar 22050 -ab 32 -f flv -s 400x300 - /mypath/test793e.flv
works for you from a shell but not in PHP that means you have a PHP configuration which is somehow not allowing shell commands, though that should still normally thow a warning saying so. Perhaps there's some form of error suppression which debug mode doesn't turn off. If so, the issue could also be a silent file size restiction error because of php.ini not allowing any file bigger than x megabytes.

Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.