I have a fully working method where a user uploads the video, then a thumbnail is generator along with 2 version of the video one high quality and one medium. But when a video is converted by FFmpeg to .mp4 it locates the meta at the end of the .mp4 video
file, this doesnt let a flash player stream the video while it is buffering. There is a soulition of course but it needs to start when the video conversion is done. So i have this
string video = Page.MapPath("/media/uploads/video/original/" + filename); // setting video input name with path
string thumb = Page.MapPath("/media/uploads/video/") + filename + ".jpg"; // thumb name with path !
string mpg = Page.MapPath("/media/uploads/video/") + filename + ".mp4"; // video name with path !
string mpgMedium = Page.MapPath("/media/uploads/video/") + "MEDIUM_" + filename + ".mp4"; // video name with path !
Process ffmpeg; // creating process
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -s 1280*720 -ss 15 -vframes 10 -f image2 -vcodec mjpeg \"" + thumb + "\""; // arguments !
ffmpeg.StartInfo.FileName = Page.MapPath("/cma/uploadvideo/ffmpeg.exe");
ffmpeg.Start(); // start !
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -b 5000000 \"" + mpg + "\""; // arguments !
ffmpeg.StartInfo.FileName = Page.MapPath("/cma/uploadvideo/ffmpeg.exe");
ffmpeg.Start(); // start !
ffmpeg = new Process();
ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -b 2000000 -s 640x360 \"" + mpgMedium + "\""; // arguments !
ffmpeg.StartInfo.FileName = Page.MapPath("/cma/uploadvideo/ffmpeg.exe");
ffmpeg.Start(); // start !
My question is, how do I run the second process where the qt-faststart tool relocates the meta from the end of the video to the start after the video is done converting?
BrotherBewar
Member
15 Points
51 Posts
Run a second process after the first process is 100% complete (qt-faststart & FFmpeg)
Jul 24, 2012 07:45 AM|LINK
Hi,
I have a fully working method where a user uploads the video, then a thumbnail is generator along with 2 version of the video one high quality and one medium. But when a video is converted by FFmpeg to .mp4 it locates the meta at the end of the .mp4 video file, this doesnt let a flash player stream the video while it is buffering. There is a soulition of course but it needs to start when the video conversion is done. So i have this
string video = Page.MapPath("/media/uploads/video/original/" + filename); // setting video input name with path string thumb = Page.MapPath("/media/uploads/video/") + filename + ".jpg"; // thumb name with path ! string mpg = Page.MapPath("/media/uploads/video/") + filename + ".mp4"; // video name with path ! string mpgMedium = Page.MapPath("/media/uploads/video/") + "MEDIUM_" + filename + ".mp4"; // video name with path ! Process ffmpeg; // creating process ffmpeg = new Process(); ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -s 1280*720 -ss 15 -vframes 10 -f image2 -vcodec mjpeg \"" + thumb + "\""; // arguments ! ffmpeg.StartInfo.FileName = Page.MapPath("/cma/uploadvideo/ffmpeg.exe"); ffmpeg.Start(); // start ! ffmpeg = new Process(); ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -b 5000000 \"" + mpg + "\""; // arguments ! ffmpeg.StartInfo.FileName = Page.MapPath("/cma/uploadvideo/ffmpeg.exe"); ffmpeg.Start(); // start ! ffmpeg = new Process(); ffmpeg.StartInfo.Arguments = " -i \"" + video + "\" -b 2000000 -s 640x360 \"" + mpgMedium + "\""; // arguments ! ffmpeg.StartInfo.FileName = Page.MapPath("/cma/uploadvideo/ffmpeg.exe"); ffmpeg.Start(); // start !My question is, how do I run the second process where the qt-faststart tool relocates the meta from the end of the video to the start after the video is done converting?
here is some info about qt-faststart http://multimedia.cx/eggs/improving-qt-faststart/
Any help would be great, thank you!
BrotherBewar
Member
15 Points
51 Posts
Re: Run a second process after the first process is 100% complete (qt-faststart & FFmpeg)
Jul 24, 2012 08:12 AM|LINK
Can i work something out with?
BrotherBewar
Member
15 Points
51 Posts
Re: Run a second process after the first process is 100% complete (qt-faststart & FFmpeg)
Jul 24, 2012 08:16 AM|LINK