VOGONS


Codec used for captured videos

Topic actions

Reply 20 of 43, by cmw

User metadata
Rank Newbie
Rank
Newbie

I also have the desynch problem. It's strange. The audio will be out of synch, no matter whether it get's decoded by ffdshow or not (if I set uncompressed to disabled, the ffdshow audio symbol won't appear anymore for the videos. I will still have sound, but just as out of synch than with ffdshow decoding it).

It plays perfectly in Virtual Dub though. I have the newest versions of all this stuff, it must be sth. else...

One possibility I tested: I set Haali Media Splitter to handle avi files, but that had no effect, audio/video was still out of synch.

Reply 21 of 43, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I didn't notice anything weird in those videos. I have ffdshow set to NOT be active for raw (uncompressed) video.

I then set ffdshow to be active for raw video, and noticed that the last couple seconds of audio in all 3 videos was cut off (i.e. there was silence during the last 3 seconds or so).

Reply 22 of 43, by cmw

User metadata
Rank Newbie
Rank
Newbie

Hm, i have now set ffdshow to disabled for both raw video and raw audio, the thing is still out of synch. But i noticed with zoom players media info, it states "listed fps = 70, actual fps = 60" ... that would *quite* explain sth...

Reply 23 of 43, by gish

User metadata
Rank Newbie
Rank
Newbie

I just downloaded the latest CVS build with the AVI capture ability. I know that I'm suppose to activate this by pressing CTRl-ALT-F5. When I do this, I can see the Dos Box Comand Window start printing out capture video/sound, etc. When I stop it, I have no idea where the output avi has gone to. I've checked the capture folder and nothing is there. Where is the default place for these AVI's?

Thanks in advance guys!!
gish

Reply 24 of 43, by gish

User metadata
Rank Newbie
Rank
Newbie

Oh nevermind. I was using the D-Fend GUI Front End and I found out the AVI captures were put there instead of the DosBox capture directory.

Anyhow, this is GREAT STUFF. I LOVE this feature!!! Sound synch is fine on my side.

gish

Reply 25 of 43, by cmw

User metadata
Rank Newbie
Rank
Newbie

Hmm, i messed around with VirtualDub a bit. If I set the framerate to like 100 fps and convert to xvid, the video will be speed up very much when played back with VLC, but it will be equally slow as in original (with 70 fps) when playing in windows media player (with ffdshow). Something is not correct here 😉

Reply 26 of 43, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

I made a test recording of running around a town in TES: Arena. First, I have a question for Harekiet: Is there any way it could be made so that it will record the entire output of my sound card and not just DOSBox's sound output? I use an external MIDI synth connected to the line in of my sound card, so I had to switch to emulated Gravis Ultrasound to get good music in my recording.

I used Moe's OpenGLHQ SDL.dll at 640x480 fullscreen, as I'm having trouble with the SDL CVS at the moment. I was able to get it to run extremely smooth with the new rendering optimizations (much smoother than ever before - completely playable at full detail!).

Anyways, I ran around town for a couple minutes and got a 45MB recording:

I first tried playing it in Media Player Classic. FFDShow was not used, but AC3Filter decoded the audio. Video was sharp and smooth, except that it was showing in the wrong aspect (widescreen) due to the 320x200 resolution (I was able to force it to the proper size by forcing 4:3 aspect ratio in Media Player Classic). I also noticed as soon as the music started that the audio was ahead of the video and getting progressively worse. By a minute in, the audio was at least 10 seconds ahead of the video. I noticed that when the progress bar got to the end of the video, it still had a good 30 seconds left to play (which it played without sound, as the sound had already finished).

I also noticed that if I seeked directly to any point in the video, the sound and video would resynchronize at the proper point.

I then tried playing the video in Winamp. The sound and video stayed synchronized throughout the entire playback!

I then used VirtualDub to compress the video to 320kbps (very low) XVID and 48kbps 22050Hz MP3 audio. This resulted in a 6MB file, but the video was very blurry:

Playing it back in Media Player Classic (ffdshow decoding) the only issue I noticed was that the video would hiccup/pause every few seconds. Winamp didn't hiccup at all.

I noticed that the video framerate was just over 70fps, which reminded my of cmw's comments. So, I went back to VirtualDub and recompressed the video, this time telling it to throw away every other frame of video. Now, it plays just fine in both Winamp and Media Player Classic without any noticable loss in smoothness.

Reply 27 of 43, by cmw

User metadata
Rank Newbie
Rank
Newbie

Yes, throw away any other frame (decimate by 2) does the trick. No matter how I do playback it now (ffdshow or not, or which format i convert the video into), the file will play perfectly fine on any player which supports. Since this seems to be an error with capturing, I hope it can be resolved soon.

Best regards, cmw

Reply 28 of 43, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

It's probably not an error in capturing. 70fps may simple be a bit higher than your system can handle. Most video is compressed at much lower rates (25 or 30fps). If your system isn't fast enough to handle the decoding, it will lag.

My site: Ramblings on mostly tech stuff.

Reply 29 of 43, by cmw

User metadata
Rank Newbie
Rank
Newbie

It's hard to believe a Centrino 1.8 Ghz CPU with 1 Gig of Ram isn't capable of displaying video correctly. Apart from that, it CAN be displayed properly (e.G. in Virtual Dub), so it's more likely that it is a problem with the Capturing rather than some other problem...

Reply 30 of 43, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

Check your CPU usage while displaying. VD also drops frames if it is behind when decoding. If it can be displayed correctly in VD, then it's not a capturing problem, but a playback problem. I should know a little bit about this (you can find my name in VD's about box 😀 ). Perhaps whatever playback mechanism you normally use is simply less efficient than VD.

