summaryrefslogtreecommitdiff
path: root/src/mov_encoder.cc
diff options
context:
space:
mode:
authordeva <deva>2005-04-29 13:53:47 +0000
committerdeva <deva>2005-04-29 13:53:47 +0000
commit0791ce8426fe56246afa4123c37388c2f506f8ce (patch)
tree3bf583d2ce5b998e789c0002dff23ba3b52083a5 /src/mov_encoder.cc
parentedb7f06d81d94178aace1a9c29888e4bb800fb6a (diff)
Testing mpeg4 (divx) codec
Diffstat (limited to 'src/mov_encoder.cc')
-rw-r--r--src/mov_encoder.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mov_encoder.cc b/src/mov_encoder.cc
index 52702a5..01a5c5a 100644
--- a/src/mov_encoder.cc
+++ b/src/mov_encoder.cc
@@ -41,7 +41,8 @@ MovEncoder::MovEncoder(const char *filename)
exit(1);
}
- efc->oformat = guess_format("mpeg", NULL, NULL);
+ efc->oformat = guess_format("avi", NULL, NULL);
+ // efc->oformat = guess_format("mpeg", NULL, NULL);
//efc->oformat = guess_format(NULL, filename, NULL);
if(!(st = av_new_stream(efc, 0))) {
@@ -65,15 +66,18 @@ MovEncoder::MovEncoder(const char *filename)
exit(1);
}
- enc_codec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
+ enc_codec = avcodec_find_encoder(CODEC_ID_MPEG4);
+ // enc_codec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);
if(!enc_codec) {
fprintf(stderr, "Unsupported codec for output stream\n"); fflush(stderr);
exit(1);
}
avcodec_get_context_defaults(&st->codec);
ecc = &st->codec;
- ecc->codec_id = CODEC_ID_MPEG2VIDEO;
- ecc->bit_rate = 8192*1000;
+ ecc->codec_id = CODEC_ID_MPEG4;
+ // ecc->codec_id = CODEC_ID_MPEG2VIDEO;
+ // ecc->bit_rate = 8192*1000;
+ ecc->bit_rate = 4096*1000;
ecc->bit_rate_tolerance = 8000*1000;
ecc->frame_rate = 25;
ecc->frame_rate_base = 1;