Hi, Try replacing m_context->time_base by m_stream->time_base in FFmpegDecoderVideo::decodeLoop() (FFmpegDecoderVideo.cpp)
This should solve your problem with FFMPEG versions after 3.0 Cheers! On Mon, Jun 11, 2018 at 4:36 PM, Andrea Martini <martini.and...@gmail.com> wrote: > Hi everyone, > i'm using osg3.5.6 on visual studio 2013 (windows 10), and i'm using > ffmpeg plugin combined with SDL2 to play video and audio streaming with > osgmovie example. > If i don't use SDL2 (no audio), video streaming works fine. > If i add SDL2 (audio), i get two bad results: > 1) video stream get slower > 2) Audio has hiccoughing > > I tryied with some video examples (with different resolutions) but i get > the same result. > > Following, i report audio streaming output displayed on the console: > > ffmpeg::open(C:\Movie\surfers_360.mp4) size(2048, 1024) aspect ratio 1 > Attaching FFmpegAudioStream > AudioStream read [] > FFmpegAudioStream::setAudioSink( 00000277C50FEEE0) > Assigning 00000277C50FEEE0 > image->s()2048 image-t()=1024 aspectRatio=1 > SDLAudioSink()::startPlaying() > audioFrequency()=48000 > audioNbChannels()=2 > audioSampleFormat()=4 > SampleFormat = SAMPLE_FORMAT_F32 > > I'm wondering if i should continue with ffmpeg and sdl libraries, or i > have to look at another one. In this last case, could you suggest me some > way to follow? (link, examples, ...) > > Thank you! > > Cheers, > Andrea > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=74033#74033 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Javier Taibo
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org