Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
xit-vono

I need help with viddump

Recommended Posts

Ok, so I think I need oggenc2, x264 and mkvmerge. I tried to download these and make a video, but I think there is a problem with x264. Whenever I download it I end up with a file that has 0 kb. I also have no idea if I'm doing the right thing with the other 2 files. I am trying this on a brand new windows computer.

Share this post


Link to post

I'd recommend using ffmpeg rather than the separate oggenc2, x264, and mkvmerge executables. There's a script and a version of ffmpeg linked in this guide, under the "Viddumping" section. In dsda-doom and recent versions of PrBoom+ (the UMAPINFO fork), the default config already uses ffmpeg, but if you're using an older version of PrBoom+, you'll need to edit your config to look something like this:

# Video capture encoding settings
cap_soundcommand                  "ffmpeg -f s16le -ar %s -ac 2 -i - -c:a libopus -y temp_a.nut"
cap_videocommand                  "ffmpeg -f rawvideo -pix_fmt rgb24 -r %r -s %wx%h -i - -c:v libx264 -y temp_v.nut"
cap_muxcommand                    "ffmpeg -i temp_v.nut -i temp_a.nut -c copy -y %f"
cap_tempfile1                     "temp_a.nut"
cap_tempfile2                     "temp_v.nut"
cap_remove_tempfiles              1
cap_fps                           60

(these are the defaults for dsda-doom)

Share this post


Link to post

I'm gonna need more help than this. I downloaded those 2 files, and then put them in my doom folder. I tried to use the batch file, but it doesn't do anything, so I just used the command line instead, something like glboom-plus -timedemo xxx -viddump xxx.mp4

I'm assuming that if it's not playing back slow and choppy with no sound, then it's not working. Do I need to do something else to set it up?

Share this post


Link to post

That script is for dsda-doom, edit it to target glboom-plus and drag your demo file onto it.

Share this post


Link to post

Ok that would explain why the batch file did nothing. I still have the problem that it's not making a video file.

Share this post


Link to post

@Shepardus Is it possible to use something like constant rate factor or constant quality with ffmpeg?  I have been using PRBoom+UMAPINFO default settings and I'd like to get some better quality.

Share this post


Link to post
21 minutes ago, VanaheimRanger said:

@Shepardus Is it possible to use something like constant rate factor or constant quality with ffmpeg?  I have been using PRBoom+UMAPINFO default settings and I'd like to get some better quality.

ffmpeg has a lot of features and is widely used, so I imagine it would have such capability. However, I'm not familiar with what flags you would use; you could probably check the ffmpeg documentation or Google around for answers.

 

1 hour ago, xit-vono said:

Ok that would explain why the batch file did nothing. I still have the problem that it's not making a video file.

Using viddump produces several text files in the dsda-doom/PrBoom+ directory with the command-line output of the commands used to produce the video. For cap_videocommand they're video_stdout.txt and video_stderr.txt, for cap_soundcommand they're sound_stdout.txt and sound_stderr.txt, and for cap_muxcommand they're mux_stdout.txt and mux_stderr.txt. If you have these, they may contain useful information about what went wrong.

Share this post


Link to post

I could only find one of those txt files. It's kinda long so here's the end of it which has some error messages I think.

 

I_CapturePrep: malformed command ffmpeg -f rawvideo -pix_fmt rgb24 -r %r -s %wx%h -i - -c:v libx264 -y temp_v.nut
ST_Init: Init status bar.
G_DoPlayDemo: playing demo with Doom/Doom2 v1.9 compatibility
vorb_registersong: failed
mad_registersong failed: input buffer too small (or EOF)
db_registersong: couldn't load as tracker
Exp_RegisterSongEx: Using player fluidsynth midi player
P_GetNodesVersion: using normal BSP nodes
vorb_registersong: failed
mad_registersong failed: input buffer too small (or EOF)
db_registersong: couldn't load as tracker
Exp_RegisterSongEx: Using player fluidsynth midi player
Timed 3224 gametics in 1970 realtics = 57.3 frames per second
I_ShutdownSound: 
 

Share this post


Link to post

Hmm, that first line means that it failed to parse cap_videocommand and gave up on the viddumping.

 

The command itself looks correct, but when I pasted the error message you shared into a text editor, I found that there was an invisible character between the "r" and "a" of "rawvideo". I'm not sure if this is also present in your config file or if it just appeared in the process of sharing it here, but it's the only idea I have as to what could be wrong. Just to be sure, could you re-copy the commands into your config from here? https://github.com/coelckers/prboom-plus/blob/master/prboom2/doc/prboom-plus-usage.txt#L362

Share this post


Link to post

I'm a bit confused by this part of the command line -i - -c:v It looks like there's a minus sign that isn't followed by anything, which is not standard. Is that part wrong?

No evidence of an extra space in my settings.

 

Share this post


Link to post

I redid that segment, both by typing manually, then copying from the text you gave me, and got the same result.

 

Share this post


Link to post

The "-i -" is intentional, "-i" specifies the input source and using "-" with it means to read from standard input.

 

I'm out of ideas on that front. We could still try using the three-executables method, though. I still have the exes from my old PrBoom+ folder lying around, so I uploaded them for you here. This is the config I used with them (I remember having some issues with the defaults):

# Video capture encoding settings
cap_soundcommand          "oggenc2 -r -R %s -q 5 - -o output.ogg"
cap_videocommand          "x264 -o output.flv --crf 22 --muxer flv --demuxer raw --input-csp rgb --input-depth 8 --input-res %wx%h --fps 60 -"
cap_muxcommand            "mkvmerge -o %f output.flv output.ogg"
cap_tempfile1             "output.ogg"
cap_tempfile2             "output.flv"
cap_remove_tempfiles          1
cap_fps                      60

 

Share this post


Link to post

Ok it made a video on the first try, but the sound and video don't play at the same rate. I used lv17-123 as a test and it showed the player finishing in about 48 seconds while the sound lasted about as long as expected.

Share this post


Link to post

Oh, are you using capped framerate (35fps)? My old config pasted above had the framerate hardcoded to 60, and playing a 1:23 demo at 60/35 its intended rate would be just about 48 seconds. If you're using 35fps, change cap_fps to 35, and "--fps 60" in cap_videocommand to "--fps 35" (you should also be able to put %r instead of a number and PrBoom+ would substitute it with the value of cap_fps, but IIRC I had an issue with doing so which is why I replaced that with a hardcoded number).

Share this post


Link to post
4 hours ago, xit-vono said:

I'm a bit confused by this part of the command line -i - -c:v It looks like there's a minus sign that isn't followed by anything, which is not standard. Is that part wrong?

That's the typical syntax to specify that the input comes from stdin rather than a file.

Share this post


Link to post

I didn't find cap_fps, but I changed the --fps 60 to --fps 35 which seemed to do the trick. I will upload a video right now, so you can watch it if you want. Everything seems to be working.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×