matham / ffpyplayer

A cython implementation of an ffmpeg based player.
GNU Lesser General Public License v3.0
134 stars 38 forks source link

Receiving 'eof' after a few frames when playing RTSP stream. #142

Open rnixx opened 1 year ago

rnixx commented 1 year ago

When connecting to a RTSP stream and initializing MediaPlayer paused, sometimes 'eof' is received after a few frames, depending on the stream producer.

I encountered this behavior with a RTSP stream from a NDI converter. The same stream works fine when connecting to it with ffplay directly.

I also tried to reproduce the issue with a stream from VLC, but the issue not happened.

matham commented 1 year ago

Try setting the log level to debug and connecting a logger to see the full ffpyplayer logs.

from ffpyplayer.tools import set_loglevel, set_log_callback
import logging

set_log_callback(logger=logging, default_only=True)
set_loglevel('trace')
logging.root.setLevel(logging.DEBUG)
from ffpyplayer.player import MediaPlayer
...