dennybritz / reinforcement-learning

Implementation of Reinforcement Learning Algorithms. Python, OpenAI Gym, Tensorflow. Exercises and Solutions to accompany Sutton's Book and David Silver's course.
http://www.wildml.com/2016/10/learning-reinforcement-learning/
MIT License
20.24k stars 6k forks source link

ffmpeg problem - CalledProcessError: Command '['ffmpeg', '-version']' returned non-zero exit status -6 #141

Open digiamm opened 6 years ago

digiamm commented 6 years ago

Hi guys, I am having problem executing the code Solution for Deep Q Learning. I have installed the ffmpeg package, which was missed but I got this problem now and I have no idea how to solve it.

Anyone has already encountered?

This is my error trace:

Reloaded modules: lib, lib.plotting
/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/ops/gradients_impl.py:96: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
  "Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
ERROR: VideoRecorder encoder exited with status -6
Loading model checkpoint /Users/lucadigiammarino/Spid_RL/experiments/Breakout-v0/checkpoints/model...

INFO:tensorflow:Restoring parameters from /Users/lucadigiammarino/Spid_RL/experiments/Breakout-v0/checkpoints/model
Populating replay memory...
Traceback (most recent call last):

  File "<ipython-input-5-514468a8e992>", line 1, in <module>
    runfile('/Users/lucadigiammarino/Spid_RL/deep.py', wdir='/Users/lucadigiammarino/Spid_RL')

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 710, in runfile
    execfile(filename, namespace)

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/site-packages/spyder/utils/site/sitecustomize.py", line 101, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "/Users/lucadigiammarino/Spid_RL/deep.py", line 427, in <module>
    batch_size=32):

  File "/Users/lucadigiammarino/Spid_RL/deep.py", line 322, in deep_q_learning
    state = env.reset()

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/site-packages/gym/wrappers/monitor.py", line 39, in reset
    self._after_reset(observation)

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/site-packages/gym/wrappers/monitor.py", line 193, in _after_reset
    self.reset_video_recorder()

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/site-packages/gym/wrappers/monitor.py", line 214, in reset_video_recorder
    self.video_recorder.capture_frame()

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/site-packages/gym/wrappers/monitoring/video_recorder.py", line 116, in capture_frame
    self._encode_image_frame(frame)

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/site-packages/gym/wrappers/monitoring/video_recorder.py", line 163, in _encode_image_frame
    self.metadata['encoder_version'] = self.encoder.version_info

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/site-packages/gym/wrappers/monitoring/video_recorder.py", line 263, in version_info
    stderr=subprocess.STDOUT)),

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/subprocess.py", line 316, in check_output
    **kwargs).stdout

  File "/Users/lucadigiammarino/miniconda3/envs/tensorflow/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)

CalledProcessError: Command '['ffmpeg', '-version']' returned non-zero exit status -6
robesv commented 6 years ago

Had this on OSX and fixed it by upgrading my ffmpeg with brew $ brew upgrade ffmpeg