ffpyplayer icon indicating copy to clipboard operation
ffpyplayer copied to clipboard

Unwanted audio loop-stutter when using ff_opts t (duration), loglevel ignored

Open DrOllyGomez opened this issue 4 years ago • 0 comments

Will try to outline symptoms....

  1. Firstly, the following ffplay command generates an audio snippet which plays as expected.... C:\Users\mike.harbour\Music>ffplay -hide_banner -nodisp -nostats -ss 03:20 -autoexit -t 4 -loglevel error -i 11_Surfacing.mp3 ...in the sense that a 4-second chunk of the file, starting at 3mins 20 secs plays, then control returns to the console.

  2. Trying to reproduce in python console... (music) C:\Users\mike.harbour\Music>python Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

from ffpyplayer.player import MediaPlayer mp = MediaPlayer(filename="11_Surfacing.mp3",loglevel='error',ff_opts={'ss':200,'t':4,'autoexit':True}) [mp3 @ 02cfd340] Estimating duration from bitrate, this may be inaccurate symptoms are a) loglevel is ignored b) snippet of audio plays, then appears to loop about 8 times, each time starting from a position closer and closer to the requested endpoint, until eventually silence.

behaviour is reproduced regarless of snippet start position and snippet duration

  1. loglevel works when registered via the tools API call:

from ffpyplayer import tools as T T.set_loglevel('fatal') mp = MediaPlayer(filename="11_Surfacing.mp3",loglevel='error',ff_opts={'ss':5,'t':2,'autoexit':True})

(....unwanted looping as before)

DrOllyGomez avatar May 18 '21 16:05 DrOllyGomez