
piyusharora420
Members-
Posts
31 -
Joined
-
Last visited
Profile Information
-
Gender
Not Telling
piyusharora420's Achievements

Member (2/5)
0
Reputation
-
Creating Thumbnails From Ffmpeg Hangs Php
piyusharora420 replied to piyusharora420's topic in PHP Coding Help
Thanks for your instant response. could you please explain how I can do this in background? Please explain with example code if possible.- 3 replies
-
- ffmpegshell_exec
- thumbnail
-
(and 2 more)
Tagged with:
-
Hello, I have been working on a php webservice, which receives videos(uploaded) from iphone and upload them to Amazon cloudFront. After uploading videos, I need to generate thumbnails for video from the Amazon link generated. I am using ffmpeg with shell_exec command for it. Here is the code for the same: public function createThumbnail($userId,$fileUrl,$imageName){ //$imageUrl = 'http://184.168.116.177:81/json_api/json/bin/'; if(!is_dir("images/".$userId)){ mkdir("images/".$userId); } // path of installed ffmpeg $ffmpeg = $_SERVER['DOCUMENT_ROOT'] .'bin/ffmpeg'; $cmd = "$ffmpeg -itsoffset -1 -i $fileUrl -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 images/".$userId."/".$imageName; shell_exec($cmd); return "images/".$userId."/".$imageName; } The above code generates the thumbnail, but script does not execute after shell_exec command. So, there is no response sent to iphone end about the thumbnail link. This function works well video is uploaded from web browser of pc. If I comment, shell_exec command, then response is sent to iphone end, but obviousely image is not created. Thanks in advance.
- 3 replies
-
- ffmpegshell_exec
- thumbnail
-
(and 2 more)
Tagged with:
-
Play Videos In Local Video Player When Clicked On The Link.
piyusharora420 replied to piyusharora420's topic in Other
Could you please explain with an example? Sorry for the late reply -
Hello Everyone, I am doing a project where I am uploading user videos to amazon. On a page, user see titles of all the videos uploaded by him/her. These titles are clickable links(linked to amazon cloud). When clicked, it asks for "Open with" or "Save" in firefox. I want to play video in local player(which is available to user in his local machine) when link is clicked. I hope, it makes sense. Thanks in advance.
-
Convert Bytearray Into Video In Php
piyusharora420 replied to piyusharora420's topic in PHP Coding Help
Hi Christian, I can email you the byte array file of a video, if you would like. File size is more than permissible limit. Please let me know your email address. -
Convert Bytearray Into Video In Php
piyusharora420 replied to piyusharora420's topic in PHP Coding Help
Hi Kicken, Thanks for your response. I already have tested with file_put_contents, but it does not seem to be working. I tried to convert a byte array file into video, but did not work. That is the file made by Iphone team from a video. I tried to convert it for testing purpose. So, if that file is not convertable, then data in post will not be converted, I think. Is there any difference b/w data in post or data in a file? I could not send you the file because it's size is 1 mb. I can email you if I can get your email id. Awaiting your response. -
Convert Bytearray Into Video In Php
piyusharora420 replied to piyusharora420's topic in PHP Coding Help
Hi Christian F. I had a discussion with my friend about it, who is working in .NET technology: Piyush: how do you convert byte array to video? Piyush: what are the steps involved? Shashank Awasthy: use the binary stream to read the byte array and then convert to video in C# Shashank Awasthy: made a file from stream Piyush: while writing to file, do you make any changes in encoding or write it as it is? Shashank Awasthy: i just provide the byte array to stream reader and then convert the stream to file Piyush: Ok Is this helpful in any way? I do not have any experience with it in php and also I have no knowledge of C#. -
Hello Everyone, I am stuck in a task to change byteArray to Video in php. I am creating a webservice in php. This service will receive video in byteArray format from iphone and need to convert it back to original video. I mean, webservice will receive byte array from POST. I could not find any way of converting byteArray into video. byteArray datatype does not seem to be supported by php. Any help would be appreciated.
-
Hello Everyone, I have just started playing with cakephp. I baked one database and implemented registration functionality with validations. I wanted to implement login functionality, but could not achieve it. I have gone through the documentation many times but, no success. Can anyone send me link to the very simple tutorial? I have created login.ctp file in view and login function is defined in controller. I don't know what code should I write in that function and what addition/modifications are needed for model part. Thanks in advance
-
Validate date in cakephp using jquery
piyusharora420 replied to piyusharora420's topic in Frameworks
:'( It is showing 28 days for feb 2012 -
Hi, I have baked one table in cakephp. I have got one date field with three dropdowns for month, day and year respectively.I want to change number of days as per the month and year dropdown in real time. I have worked in same situation in case of core php. But, could not understand how this can be achieved in cakephp. Thanks in advance
-
Not able to understand cakephp code format
piyusharora420 replied to piyusharora420's topic in Frameworks
But, I could not understand the benefits of using objects inside objects. Could you please provide me a link where I can see any example? I have gone through the below link: http://www.tuxradar.com/practicalphp/6/6/0 But, it does not explain any benefit. -
Not able to understand cakephp code format
piyusharora420 replied to piyusharora420's topic in Frameworks
Hi Thorpe, Thanks for the response. I think, I have got it. -
Not able to understand cakephp code format
piyusharora420 replied to piyusharora420's topic in Frameworks
Hi, Thanks for the prompt reply. I am afraid, I am still unable to understand it completely. I could not understand "input" in $this->Form->input -
Hello Everyone, I have just started working on cakephp framework. I have seen methods like $this->Form->input. I have not worked ever with such things. I can understand $this->variableName or $this->methodName. But what is meaning of "Form" there? Is this calling object of a class in other class? Thanks in advance