Encoding debugging output into video

For all the help you need with Armagetron!
Post Reply
h3xx
Posts: 4
Joined: Wed Jul 06, 2011 9:32 pm
Contact:

Encoding debugging output into video

Post by h3xx »

I have been trying to encode a video from ArmagetronAD into a common video format like mpeg4, xvid, h.264, etc, but I am having problems figuring out what the video format parameters of the data stream produced when starting Armagetron with the --videoout option are.

Specifically, I am having problems feeding ffmpeg the information so that it can do its encoding.

Code: Select all

$ armagetronad -w --playback ~/.armagetronad/record/2011-0708-1900.rec --videoout >foo.raw
[...]
$ ffmpeg -y -i foo.raw -pix_fmt rgb24 foo.xvid
ffmpeg version N-31299-ga953577, Copyright (c) 2000-2011 the FFmpeg developers
  built on Jul  8 2011 11:41:12 with gcc 4.5.3
  configuration: --prefix=/usr --mandir=/usr/man --libdir=/usr/lib64 --shlibdir=/usr/lib64 --enable-gpl --enable-pthreads --enable-bzlib --enable-libmp3lame --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libxvid --enable-libx264 --enable-libvpx --enable-pic --enable-shared --enable-postproc --enable-avfilter --disable-debug --disable-static --enable-optimizations --enable-sram
  libavutil    51. 11. 0 / 51. 11. 0
  libavcodec   53.  7. 0 / 53.  7. 0
  libavformat  53.  5. 0 / 53.  5. 0
  libavdevice  53.  2. 0 / 53.  2. 0
  libavfilter   2. 24. 3 /  2. 24. 3
  libswscale    2.  0. 0 /  2.  0. 0
  libpostproc  51.  2. 0 / 51.  2. 0
[rawvideo @ 0x625840] Pixel format was not specified and cannot be detected
    Last message repeated 1 times
Input #0, image2, from 'foo.raw':
  Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
    Stream #0.0: Video: rawvideo, 25 tbr, 25 tbn, 25 tbc
[NULL @ 0x61cf20] Unable to find a suitable output format for 'foo.xvid'
If you have some experience with encoding video with ffmpeg (I'm using Linux), please help.

Note: you read that right. Ffmpeg was compiled today. That's true of most days.
h3xx
Posts: 4
Joined: Wed Jul 06, 2011 9:32 pm
Contact:

Re: Encoding debugging output into video

Post by h3xx »

Nevermind. I figured it out:

Code: Select all

$ ffmpeg -y -r 60 -f rawvideo -pix_fmt rgb24 -s 640x480 -i foo.raw foo.avi
Then, you can do things like this:

Code: Select all

armagetronad -w --playback ~/.armagetronad/record/2011-0708-1900.rec --videoout |ffmpeg -y -r 60 -f rawvideo -pix_fmt rgb24 -s 640x480 -i /dev/stdin -vcodec libx264 -vpre lossless_fast foo.avi
and have ffmpeg process the raw video as it is played back. This is probably the best way for encoding a long video unless you have a ton of disk space to spare to hold the raw video output (which comes out at about 2 gigs/minute).
Post Reply