[FFmpeg-trac] #8504(ffmpeg:new): 'FFmpegSource' object has no attribute '_packet'

FFmpeg trac at avcodec.org
Fri Jan 31 09:18:07 EET 2020

#8504: 'FFmpegSource' object has no attribute '_packet'
             Reporter:  vishalmote  |                     Type:  defect
               Status:  new         |                 Priority:  critical
            Component:  ffmpeg      |                  Version:  4.2
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
 Following is exception I am getting on RPI3b+ machine with rasbian os, few
 detail to reproduce :-

 ffmpeg version N-51541-gd89f69e142-static
 https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2020 the FFmpeg

 Os :- Raspbian GNU/Linux 9 \n \l

 Python 2.7.13

 tool using : pyglet

 sample code :-

 import pyglet
 vidPath = '/var/tmp/output.mp4'
 window = pyglet.window.Window(resizable=True)
 window.set_size(1280, 720)

 player = pyglet.media.Player()
 source = pyglet.media.StreamingSource()
 mediaLoad = pyglet.media.load(vidPath)

 def on_draw():
     if(player.source and player.source.video_format):



 exception I am getting :-

 pi at raspberrypi:/var/terminal $ python vishal_code.py
 Traceback (most recent call last):
   File "vishal_code.py", line 9, in <module>
     mediaLoad = pyglet.media.load(vidPath)
   File "/home/pi/.local/lib/python2.7/site-
 packages/pyglet/media/__init__.py", line 133, in load
     loaded_source = decoder.decode(file, filename, streaming)
   File "/home/pi/.local/lib/python2.7/site-
 packages/pyglet/media/codecs/ffmpeg.py", line 1041, in decode
     return FFmpegSource(filename, file)
   File "/home/pi/.local/lib/python2.7/site-
 packages/pyglet/media/codecs/ffmpeg.py", line 460, in __init__
     self._file = ffmpeg_open_filename(asbytes_filename(filename))
   File "/home/pi/.local/lib/python2.7/site-
 packages/pyglet/media/codecs/ffmpeg.py", line 143, in ffmpeg_open_filename
     raise FFmpegException('Error opening file ' + filename.decode("utf8"))
 pyglet.media.codecs.ffmpeg.FFmpegException: Error opening file
 Exception AttributeError: "'FFmpegSource' object has no attribute
 '_packet'" in <bound method FFmpegSource.__del__ of
 <pyglet.media.codecs.ffmpeg.FFmpegSource object at 0x6e0af850>> ignored
 pi at raspberrypi:/var/terminal $

Ticket URL: <https://trac.ffmpeg.org/ticket/8504>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list