Menu

Audio/Video Sync Problem..

user
2007-05-23
2013-05-09
  • Nobody/Anonymous

    Hi all + Jose,

    I know I have mentioned this before, and I know its a known BUG, but is there any way we can get the Audio and Video to stay in sync after you move the slider and jump to a different section of the movie.

    This is really the ONLY feature that prevents me from using FOBS as my default player..

    Is there any know work around or fix ?

    Is there anything in the JAVA that can be done ?

    Jose - what do you think ?

    paddy.

    ps excellent work my friend.

     
    • Jose San Pedro

      Jose San Pedro - 2007-05-23

      Hi Paddy,

      thanks for your message!

      I really have to apologise, because I promised to have a look at this issue long time ago. I even think I know where the problem is, so it's really a matter of me finding the time to implement it. I'm sorry to say that the problem is in the C-side part of Fobs. Workarounds.... not really. It just happens with certain media formats (or so I think), so maybe transcoding the videos will do (but I don't think that is a satisfactory solution whatsoever).

      The problem right now is that I'm literally swamped with work, with two conferences in the following month plus many other responsibilities. I'm trying hard to get some time for Fobs, but it's certainly difficult.

      I have to ask you guys to be patient meanwhile!

      Thanks for your understanding.

      Jose San Pedro

      PS: is it really your default player?

       
    • Nobody/Anonymous

      I would use it as my default player..

      If I could search through the file..

      It plays all the formats i like..

      paddy.

       
    • Nobody/Anonymous

      OK Dude.

      The time has come. Gonna have to put my C/C++ hat on again. ' It's been a long time general ' 

      Can you tell me where you think the problem is in the C, for the Audio/Sync problem, and I'll have a look and see if i can fix it.

      cheers,

      paddy.

       
    • Jose San Pedro

      Jose San Pedro - 2007-07-12

      Hi,

      I just came back from a conference, really sorry to kept you waiting.

      The problem is, obviously, within the setFrame set of functions. Specifically, the audio buffer is completely ignored when doing all the video seek ops, which basically means that it doesn't get synchronized until audio packages from the new position are found in the file. It shouldn't be difficult to solve, but just getting into the code and refreshing that C++ may take some time.... I now have a couple of "relax" days, I'll try to see if there's an easy workaround to get this solve without to much hassle.

      Thanks anyway,

      Jose San Pedro

       
    • Nobody/Anonymous

      Yee Haa!

      Jose's on the case..

      Am also trying now.. will let you know as soon as I know anything usefull.

      paddy.

       
      • Jose San Pedro

        Jose San Pedro - 2007-07-13

        Hi guys,

        I think I have a pretty funcitonal workaround for the sync problem. You may still experience very subtle desync after a seek operation (not always) but is almost non visible.

        I cannot commit any changes to the CVS right now. In order to get the sync working add the following lines at the end of the setFrameFast() method, just before the return statement:

        ReturnCode Decoder::setFrameFast(TimeStamp newPosition)
        {
                ....  

        >>   //Workaround to sync a/v after a seek op
        >>   while(audioBuffer->count()>1)
        >>   {
        >>    AVPacket *pkt = audioBuffer->readNext();
        >>    AVRational aTimeBase = inputFile->streams[audioStreamIndex]->time_base;
        >>    if(compareTimeStamps(position, pts2TimeStamp(pkt->dts, &aTimeBase))) break;
        >>    pkt = audioBuffer->extractNext();
        >>    av_free_packet(pkt);
        >>   }

                return error;
        }

        I know it's not perfect, but after some tests it's the best that can be got without doing major modifications to the code. In addition, it seems that making the audio and video pts as close as possible makes the synchronization worse. Anyway, if you have any video file where this doesn't do the trick, please send it to me so that I can refine the fix.

        Cheers,

        Jose San Pedro

         
    • Nobody/Anonymous

      Jose - well played.

       
    • naeem

      naeem - 2007-09-11

      HI Jose,

      I modified the setFrameFast() in the Decoder.cpp file with the patch you provided to make the a/v in sync.
      But the fix doesnt seem to work. Still the audio and video goes out of sync and it is very obvious too.

      Could you please test this sample wmv file for the a/v sync fix.
      http://www.amd.com/us-en/assets/content_type/DownloadableAssets/AMD_NAB_open_video_linear_small.wmv

      Thanks,
      Naeem

       
    • Nobody/Anonymous

      if any one out there has the latest .dll with all the a-v sync issues solved, could you please send it to anand_krishnamoorthy@infosys.com

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.