robohive icon indicating copy to clipboard operation
robohive copied to clipboard

Cannot find installation of real FFmpeg during offline rendering

Open vikashplus opened this issue 4 years ago • 4 comments

Details

  • Offline rendering goes well but crashes at the end with FFMPEG error
  • Likely an issues with conda env
  • Likely an issue on mac. I remember successfully working with it on linux.

Code

(mjrl-env) ~/Libraries/mj_envs/mj_envs$ python utils/visualize_env.py -e FrankaReachFixed-v0 -r offscreen
RS:> Registering Biomechanics Envs
RS:> Registering Hand Envs
Episode 0: rendering offline Creating offscreen glfw
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, Traceback (most recent call last):
  File "utils/visualize_env.py", line 64, in <module>
    main()
  File "/Users/vikashplus/.conda/envs/mjrl-env/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/vikashplus/.conda/envs/mjrl-env/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/vikashplus/.conda/envs/mjrl-env/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/vikashplus/.conda/envs/mjrl-env/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "utils/visualize_env.py", line 61, in main
    filename=filename)
  File "/Users/vikashplus/Libraries/mj_envs/mj_envs/envs/env_base.py", line 419, in visualize_policy_offscreen
    skvideo.io.vwrite( file_name, np.asarray(arrs))
  File "/Users/vikashplus/.conda/envs/mjrl-env/lib/python3.7/site-packages/skvideo/io/io.py", line 60, in vwrite
    assert _HAS_FFMPEG, "Cannot find installation of real FFmpeg (which comes with ffprobe)."
AssertionError: Cannot find installation of real FFmpeg (which comes with ffprobe).

vikashplus avatar Aug 07 '21 16:08 vikashplus

as suggested here when using conda package manager conda install -c mrinaljain17 ffmpeg

Vittorio-Caggiano avatar Aug 09 '21 22:08 Vittorio-Caggiano

@girifb -- lets keep a note of this when we revisit the install instructions

vikashplus avatar Aug 12 '21 01:08 vikashplus

I don't see any option for offscreen rendering in visutalize_env.py . Am I missing something?

mj_envs/mj_envs$ python utils/visualize_env.py -e FrankaReachFixed-v0 -r offscreen

anilsh avatar Oct 18 '21 08:10 anilsh

@anilsh -- please see here for an example for offline rendering https://github.com/vikashplus/robohive/blob/main/robohive/utils/examine_env.py

vikashplus avatar Jan 03 '22 00:01 vikashplus