matham / ffpyplayer

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

ffpyplayer/player/core.c: No such file or directory, flv and metadata support #86

Open mareklevv opened 4 years ago

mareklevv commented 4 years ago

Hi!

I have a problem with ffpyplayer. I always getting segmentation fault. After quick debug mode with gdb I got more useful error, but still I am not able to fix this by my own.

I am using docker image: openvisualcloud/xeon-ubuntu1804-media-ffmpeg:latest. From perspective ffmpeg everything is working, because I was able to run all of my needed commands with proper decoders/encoders.

ffpyplayer version: compiled from latest version from github

Example code:

from ffpyplayer.player import MediaPlayer

filename="<flv or simple mp4 isnt' working too>"

player = MediaPlayer(filename=filename, ff_opts={'f': 'flv'})

Error:

(gdb) run script.py
Starting program: /.try/bin/python script.py
warning: Error disabling address space randomization: Operation not permitted
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fbdecb5a700 (LWP 7224)]
[New Thread 0x7fbde7fff700 (LWP 7225)]
[Thread 0x7fbde7fff700 (LWP 7225) exited]

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
__pyx_f_10ffpyplayer_6player_4core_10VideoState_stream_component_close (__pyx_v_self=0x7fbdec259028, __pyx_v_stream_index=0) at /tmp/pip-ul28ybu4-build/ffpyplayer/player/core.c:22105
22105   /tmp/pip-ul28ybu4-build/ffpyplayer/player/core.c: No such file or directory.

I also tried with mp4 file, but I get the same error above.

I know this should be another Issue, but this is quick questions: Is ffpyplayer able to read flvs and return metadata? Is ffpyplayer support HEVC/h265 or this library support every format that is supported by ffmpeg?

mareklevv commented 4 years ago

After some digging I figure out that I should install this package like this: pip install -e . I run my example scrit once again and this time it generated new error:

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
__pyx_f_10ffpyplayer_6player_4core_10VideoState_stream_component_close (__pyx_v_self=0x7f5a3ae46028, __pyx_v_stream_index=0) at /ffpyplayer/ffpyplayer/player/core.c:22105
22105     if (__pyx_t_2) {