Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8504 closed defect (invalid)

'FFmpegSource' object has no attribute '_packet'

Reported by: vishal Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Following is exception I am getting on RPI3b+ machine with rasbian os, few detail to reproduce :-

ffmpeg version N-51541-gd89f69e142-static Copyright (c) 2000-2020 the FFmpeg developers

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 =
source =
mediaLoad =

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

exception I am getting :-

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

Change History (2)

comment:1 by Carl Eugen Hoyos, 4 years ago

Component: ffmpegundetermined
Priority: criticalnormal
Reproduced by developer: unset
Resolution: invalid
Status: newclosed
Version: 4.2unspecified

This does not look like an issue that can be fixed in FFmpeg.

comment:2 by vishal, 4 years ago

Hi, pyglet is python library uses. Internally ffmpeg to read media file. Same issue persisted on Ubuntu 18 with ffmpeg version 3, but it is resolved on Ubuntu once ffmpeg got upgraded to 4.2 version.

Note: See TracTickets for help on using tickets.