views:

104

answers:

2

I'm writing software which is demonstraiting video on demand service. One of the feature is something similiar to IIS Smooth Streaming - I want to adjust quality to the bandwith of the client. My idea is, to split single movie into many, let's say - 2 seconds parts, in different qualities and then send it to the client and play them. The point is that for example first part can be in very high quality, and second in really poor (if the bandwith seems to be poor). The question is - do you know any software that allows me to cut movies precisly? For example ffmpeg splits movies in a way that join is visible and really annoying (seconds are the measure of precision). I use qt + phonon as a player if it matters. Or maybe you know any better way to provide such feature, without splitting movie into parts?

+1  A: 

Are you sure this is a good idea? Checking the bandwidth and switching out clips every two seconds seems like it will only allow you to buffer two seconds into the future at any given point, and unless the client has some Godly connection, it will appear extremely jumpy.

And what about playback, if the user replays the video? Would it recalculate the quality as it replays, or do you build the video file while streaming?

I am not experienced in the field of streaming video, but it seems what I see most often is that the provider has several different quality versions of their video (from extremely low to HD), and they test the user's bandwidth and then stream at an appropriate quality.

(I apologize if I misunderstood the question.)

Corey
Thanks for answer! You're right, but it won't be like checking bandwith every two seconds, it'll be more like prediction based on past. Well, it's experimental project so we wil see how it'll end :)
Łukasz Sowa
+1  A: 

Are you sure ffmpeg's precision is in seconds? Here's an excerpt from the man page:

-t duration

Restrict the transcoded/captured video sequence to the duration specified in seconds. "hh:mm:ss[.xxx]" syntax is also supported.

-ss position

Seek to given time position in seconds. "hh:mm:ss[.xxx]" syntax is also supported.

-itsoffset offset

Set the input time offset in seconds. "[-]hh:mm:ss[.xxx]" syntax is also supported. This option affects all the input files that follow it. The offset is added to the timestamps of the input files. Specifying a positive offset means that the corresponding streams are delayed by 'offset' seconds.

Looks like it supports up to millisecond precision, and since most video is not +1000 frames per second, this would be more than enough precision to accurately seek through any video stream.

amphetamachine
Thanks! I didn't know about it, though I've read through the man - I must have missed it.
Łukasz Sowa