Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Schlaile <peter@schlaile.de>2008-10-05 21:31:33 +0400
committerPeter Schlaile <peter@schlaile.de>2008-10-05 21:31:33 +0400
commit34399546b71fc10a2e5ca9e808ba589ee8e8f394 (patch)
tree9a515133a10c68295c3dd65203c82aecd894bade /source/blender/blenkernel/intern/writeffmpeg.c
parente99ff615d78132bf206ab7fbf572d3d63f345a75 (diff)
== FFMPEG ==
Added optional OGG / theora / vorbis support. (OGG-format encoding is currently disabled, since the bundled ffmpeg version is broken here) Fixed a bug with PTS-encoding, to make theora work. You have to explicitly enable it and currently only scons is supported. Otherwise: enjoy! :)
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 64af8258f80..cef6f802729 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -230,6 +230,10 @@ static const char** get_file_extensions(int format)
static const char * rv[] = { ".mkv", NULL };
return rv;
}
+ case FFMPEG_OGG: {
+ static const char * rv[] = { ".ogg", ".ogv", NULL };
+ return rv;
+ }
default:
return NULL;
}
@@ -251,14 +255,18 @@ static void write_video_frame(AVFrame* frame)
AVPacket packet;
av_init_packet(&packet);
+ if (c->coded_frame->pts != AV_NOPTS_VALUE) {
#ifdef FFMPEG_CODEC_TIME_BASE
- packet.pts = av_rescale_q(c->coded_frame->pts,
- c->time_base,
- video_stream->time_base);
+ packet.pts = av_rescale_q(c->coded_frame->pts,
+ c->time_base,
+ video_stream->time_base);
#else
- packet.pts = c->coded_frame->pts;
+ packet.pts = c->coded_frame->pts;
#endif
- fprintf(stderr, "Video Frame PTS: %lld\n", packet.pts);
+ fprintf(stderr, "Video Frame PTS: %lld\n", packet.pts);
+ } else {
+ fprintf(stderr, "Video Frame PTS: not set\n");
+ }
if (c->coded_frame->key_frame)
packet.flags |= PKT_FLAG_KEY;
packet.stream_index = video_stream->index;
@@ -669,6 +677,8 @@ void start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty)
switch(ffmpeg_type) {
case FFMPEG_AVI:
case FFMPEG_MOV:
+ case FFMPEG_OGG:
+ case FFMPEG_MKV:
fmt->video_codec = ffmpeg_codec;
break;
case FFMPEG_DV: