User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Annoying 'bump' when looping video

  1. #1
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Annoying 'bump' when looping video

    I'm using the Direct show object to have an animated background in one of my games. The movie is about 4 seconds long, and every time it loops back, there is a quick, but very noticeable pause. Is there any way to get rid of it?

    BTW, I know the pause is not in the video file itself.

  2. #2
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Annoying 'bump' when looping video

    Try playing the video in Windows Media player and see if the loop exhibits the same problem. I know if you play a sound file in Windows Media Player the gap on the loop exists.

    The Direct show object is just a shell for Windows Media Player so if it can't loop seamlessly then either will Direct Show.

    If Microsoft has fixed Windows Media Player then we will need to rebuild Direct Show and see if it improves.

    Another option is to use some of the other video playing extensions to see if they work better for you.

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Annoying 'bump' when looping video

    Yea windows media player has the bump too.

    I can't use any of the other video extensions, because I'm using the direct show object to play videos in the background, and I don't know if you can do that in the other extensions.

    Well I was using a video file for 2 reasons:
    1. It would save disk space, as opposed to loading the whole thing into an active object.
    2. It would play a lot faster. I assume an active object wouldn't be able to play a 4 second 1024x768 animation at 15 fps without slowing things down.

    Does anybody have any suggestions as to what I should do to have an animated background in my game? Well it's not really a background, its really just an animation of water flowing, so you can put that behind a picture where the 'river' is alpha 0, so the water flowing animation is only visible in the 'river'.

    Would the looping 'bump' be reduced if I cut the resolution in half?

    Also that brings up another question, if I use the 'stretch' funtion in the direct show object, does that slow it down if it is stretching to 200% (as opposed to some weird number like 234%)?

  4. #4
    Clickteam Clickteam
    Jeff's Avatar
    Join Date
    Jun 2006
    Location
    Battle Ground Washington
    Posts
    11,825
    Mentioned
    8 Post(s)
    Tagged
    2 Thread(s)

    Re: Annoying 'bump' when looping video

    Ya that would be a problem.

    We need to get some new video extensions made sometime to do some fancy things like that.

  5. #5
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Annoying 'bump' when looping video

    Oh my gosh I feel like such an ass. Guess what the problem was... It was something that was in the file itself. But what I can't figure out is how it got there. It just randomly started repeating frames.

    EDIT: Ok this is really starting to piss me off. It seems fine in it's lossless state, but as soon as I compress it (using Xvid) it just throws out the first few frames, and replaces them with copies it seems.

  6. #6
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Annoying 'bump' when looping video

    Try compressing it in VirtualDub and beware of using non-standard codecs (AKA ones which your end user may not have).
    .:::.Joshtek.:::.

  7. #7
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    2,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Annoying 'bump' when looping video

    read how codecs make files smaller, they cut out parts you cant see or hear and reproduce the sounds in a lossy way. Also there is more processing time used, that is why MP3 loops lag a bit after they have played before looping, they use more CPU as well.
    XVid is the codec mainly used by fake movies and pirated videos, so is divx. divx is more widely spread than xvid but I dont have the codec for either, nor am I willing to get either just for 1 game that needs them

  8. #8
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Annoying 'bump' when looping video

    Quote Originally Posted by neat_Kliker2
    XVid is the codec mainly used by fake movies and pirated videos, so is divx. divx is more widely spread than xvid but I dont have the codec for either, nor am I willing to get either just for 1 game that needs them
    While it's true that the old version of DivX, 3.11, was based on a hack of Microsoft's MPEG-4 codec, it has been completely reworked since then, and is a perfectly legitimate and legal codec. XviD was based on an older version of DivX, but is an open source alternative, and has been reworked in order to remove any potentially borrowed code over the years. The reason that you probably associate them with pirated videos is that they are used to encode the majority of all videos on the internet right now. They are, hands down, the best codecs that adhere to the Advanced Simple Profile specifications, which is currently the de-facto standard, although the Advanced Video Coding specifications are gaining momentum. I would be very surprised if your computer didn't have SOME kind of MPEG-4 ASP compatible codec on your computer, and although any of them that fit the format should be able to play back the output of any other, you will get the best quality to filesize ratios by encoding a video with DivX or XviD.
    Oh yes, and compressed videos require substantially less processing power to play than uncompressed ones.

    Quote Originally Posted by LazyCoder
    EDIT: Ok this is really starting to piss me off. It seems fine in it's lossless state, but as soon as I compress it (using Xvid) it just throws out the first few frames, and replaces them with copies it seems.
    Try disabling the B-Frames. In the Profile @ Level more... options section, uncheck the B-VOPs box. B-Frames are a great idea when it comes to compression, as they reference the content of the frame before and the frame after the current one in order to make things smaller, but it does come at the cost of making the first frame or so unplayable (I forget the exact technical reason).

    Also, another part of the problem may be using VirtualDub itself. It's been a while for me, but I think it still has a bug where the last frame encoded to is actually the frame before the last one selected, so make sure the slidebar is all the way at the end if you're selecting only part of the clip to encode. And I'm fairly certain that stretching a 512x384 animation by 200% so that it fits your 1024x768 game will play back significantly faster than having the video itself be 1024x768, as well as result in a smaller file. Part of your lag problem may come from the fact that although the processing requirements of ASP codecs like DivX and XviD are fairly low, 1024x768 is an incredibly high resolution for a video. Stretching to bizarre percentages shouldn't affect things too greatly, although it helps if your original video size and desired, stretched size are both multiples of 8.

    One last thing before I end the rant that dug me up from the grave:
    Quote Originally Posted by Jeff
    The Direct show object is just a shell for Windows Media Player so if it can't loop seamlessly then either will Direct Show.
    I don't know about the DirectShow object specifically, but Windows Media Player is a DirectShow based player, not the other way around. You can actually play back the exact same content (minus DRM-enabled files and other changes to the .WMV container) in Windows Media Player 6.4 as you can in whatever the newest version is now, or any other DirectShow based player (which is most of them, VLC being a notable exception.

  9. #9
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jul 2006
    Posts
    2,023
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Annoying 'bump' when looping video

    "While it's true that the old version of DivX, 3.11, was based on a hack of Microsoft's MPEG-4 codec"
    DivX was created way before MS used MPEG-4, back in the late 90's by hackers because they could compress movies lots and send files over the internet faster and still have good video quality. It was then taken over by the current DivX owner, they now sell it instead of giving it away for free, well except the free edition.

    "Oh yes, and compressed videos require substantially less processing power to play than uncompressed ones."
    pfff, rubbish. WAVs go right to the soundcard, MP3s have to be converted from the compressed state to an audio form of data, which uses quite a bit of processing power, this is then sent the audio card. Compressed uses MORE CPU than uncompressed.
    To prove you were wrong, I played the same file in MP3 and WAV in winamp. The MP3 used 13% CPU averagely, the WAV used 3% averagely. Same sample rate, althouth MP3 was at 128KBPS so its not nearly as good as WAV, this is also why using my old lappy + my MMF winamp controller, I can get about 3 hours of standby time, 2 hours of playing from CD / WAV and about 50 minutes playing from MP3

  10. #10
    No Products Registered

    Join Date
    Jul 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Annoying 'bump' when looping video

    Quote Originally Posted by neat_Kliker2
    To prove you were wrong, I played the same file in MP3 and WAV in winamp. The MP3 used 13% CPU averagely, the WAV used 3% averagely. Same sample rate, althouth MP3 was at 128KBPS so its not nearly as good as WAV, this is also why using my old lappy + my MMF winamp controller, I can get about 3 hours of standby time, 2 hours of playing from CD / WAV and about 50 minutes playing from MP3
    MP3 compression and video compression are significantly different things, though. Uncompressed video (640x480, 29.97fps) takes up an extraordinary amount of HD space (about 10GB for 25 minutes), whereas that same video compressed even minimally would be about 300MB. The sheer amount of data that has to be read for an entire image 30 times a second is staggering, whereas with compression a computer only has to read in the changes from the previous frame, and even keyframes aren't stored in their bitmap-entirety. So I suppose, technically, uncompressed video may use less CPU, but it will certainly be laggier to play back due to other bottlenecks.

    Also, back to the original topic at hand, what resolution is the source file you're trying to compress? I find it somewhat surprising that the original material was recorded at 1024x768 and not upscaled in some fashion.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Video Looping (As an active object)
    By darkmanx_429 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 27th March 2012, 06:01 PM
  2. Help with SQL Server object, please don't bump!
    By MikeB in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 22nd April 2009, 03:44 PM
  3. Level editor - I ran into a bump
    By LB in forum File Archive
    Replies: 0
    Last Post: 13th December 2008, 08:54 PM
  4. Looping Video
    By DJFuego in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 16th April 2007, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •