Mercurial > hg > aimc
comparison src/Modules/Output/Graphics/Devices/GraphicsOutputDeviceMovie.cc @ 501:a4353a6d8241
Fixed ffmpeg frame-rate bug
author | tomwalters@google.com |
---|---|
date | Tue, 01 May 2012 23:32:24 +0000 |
parents | b106283f812f |
children | 0986e63dd1d7 |
comparison
equal
deleted
inserted
replaced
500:896620d9d539 | 501:a4353a6d8241 |
---|---|
164 strcpy(sCodecOptions, parameters_->GetString("output.ffmpeg_codec_options")); | 164 strcpy(sCodecOptions, parameters_->GetString("output.ffmpeg_codec_options")); |
165 } | 165 } |
166 float frame_rate = global_parameters_->DefaultFloat("frame_rate", -1.0); | 166 float frame_rate = global_parameters_->DefaultFloat("frame_rate", -1.0); |
167 char sCmdLine[1024]; //!\todo check that snprintf does not want a larger buffer | 167 char sCmdLine[1024]; //!\todo check that snprintf does not want a larger buffer |
168 snprintf(sCmdLine, sizeof(sCmdLine)/sizeof(sCmdLine[0]), | 168 snprintf(sCmdLine, sizeof(sCmdLine)/sizeof(sCmdLine[0]), |
169 "%s -y -i \"%s\" -i \"%s%%06d.png\" " | 169 "%s -y -i \"%s\" -r %.2f -i \"%s%%06d.png\" " |
170 "-sameq -r %.2f -ar 44100 -acodec pcm_s16le %s \"%s\"", | 170 "-sameq -r %.2f -ar 44100 -acodec pcm_s16le %s \"%s\"", |
171 sffmpegPath, sound_filename_.c_str(), directory_.c_str(), | 171 sffmpegPath, sound_filename_.c_str(), frame_rate, directory_.c_str(), |
172 frame_rate, sCodecOptions, movie_filename_.c_str()); | 172 frame_rate, sCodecOptions, movie_filename_.c_str()); |
173 printf(sCmdLine); | 173 printf(sCmdLine); |
174 printf("\n"); | 174 printf("\n"); |
175 if (system(sCmdLine)) { | 175 if (system(sCmdLine)) { |
176 LOG_ERROR(_T("Couldn't create movie output.")); | 176 LOG_ERROR(_T("Couldn't create movie output.")); |