For a simple test, play back the file in VD and open the status window from the options menu. If the "video rendering rate" is less than 70.00, frames are being dropped because your CPU can't keep up. My 3GHz machine is running at about 50% CPU usage when displaying a DOSBox video clip. (A DVD quality DivX clip requires less than 30%).

My site: Ramblings on mostly tech stuff.

Reply 31 of 43, by mirekluza

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I wonder - what about adding an option to DOSBOX.CONF to make a video with fewer frames per second - let's say with every second or third frame...
No need to have so many frames per second...

@Kippesoep: If you are right then it is still not good - the video should be playable on slower computers as well...

Mirek

Reply 32 of 43, by Alkarion

User metadata
Rank Member
Rank
Member

I don't think CPU speed is the issue here. On my 1.3 GHz Pentium M CPU usage never climbed above 20 or 30 percent while playing Dosbox videos in VirtualDub and Media Player Classic respectively.

Reply 33 of 43, by cmw

User metadata
Rank Newbie
Rank
Newbie

CPU usage is below 50% at all time and virtual dub constantly renders 70FPS. It must be something in the way VirtualDub renders when playing, because when i convert it to xvid or sth without checking "through away any other frame", the resulting xvid output will still be out of synch. Any conversion will be out of synch. I tried with converting to h264 AVC to playback on ipod and it's out of synch even there.

Reply 35 of 43, by HunterZ

User metadata
Rank l33t++
Rank
l33t++

Definitely neither CPU usage nor interleaving. It takes only 5% of my CPU to run the video in Media Player Classic, and I reinterleaved it in VirtualDub (took 6 seconds fr a 2 minute video) but had the same problems during playback.

If while playing I do play->filters->video renderer (differs depending on output method in Media Player Classic) I see that it's running at just under 60fps, which is my refresh rate. It seems that Media Player Classic is not capable of dropping frames from video that is recorded at a higher framerate than the current refresh rate.

If I set it to use one of the output modes that can output to 3D textures it seems to be able to drop frames and stay in sync.

My suggestion would be to add an option to DOSBox to allow it to capture only every other frame. This would result in 30-35 fps videos, which is probably good enough and will use less resources while capturing anyways. Just a thought.

BTW, this really neat stuff!

Edit: Regular offscreen plain surfaces seems to drop frames too - I guess it's just the 2D texture surfaces that can't drop frames.

Edit 2: On a hunch I opened DXDIAG and went to more help->override. I noticed that some software had set a DirectX refresh rate override of 85Hz (silly since I now have an LCD as my primary display). After setting it back to "Default" it seems to drop frames properly in 2D texture mode.

Reply 36 of 43, by Harekiet

User metadata
Rank DOSBox Author
Rank
DOSBox Author

well yeh can just change it alter the fps according to the frameskip setting, so if you record with frameskip = 1 you get 35 fps avi's

Reply 37 of 43, by cmw

User metadata
Rank Newbie
Rank
Newbie

Ah, that's the problem. Well, I have no DX Override set or anything, just any setting about my Display I can find says that Refresh Rate is 60, so it seems there is no way for me to "fix" 2D output.

Since it's quite likely that really a lot of people are going to have the same problem, it would be very cool to be able to alter the recording fps. Frameskip 1 is ok for the moment, but it's not exactly a perfect solution. e.g. in Win 3.11 (which seems not to work with newest CVS unless you install svga patch from vasyl) Frameskip 1 will mess up mouse a bit (cursor starts blinking around a bit).

I tried to look for the instruction which says to capture at 70fps in hardware.cpp, but I couldn't find it...

Plz make video capturing a bit more customizeable =)
Apart from that, great stuff, I had one sick idea today. C & C Red Alert Replays 😉

Reply 38 of 43, by Kippesoep

User metadata
Rank Oldbie
Rank
Oldbie

DOSBox runs at 70fps itself. That's why it's capturing at 70fps.

My site: Ramblings on mostly tech stuff.

Reply 39 of 43, by cmw

User metadata
Rank Newbie
Rank
Newbie

Hm, which value do I have to modify in the source so that Dosbox will run with like.... 50 fps for example?

Edit: Frameskip 1 messes all up even more. Video playback is ways too fast then while audio remains behind.