From edddf812328cdb279074737dfd7680a9612b67c2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 24 Feb 2013 16:46:35 +0100 Subject: demux_rawvideo: allow setting video codec Can be used to decode some obscure image formats and similar stuff. --- DOCS/man/en/options.rst | 2 ++ demux/demux_rawvideo.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index fad5faf1ad..e5570b5887 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -1684,6 +1684,8 @@ :mp-format=: colorspace by internal video format Use ``--rawvideo=mp-format=help`` for a list of possible formats. + :codec: set the video codec (instead of selecting + the rawvideo codec) :size=: frame size in Bytes *EXAMPLE*: diff --git a/demux/demux_rawvideo.c b/demux/demux_rawvideo.c index afacd9ded4..1a09b8308a 100644 --- a/demux/demux_rawvideo.c +++ b/demux/demux_rawvideo.c @@ -34,6 +34,7 @@ static int format = MP_FOURCC_I420; static int mp_format; +static char *codec; static int width = 0; static int height = 0; static float fps = 25; @@ -46,6 +47,7 @@ const m_option_t demux_rawvideo_opts[] = { // format: { "format", &format, CONF_TYPE_FOURCC, 0, 0 , 0, NULL }, { "mp-format", &mp_format, CONF_TYPE_IMGFMT, 0, 0 , 0, NULL }, + { "codec", &codec, CONF_TYPE_STRING, 0, 0 , 0, NULL }, // misc: { "fps", &fps, CONF_TYPE_FLOAT,CONF_RANGE,0.001,1000, NULL }, { "size", &imgsize, CONF_TYPE_INT, CONF_RANGE, 1 , 8192*8192*4, NULL }, @@ -74,6 +76,8 @@ static demuxer_t* demux_rawvideo_open(demuxer_t* demuxer) { desc.bpp[p] + 7) / 8; } } + } else if (codec && codec[0]) { + decoder = talloc_strdup(demuxer, codec); } if (!imgsize) { -- cgit v1.2.3