[osg-users] OsgMovie ffmpeg and audio (SDL2) - Audio seems to make video slower. Audio has hiccoughing

Andrea Martini martini.andrea at gmail.com
Mon Jun 11 07:36:33 PDT 2018


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







More information about the osg-users mailing list