I have an mpg file which I want to convert to flv format, but I have a requirement that while converting the mpg file, I also have to simultaneously play the converted flv file in the flash cs3. How to do it? I am using cs3 and as3.
Asked
Active
Viewed 406 times
0
-
I understand you correctly. You want to watch the movie while you converting it with flash cs3 on your computer? – Larusso May 21 '12 at 05:54
-
Yes ,thats exactly what i want,can u help me? – Vipin Nair May 21 '12 at 05:57
-
Firstly i want to know whether i can convert the movie to other format pragmatically and secondly is there any option to watch the converted movie simultaneously – Vipin Nair May 21 '12 at 05:59
1 Answers
1
If you want to convert your files programmaticly then use ffmpeg. This is a commandline tool which can convert video files to nearly everything. You have to execute ffmpeg with the correct params and wait until the video is ready. This works only on serverside. Means the flash client loads up the video file to the server. There it gets converted. You can execute ffmpeg with any serverside language like php.
Sadly I have no idea if it is possible to watch the video while converting. I think not but maybe someone else knows more.

Larusso
- 1,121
- 8
- 10
-
hi i am running the ffmpeg command for the encoding process but overtime i am getting the error that no such file or directory exits .DO i have to give the complete path while specifying the input? – Vipin Nair May 21 '12 at 08:34
-
ffmpeg uses your current working directory. Are you on windows or a unix machine? You need to check for the case of the filename. If nothing helps try to specify the fullpath for testing. – Larusso May 21 '12 at 08:55
-
Hi Larusso,i have done the part of converting the file to flv and you know what i am also able to play the video dynamically using flash player,but i faced a small issue that the video stuck in between while encoding,have u encountered such an issue earlier? – Vipin Nair May 21 '12 at 09:10
-
-
Maybe you should give the encoder a little time as buffer to convert. I think your playhead is reaching the end of the file and stops for a moment until ffmpeg has encoded the file further. So just wait 10 or 15 sec before starting to play. Hope this helps. Good Luck – Larusso May 21 '12 at 09:46
-
yes you are right ,i waited for 3-4 seconds while encoding and after that i played the video,it worked like charm.Thanks a lot @Larusso,u made my day .cheers :) – Vipin Nair May 21 '12 at 09:52
-
i was wrong even after waiting for 3-4 seconds i am getting a delay while playing the video,i think i have to increase the delay but that will hurt me deeply when the file which is been encoded will be of huge size.Is there any other remedy for it? – Vipin Nair May 22 '12 at 03:56
-
do u know any other encodingtools other than FFMPEG.i want to try other tools also – Vipin Nair May 22 '12 at 10:55
-