Transport Fever

Transport Fever

Not enough ratings
How to export Debug Camera footage into an mp4 file
By Multiplio
A guide to converting the output of the in-game Debug Camera to an mp4 video. The game produces a folder full of .tga files, which can be converted to mp4 format, but I hadn't found a written guide anywhere so here it is!

All credit on how to do it goes to this guy.
   
Award
Favorite
Favorited
Unfavorite
Creating the film
In order to create a film using the Debug Camera, you will need to enable debug mode in the settings. Once this is done, you can find the camera in the menu in the top right once you are in game.

To make the film, use the GUI to save camera positions in different locations to create the moving camera film. In order to sync it up to the events in game (eg. following trains around), it is is a good idea to save the game and the camera path so you can reload to exactly the same point and have the trains pass at exactly the same place etc.

However, this guide isn't about making the film so I'll just mention the two relevant things:
  • Remember what the framerate of the video is when you record it (you'll need it later)
  • Remember what name you saved the recording as
Requirements
You'll either need ffmpeg[ffmpeg.org] or avconv[libav.org]. Other similar programs will probably work equally well but I'll use these as they're free and simple to use.
Executing the program
Once you've installed ffmpeg or avconv (either is fine), you are ready to create the mp4.

(NOTE: on Windows, you may have to copy the ffmpeg.exe file to the recordings directory shown below and when executing the command, replace "ffmpeg" with "ffmpeg.exe")

Finding the recording
  • Go to your steam folder (.steam on Linux, not sure where on other systems)
  • Go to the userdata folder
  • Go to your steam profile folder (a string of numbers) - if there is multiple ones, choose the one which has a folder inside called 446800
  • Go to 446800/local/recordings
  • Here there should be a folder with the name of your recording followed by lots of numbers
  • Open a command line (on Windows right click and select open command window here) and navigate to the recordings folder

Converting to mp4
  • Enter the command
    ffmpeg -framerate ***FRAMERATE*** -i "***NAME-OF-RECORDING-WITH-DATE***/***NAME-OF-RECORDING***_img-%d.tga" -c:v libx264 -crf 20 -preset medium output.mp4
  • Replace ffmpeg with avconv if using avconv
  • Replace ***FRAMERATE*** with the framerate you recorded with earlier
  • Replace ***NAME-OF-RECORDING-WITH-DATE*** with the name of the folder (the name you saved it as with lots of numbers after it) (eg. unnamedVideo_20190210_140303)
  • Replace ***NAME-OF-RECORDING*** with the name of the folder, but without the numbers after it (eg. unnamedVideo)
  • (Change other things if you understand how it works)
  • Press enter
Conclusion
Yay you did it! Unless it didn't work, in which case ask me in the comments.

As I said, info on how to do it came from here.

Hope this was helpful!

Here is a very short example video I made just as a proof of concept:

https://youtu.be/9aAI3bRABMA
2 Comments
Multiplio  [author] 13 Feb, 2018 @ 3:17pm 
If you are talking about ffmpeg, it is in the bin folder I believe.
cw_315 11 Feb, 2018 @ 11:42am 
where is the application in the folder
I cannot find it