Fixed bug on JSON output on a ChunkWriter. Also, moved some ChunkWriter defaults into the header.

This commit is contained in:
Jonathan Thomas
2013-08-28 17:00:57 -05:00
parent ae8552fdb3
commit 12ca79ce0b
3 changed files with 39 additions and 13 deletions

View File

@@ -32,7 +32,29 @@ int main(int argc, char* argv[])
cr1.Open();
//for (int z1 = 70; z1 < 85; z1++)
// cr1.GetFrame(z1)->Display();
cr1.GetFrame(300)->Display();
//cr1.GetFrame(300)->Display();
/* WRITER ---------------- */
FFmpegWriter w9("/home/jonathan/fromchunks.webm");
// Set options
w9.SetAudioOptions(true, cr1.info.acodec, cr1.info.sample_rate, cr1.info.channels, cr1.info.audio_bit_rate);
w9.SetVideoOptions(true, cr1.info.vcodec, cr1.info.fps, cr1.info.width, cr1.info.height, cr1.info.pixel_ratio, false, false, cr1.info.video_bit_rate);
// Prepare Streams
w9.PrepareStreams();
// Write header
w9.WriteHeader();
// Create a FFmpegWriter
w9.WriteFrame(&cr1, 1, cr1.info.video_length - 48);
// Write Footer
w9.WriteTrailer();
w9.Close();
cout << "End Chunk Reader" << endl;