So the project I'm working on has tons of MP4 files already on the server that need to be played in an embedded player. Ideally we'd like to use the JW Player which is already set up for most of the videos. Unfortunately, a lot of the older videos are MPEG-4 encoded and require additional plugins to play in the browser.What I'd like to do is be able to transcode these videos on the fly to a format that JW Player supports, such as H.264. Now, I'm part way there because I can get it to convert the old MP4 files, but I'm having difficulty passing the data directly to the player.This is my current script doing the converting (this is \[code\]media_converted.php\[/code\]):\[code\]<?php error_reporting(0); if (!isset($_GET["MediaName"])) { $_GET["MediaName"] = "GSX238"; } require_once("php/media_center_functions.php"); $MediaURL = ConstructVideoURLInternap($_GET["MediaName"]); header("Content-Transfer-Encoding: binary"); //header('Content-type: video/mp4'); //$calculatedFileSize = filesize($MediaURL); //header("Content-Length: {$calculatedFileSize}"); $cmd = 'ffmpeg -i "'.$MediaURL.'" -vcodec libx264 -acodec copy -f mp4 -moov_size 32000 "_temp/'.time().'_temp.mp4" 2> _temp/media_converter_output.txt'; passthru($cmd);?>\[/code\]I'm trying to take the above file and pass it to the JW Player as the video source: in the JW Player's variable scripting, like so:\[code\]so.addVariable('file','media_converted.php?MediaName=12345');\[/code\]While I believe this should work, it's just not.Even when the conversion seems to work and be sending to the player, it's hard to tell because I think the browser is trying to download the entire file before playing anything. Obviously I can't make the user wait like that.I've looked into qt-faststart, and I was able to use it on my computer to modify the file so that it can start playing while it's being loaded. Unfortunately, this requires two steps. I first have to completely convert the file, then when it's done I have to use qt-faststart.exe on it. Again, this doesn't isn't really an on-the-fly solution. I'm sure there has to be some way to do produce similar results in a single command to be output to the player... right?There is more video data on the server than I currently have space for on my hard drive, so to permanently re-encode each video, even in batches, would be troublesome, because I'd have to download some, convert, reupload, download more, etc. If I have to do that, I will, but I would prefer to leave them as is and be able to transcode on the fly.Any ideas?