YouTube360 add-on

set Quality to 4K image for better experience.

YouTube360 new version is created using Python API, decoupling from the VC version as much as possible.

How to use

  1. This version needs to be used with CameraAnimator, if you want to record in static position, simply add a single View to the CameraAnimator.
  2. You can set the recording start time and end time through StartTime and EndTime options.
  3. When adding a new view to CameraAnimator, it’s important to choose the rendering method at that time. The view will store the rendering method used at the moment.
  4. YouTube can recognize final video format as 360 video, for offline use, I tested with PotPlayer, other video players should also work.

Detail workflow

  1. Record 6 directions videos
  2. Use ffmpeg to stack 6 video
  3. Use ffmpeg to set video as EAC(Equi-Angular Cubemap) format
  4. Inject 360 metadata
  5. Delete 1-3 videos, only left final video

Known bug

Although there is SimSpeed option, sim.SimSpeed is not working for recording video in Python API, have submitted to VC, current workaround is to use GUI to record temp video with desired SimSpeed for few seconds first, this can set SimSpeed correctly.

Future work

I’ve attempted to implement a method where the camera follows an object, but it’s not easy to do so in Python API, because the vcCamera can’t set the Field of View(FOV) angle currently, and it can only be done through vcView. However, continuous use of app.useView can lead to lag issues. This is why CameraAnimator pairs well with it. Looking forward to vcCamera’s future support.

ffmpeg

There is ffmpeg option, however Internal is for the future use, use External for now, you need to download ffmpeg latest version, you will get more information when you select External.

VC does come with ffmpeg by default, but the current version requires an update. has submitted a request to VC for upgrading the ffmpeg version. Thank you, support and development team :smiley:

YouTube360.zip (75.0 KB)
Unzip to C:\Users\<User Name>\Documents\Visual Components\4.x\My Commands

2 Likes

When I click on “Create” the video gets generated, but the robot is not moving. How can I create the video while it is running?
Thank you

Just as a comment from the sidelines it could be that these kinds of add-ons might not work if you are using Kuka.Sim / Kuka OLP and KRL programming. This is because KRL uses custom executor which doesn’t work well with simulation APIs. Basically if you call simulation to start from the API like many of these recording features do that will not start the KRL executor. So this might be the issue here as well.

-k

2 Likes

Ok, Thanks for your response.
Is there another possiblity to get VR/360° videos (not in .vcax)?

Thanks for sharing @chungmin, works great.
Added it to the Addon Store

1 Like

I try YouTube360 with KUKASIM v4.3 with just an 3D static object and just one view.
I obtain the folling message :
------------ ffmpeg path: C:\Program Files\KUKA\KUKA.Sim 4.3\Python\Commands\YouTube360\ffmpeg.exe
Simulation stopped.
Error: C:\Program Files\KUKA\KUKA.Sim 4.3\Python\Commands\YouTube360\Videos\EAC.mp4 does not exist or we do not have permission
Traceback (most recent call last):

  • File “file:///C:\Program Files\KUKA\KUKA.Sim 4.3\Python\Commands\YouTube360\YouTube360.py::”, line 122, in WhenStartStop*
    WindowsError: [Error 2] Le fichier spécifié est introuvable: ‘C:\Program Files\KUKA\KUKA.Sim 4.3\Python\Commands\YouTube360\Videos\2023-09-20_08-26-03.mp4’
    Do you know how to resolve this problem, please?
    Thanks

What files are currently inside the folder?

C:\Program Files\KUKA\KUKA.Sim 4.3\Python\Commands\YouTube360\Videos

I haven’t use KUKA.sim before, the folder path looks suspicious, VC add-on folder location is

C:\Users\<User Name>\Documents\Visual Components\4.x\My Commands

Can you unzip the add-on to here?

Thanks a lot.

I had copied the folder to the wrong path.

It works with KUKASIM v4.3 but not with version v3.1.

Paths :

NOK : C:\Program Files\KUKA\KUKA Sim Pro 3.1\Python\Commands

OK : C:\Users*username*\Documents\KUKA\KUKA Sim 3.1\My Commands

NOK : C:\Program Files\KUKA\KUKA.Sim 4.3\Python\Commands

OK : C:\Users*username* \Documents\KUKA\KUKA.Sim 4.3\My Commands

Can you describe please these 4 parameters? :

Size / SimSpeed / StartTime (s) / EndTime (s)

Cool, glad it works.
Size: Record size for each direction, for example, 2000*2000
SimSpeed: Simulation speed, it’s not working currently, check the original post for workaround.
StartTime: Start recording time (Which means, you don’t need to record from simulation time 0.0 s)
EndTime: End recording time