Hello,

I am using QT Phonon and FFserver to respecitvly display and stream a live video from a webcam.
My FFserver create an asf file (test.asf) on a http server running on computer A.
A Qt application (running on linux) get the test file and display it on screen.

If I start my QT Application at the time t=0s, during approximatively 3 seconds my VideoViewer will be a black rectangle, and then my camera stream will be displayed.
The image displayed is approximatively 3 seconds in the past...

That looks like if Phonon fill a buffer during 3 seconds, then start to display...

Why ? And how can I get disable the buffer ?

Here is my QT Code :

Qt Code:
  1. #include "A.h"
  2. #include <QUrl>
  3. using namespace Phonon;
  4.  
  5. A::A(QWidget *_parent)
  6. :QWidget(_parent),
  7. m_leftVP(NULL),
  8. m_rightVP(NULL),
  9. m_leftStream(NULL),
  10. m_rightStream(NULL)
  11. {
  12. m_leftVP = new VideoPlayer(Phonon::VideoCategory, this);
  13. sl_OnPlay();
  14. }
  15.  
  16. A::~A(void)
  17. {
  18. if(m_rightStream) delete m_rightStream;
  19. if(m_leftStream) delete m_leftStream;
  20. }
  21.  
  22. void A::sl_OnPlay(void)
  23. {
  24. QUrl leftFile("http://192.168.0.18:8090/test.asf");
  25. MediaSource src(leftFile);
  26. m_leftVP->play(leftFile);
  27. m_leftVP->seek(m_leftVP->totalTime());
  28. }
To copy to clipboard, switch view to plain text mode 


Here is my FFServer stream :
Qt Code:
  1. <Stream test.asf>
  2. Feed feed1.ffm
  3. Format asf
  4. VideoCodec msmpeg4v2
  5. VideoFrameRate 15
  6. VideoBufferSize 10
  7. VideoBitRate 200
  8. VideoQMin 1
  9. VideoQMax 5
  10. VideoSize 320x240
  11. PreRoll 0
  12. NoAudio
  13. VideoGopSize 12
  14. StartSendOnKey
  15. AVOptionsVideo flags +global_header
  16. </Stream>
To copy to clipboard, switch view to plain text mode 
Cheers,

A.BARRAL