Video acceleration

This is a discussion on Video acceleration within the Tech Board forums, part of the Community Boards category; Hi; this is a strange and probably easy question but what is the most accepted method of accelerating video? By ...

  1. #1
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875

    Video acceleration

    Hi; this is a strange and probably easy question but what is the most accepted method of accelerating video? By this I mean making it run at say twice normal speed. Dropping every Nth frame? Or am I thinking too low-level? The situation is this: I just returned from a trip with a lot of video of something a group of people have done. The video has already been culled for "good" parts and assembled into a video for all to see...how I want to take a bunch of the out-takes, make them go at a faster speed (mostly for comedic effect), set it to music for a kind of "gag reel" which is 100% physical, no audio (which is why dialogue, etc are not a problem for the acceleration).

    Tks in advance...
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,412
    Well, most video editing software should have the ability to do what you require. As far as I now this is simply done by accelerating play speed. The API will then decide if it needs to drop frames or not, depending on your default speed fps.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    Mario; I don't doubt that..and I have a number of video-editing packages but since I am not a pro video editor, I don't know really which tool (within any given editors toolset) to use. I have gone through every menu on every app looking for the rather abstract idea of "play faster" or "play X times faster" or anything to do with playback speed and not finding it (although finding 100's of other editing tricks/filters/tools). Thus I am assuming that the tool is being expressed in terms that someone accustomed to video editing would know (for example, "increase fooby factor" where "fooby" is a term folks schooled in video editing would know). Mind you what you suggested is available in every *playback* tool, I have not seen where to control it at the media-generation step...
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,412
    Well, the generic term is "fast forward". You should also check your video editing tool clip context menu for a speed option. Anything in terms of speed should be dealt with on an Effects menu, or the clip context menu for most video editing software, i guess.

    But if you come up with a video editing tool name, it's probably easier to tell you how you can do it, or if you can do it.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    AVIDemux, Open Movie Editor, OpenShot Movie editor, KDEnlive, Kino, Pitivi Movie Editor are the ones I have looked at.

    "Fast Forward" was not located on any of them (but was on every playback tool so to me "fast forward" is more likely a user-level feature and not an editor-level feature). I have seen a great number of features/tools that have no meaning for me (ie Node Compositing, Sobel, K-Means clustering, etc) but then as I said above, I am a newbie at this. I have done simple sequence editing, titling, some composition, audio sync stuff but nothing that altered something as fundamental as altering the default playback speed. Also like I said, the only thing I could come up with is something like "remove every nth frame" but suspect there is a more graceful way of doing it.
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  6. #6
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    OK This thread can be closed, found out how to do it.KDEnlive has a clip tool for increasing/controlling playback speed...I was simply looking in the transitions and effects menus. I know I am going the long way around the block but I can pull in a clip now, set the playback speed to <whatever> percent, render it to .M2T, use WinFF to convert it back to .AVI and finally use AVIDemux (simplest editor *ever*) to replace the audio track with my normal speed Benny Hill music. If I messed with KDEnlive long enough I could probably do it all in that tool but since this is a one-off project, I can do it this way and know I will be done by the next coffee break.
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  7. #7
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,236
    Quote Originally Posted by jeffcobb View Post
    OK This thread can be closed, found out how to do it.KDEnlive has a clip tool for increasing/controlling playback speed...I was simply looking in the transitions and effects menus. I know I am going the long way around the block but I can pull in a clip now, set the playback speed to <whatever> percent, render it to .M2T, use WinFF to convert it back to .AVI and finally use AVIDemux (simplest editor *ever*) to replace the audio track with my normal speed Benny Hill music. If I messed with KDEnlive long enough I could probably do it all in that tool but since this is a one-off project, I can do it this way and know I will be done by the next coffee break.
    That sounds like a pretty lossy method for frame downconversion. What you really want to do is interpolate the motion vectors and then recode the frames from the interpolated mvecs. Obviously, not trivial, but tools exist to do it. Decoding/recoding will lose a lot of quality.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  8. #8
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,450
    But then again, simply forcing a specified fps using a container like matroska should work? Never tried it, but the theory supports it...
    EDIT: Heh. Actually, the solution is simple.
    Use mkvtoolnix and when muxing, in the video options, set your desired FPS. Done. Lossless.
    Last edited by Elysia; 01-25-2010 at 03:16 PM.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #9
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    Quote Originally Posted by brewbuck View Post
    That sounds like a pretty lossy method for frame downconversion. What you really want to do is interpolate the motion vectors and then recode the frames from the interpolated mvecs. Obviously, not trivial, but tools exist to do it. Decoding/recoding will lose a lot of quality.
    Brew: like I said this was just a one-off project and getting it done quickly was more important than any video quality, particularly since the video was being accelerated to something like 400 pct. It got the job done and the job was really little more than something goofy I did for some friends. If this were to be on a DVD or something where people will care about video quality I would search for a more elegant solution but since this will at the end of the day just be some flash video, who cares? ^__^
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  10. #10
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,412
    bah. didn't know any of those video tools anyway
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  11. #11
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,236
    Quote Originally Posted by jeffcobb View Post
    Brew: like I said this was just a one-off project and getting it done quickly was more important than any video quality, particularly since the video was being accelerated to something like 400 pct. It got the job done and the job was really little more than something goofy I did for some friends. If this were to be on a DVD or something where people will care about video quality I would search for a more elegant solution but since this will at the end of the day just be some flash video, who cares? ^__^
    Understood, just sayin'.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  12. #12
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    I am not that versed in using the MKV container but initially figured that the overall tactic would be something like this. When it did not immediately pan out, I had to cut my (time) losses and went with the (sorta) easier approach. No biggie. Seriously.
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  13. #13
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,450
    Just saying.
    In case you need to do it again in the future, or if anyone else has a similar problem.
    Mkv is just a container; it's nothing special. It can be played back just as easily as mp4.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem With My Box
    By HaVoX in forum Tech Board
    Replies: 9
    Last Post: 10-15-2005, 07:38 AM
  2. Codec Bitrates?
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-16-2003, 08:39 AM
  3. OpenGL .dll vs video card dll
    By Silvercord in forum Game Programming
    Replies: 14
    Last Post: 02-12-2003, 06:57 PM
  4. Drawing a circle in a video captured frame
    By skyhigh in forum C Programming
    Replies: 2
    Last Post: 12-05-2001, 12:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21