[Ffmpeg-devel] [PATCH] AVISynth support for some MS DIB formats

Víctor Paesa wzrlpy
Thu Sep 28 20:18:46 CEST 2006


Hi,

> Steve Lhomme wrote:
>> Michael Niedermayer wrote:
>>>> Index: avisynth.c
>>>> ===================================================================
>>>> --- avisynth.c    (revision 6352)
>>>> +++ avisynth.c    (working copy)
>>>> @@ -95,6 +95,7 @@
>>>>                    stream->chunck_size = stream->chunck_samples *
>>>> wvfmt.nChannels * wvfmt.wBitsPerSample / 8;
>>>>
>>>>                    st->codec->codec_id =
>>>> wav_codec_get_id(wvfmt.wFormatTag, st->codec->bits_per_sample);
>>>> +                  st->codec->codec_tag = stream->info.fccHandler;
>>>
>>> this looks wrong stream->info.fccHandler should be
>>> st->codec->stream_codec_tag
>>> and wvfmt.wFormatTag should be codec_tag
>>>
>>>
>>>>                  }
>>>>                else if (stream->info.fccType == streamtypeVIDEO)
>>>>                  {
>>>> @@ -117,7 +118,27 @@
>>>>
>>>>                    st->codec->bits_per_sample =
>>>> stream->info.dwSampleSize * 8;
>>>>                    st->codec->bit_rate =
>>>> (uint64_t)stream->info.dwSampleSize * (uint64_t)stream->info.dwRate *
>>>> 8 / (uint64_t)stream->info.dwScale;
>>>> -                  st->codec->codec_id = codec_get_id(codec_bmp_tags,
>>>> stream->info.fccHandler);
>>>
>>> same here, it should be imgfmt.bmiHeader.biCompression not
>>> stream->info.fccHandler id also guess thats why the code didnt work
>>> though
>>> iam just guessing, what happens if you change these?
>>
>> I'll give this a try. I'll keep you updated.
>
> OK, it's better (more general). Here is the patch.
>

I tried the patch on SVN-r6027, but it gives me an all black frames movie.

This was the command:
$ ~/src/FFmpeg-20060928-6364/ffmpeg/ffmpeg -i 60.avs -vtag DIVX -acodec
copy out.avi
FFmpeg version SVN-r6364, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-mp3lame --enable-a52 --disable-static
--enable-shared --enable-pthreads --enable-swscaler --enable-avisynth
--enable-gpl
  libavutil version: 49.0.1
  libavcodec version: 51.16.0
  libavformat version: 50.5.0
  built on Sep 28 2006 19:51:40, gcc: 3.4.4 (cygming special) (gdc 0.12,
using dmd 0.125)
Input #0, avs, from '60.avs':
  Duration: 00:01:00.3, start: 0.000000, bitrate: 0 kb/s
  Stream #0.0: Video: rawvideo, yuv420p, 720x576, 124416 kb/s, 25.00 fps(r)
  Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Output #0, avi, to 'out.avi':
  Stream #0.0: Video: mpeg4, yuv420p, 720x576, q=2-31, 200 kb/s, 25.00 fps(c)
  Stream #0.1: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
frame=  410 q=31.0 Lsize=    3942kB time=0.0 bitrate=807387.6kbits/s
video:846kB audio:3068kB global headers:0kB muxing overhead 0.742793%


The avs is simple:
DirectShowSource("60.avi")

And the source is
$ ffmpeg -i 60.avi
FFmpeg version SVN-r6027, Copyright (c) 2000-2004 Fabrice Bellard
  configuration:  --enable-mp3lame --enable-a52 --disable-static
--enable-shared --enable-pthreads --enable-avisynth --enable-gpl
  libavutil version: 49.0.0
  libavcodec version: 51.11.0
  libavformat version: 50.5.0
  built on Aug 20 2006 01:37:22, gcc: 3.4.4 (cygming special) (gdc 0.12,
using dmd 0.125)
Input #0, avi, from '60.avi':
  Duration: 00:01:00.3, start: 0.000000, bitrate: 2155 kb/s
  Stream #0.0: Video: mpeg4, yuv420p, 720x576, 25.00 fps(r)
  Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
Must supply at least one output file

Regards,
V?ctor Paesa




More information about the ffmpeg-devel mailing list