Hi I have been working on a really simple program to play back 1920 x 1080 videos of various length. I have tried the goThreadedVideo which is great for quick loading - but not so for hd playback & ofxQTKitVideoPlayer which is great for HD playback but not so for quick loading.
I have read this thread http://forum.openframeworks.cc/t/threaded-video-player/1335/0 - about goThreadedVideo.
It would seem that it should run with HD…but well I am stuck as to where to begin.
Any suggestions - code examples maybe?
Thanks in advance.
hd video playback is a huge topic. it depends on your operating system, the drivers you’re using, the graphics card you have, what file format you’re using…
what sort of requirement do you have for how fast and how stable playback needs to be? and can you list some more about the hardware and format you’re using?
if things are generally working, but you just want it to be faster/bigger/better, you might need nicer hardware. or you might just need to change the format you’ve used to encoded your videos.
Hi thanks for the reply.
I am developing on osx 10.6.8 on a 2.8 GHz Imac with 2GB ram.
It is very likely that the program will be deployed on something more high spec than this- and most likely I will shift to Lion.
If there is a mac or linux ‘best practice’ for HD playback?
As for the file formats
I have tried a few so far including DVCPRO HD (1080i50) and various H.264 iterations all in .mov
I am format agnostic - whatever way of getting 1080p to smoothly work I will be happy with. Quicktime player has no issues with the playback of any of the files tried so far- but some other programs - such as Quartz Composer, Cinder do drop frames.
Mostly the program wont be doing anything beyond simple playback - changing at most every 10sec without stalling or frames drops
The player will need to be stable enough to work all day without spitting the dummy.
I have also tried using just a single video file looping from say frame 0 to frame 200 then 400 to 800 - yet this still has issues with frame loss and stalling.
So you have a couple chances for bottlenecks on video playback. One possibility would be a processor/gpu bottleneck and the other would be a hard drive bottleneck.
Check the datarate of your files (quicktime player-> window-> show movie inspector). I tend to have the best success if the video data rate is below 40mb/s.
My format of choice for live stuff is Motionjpeg because (as I understand it…someone can hopefully correct me) it replies mostly on reading from the disk and very little de-compression on the cpu/gpu…it’s just pulling those frames straight off the disk…so make sure you have a nice 7200rpm drive. You can even drop the quality to like 30-40% and end up with good looking stuff…I usually play with this at a datarate of 15-25mb/s
h264 can be fairly difficult to work with in any kind of live situation. it doesn’t let you skip around very easily because all of the image compression going on. It’s saving keyframes and then interpolation between them, so it has a lot more work to do to show you that image compared to motionjpeg/photojpeg. Using h264 would explain the issues you’re having with looping…it just doesn’t like to be skipping around inside
I’ve heard that AIC (apple intermediate codec) is a good middleground for the two…it sort of splits the difference between disk heavy and processor intensive, but I haven’t completely verified that
Stay away from entirely disk heavy codecs like Animation because you can easily end up with datarates in the 100mb/s+ range which a lot of drives will have trouble even playing back in quicktime
laserpilot/blair does a ton of video work, so i’d trust his recommendation of photojpeg
mjpeg is also great for scrubbing on the timeline, basically one of very few codecs you can use as a VJ.
the only thing I’m not so sure about is that the animation codec is so disc heavy - I always thought for codec-appropriate content (i.e. graphics, comics, lines, vector art, stuff that probably comes up in of a lot) it was good (and additionally opacity-able). Not for video, of course, but that’s not what it’s for. I don’t have (recent) personal experience with it, though.
Great thanks for all the help. I will play around with the formats and see how that goes.