jordana309
30th October 2011, 01:01
I'm trying to encode videos from DV to H.264 to play through Flash. The videos are originally 720x480, at about 30Mbit/sec. The problem is that when I tried to encode it down to 12 or even 10 Mbs using Apple Compressor, the quality was so bad I couldn't use it. I turned to x264 through MeGUI. I encoded down to 10Mbps and then again to 7Mbps when I found the overall playback speed was no better in Flash. I don't think that I can drop below 7 and still have it good enough quality.
I feed MeGUI an avs file with the following in it:
#Import Video and Audio, then resize the video to the exact dimensions of the host screen so Flash won't have to scale it.
sound = FFAudioSource("VideoInDVCFormat.mov")
vid = FFVideoSource("VideoInDVCFormat.mov").BilinearResize(1360,768)
#Combine them
AudioDub(vid,sound)
#x264 needs it in YV12, so convert it
ConvertToYV12()
Then, I use the following arguments into x264 (as shown in MeGUI):
program --level 4.1 --preset slower --tune film --pass 3 --bitrate 5000 --stats ".stats" --deblock 1:3 --keyint 96 --min-keyint 24 --qpmin 5 --qpmax 40 --vbv-bufsize 4500 --vbv-maxrate 6500 --output "output" "input"
I'm not completely new to x264 usage, but I'm no expert either. I then exported the audio as an AAC at 160kbps, then combined the two through QuickTime 7.
Finally, I took that over to my Adobe AIR program running on a Mac Mini (2.4GHz, dual core Intel Core 2 Duo, 2GB 1067 DDR3 RAM, and a 256MB NVidia 320M graphics card), and both the 10 and 7 ran with latency, dropping several frames about every 2 seconds.
Now, the odd thing is that a video with 7.022Mbps at 30fps at 1280x800 rand just fine through this same program.
Does anybody know how I might optimize this video to play through flash? That's the main question. Sorry to bog you down with too many details...I feel like I've tried everything...
I feed MeGUI an avs file with the following in it:
#Import Video and Audio, then resize the video to the exact dimensions of the host screen so Flash won't have to scale it.
sound = FFAudioSource("VideoInDVCFormat.mov")
vid = FFVideoSource("VideoInDVCFormat.mov").BilinearResize(1360,768)
#Combine them
AudioDub(vid,sound)
#x264 needs it in YV12, so convert it
ConvertToYV12()
Then, I use the following arguments into x264 (as shown in MeGUI):
program --level 4.1 --preset slower --tune film --pass 3 --bitrate 5000 --stats ".stats" --deblock 1:3 --keyint 96 --min-keyint 24 --qpmin 5 --qpmax 40 --vbv-bufsize 4500 --vbv-maxrate 6500 --output "output" "input"
I'm not completely new to x264 usage, but I'm no expert either. I then exported the audio as an AAC at 160kbps, then combined the two through QuickTime 7.
Finally, I took that over to my Adobe AIR program running on a Mac Mini (2.4GHz, dual core Intel Core 2 Duo, 2GB 1067 DDR3 RAM, and a 256MB NVidia 320M graphics card), and both the 10 and 7 ran with latency, dropping several frames about every 2 seconds.
Now, the odd thing is that a video with 7.022Mbps at 30fps at 1280x800 rand just fine through this same program.
Does anybody know how I might optimize this video to play through flash? That's the main question. Sorry to bog you down with too many details...I feel like I've tried everything...