ffpyplayer
ffpyplayer copied to clipboard
Some bugs maybe exists.
Questions At the latest version, ffpyplayer==4.3.5.
Q1: Start a instance of MediaPlayer(video, ff_opts={"volume": 0.0}), the media still have a big audio voice output.
Q2: And if instanced a MediaPlayer object then start call seek() method will be crash. if call seek method after call get_metadata() or get_frame() will be normal.
player = MediaPlayer(video) player.seek(N) # Will crash while True: frame, val = play.get_frame() ...
player = MediaPlayer(video) while True: meta = player.get_metadata() if meta.get("duration"): break else: time.sleep(0.01) player.seek(N) # Will be ok while True: frame, val = player.get_frame() ....
Q3: If the video have a tags information rotation = -90, even set autorotate=True for ff_opts, the frame image transform angle is incorrected. for now I just set autorotate=False, and make the frame image transform manually to correct the wrong direction.
Q4: Normally I will start a thread to execute the mediaplayer instance to playing. but if we have new video want to play. I have to set the player.close_player() and stop the current thread. But sometimes the thread will crash.
Q5: If only play one video, when the eof signal we got, I'll set the player.set_puase(True) and player.seek(0, relative=False). and keep the thread running in background wait user click the play button again, sometimes also will be crashed.
All of crash hardly to find error information in console. But this still is a great project. I'll try to use ffpyplayer replace the Qt QMediaPlayer, But looks lots of charllenges need to do. If no k-lite codec support, the QT mediaplayer is useless.