[MPlayer-dev-eng] Re: [PATCH]Play svq3 in X-QT over rtsp

Nico Sabbi nicola_sabbi at fastwebnet.it
Sun Feb 4 13:41:49 CET 2007


Carl Eugen Hoyos wrote:
> Nico Sabbi <nicola_sabbi <at> fastwebnet.it> writes:
> 
> 
>>>Could somebody please commit?
>>>
>>
>>with a very recent co of ffmpeg I have problems getting the frame size 
>>of that particular sample
> 
> 
> Strange, it works for Compn and myself. What version of live555 are you using
> (it's responsible for the frame size)? Did it work without my patch?
> 
> The patch only improves extra data handling and frame rate detection. It should
> not change the frame size.
> 
> Carl Eugen
> 
> 

using live-latest and ffmpeg-latest:
without assigning sh_video->disp_[hw] I get a lot of errors:

demux_rtp: Guessed the video frame rate as 15 frames-per-second.
         (If this is wrong, use the "-fps <frame-rate>" option instead.)
VIDEO:  [SVQ3]  240x180  0bpp  15.000 fps    0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Forced video codec: ffmpeg12
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffsvq3] vfm: ffmpeg (FFmpeg Sorenson Video v3 
(SVQ3))
==========================================================================
Audio: no sound
Starting playback...
[svq3 @ 0xb7455b08]picture size invalid (0x0)
[svq3 @ 0xb7455b08]get_buffer() failed (-1 0 0 (nil))
Error while decoding frame!


so the only way to make decoding work is using your patch + video size 
assignment

Index: demux_rtp_codec.cpp
===================================================================
--- demux_rtp_codec.cpp (revisione 22001)
+++ demux_rtp_codec.cpp (copia locale)
@@ -88,16 +88,17 @@
      } while (!parseQTState_video(qtRTPSource->qtState, fourcc));

      bih->biCompression = sh_video->format = fourcc;
-    bih->biWidth = qtRTPSource->qtState.width;
-    bih->biHeight = qtRTPSource->qtState.height;
-    if (bih->biCompression == mmioFOURCC('a','v','c','1')) {
+    bih->biWidth = sh_video->disp_w = qtRTPSource->qtState.width;
+    bih->biHeight = sh_video->disp_h = qtRTPSource->qtState.height;
+    if (bih->biCompression == mmioFOURCC('a','v','c','1') ||
+        bih->biCompression == mmioFOURCC('S','V','Q','3')) {
        uint8_t *pos = (uint8_t*)qtRTPSource->qtState.sdAtom + 86;
        uint8_t *endpos = (uint8_t*)qtRTPSource->qtState.sdAtom
                          + qtRTPSource->qtState.sdAtomSize;
        while (pos+8 < endpos) {
          unsigned atomLength = pos[0]<<24 | pos[1]<<16 | pos[2]<<8 | 
pos[3];
          if (atomLength == 0 || atomLength > endpos-pos) break;
-        if (memcmp(pos+4, "avcC", 4) == 0 &&
+        if ((!memcmp(pos+4, "avcC", 4) || !memcmp(pos+4, "SMI ", 4)) &&
              atomLength > 8 &&
              atomLength <= INT_MAX-sizeof(BITMAPINFOHEADER)) {
            bih->biSize = sizeof(BITMAPINFOHEADER)+atomLength-8;



-- 
"Without a frontend, mplayer is useless" - someone in mplayer-users



More information about the MPlayer-dev-eng mailing list