YouTube360 new version is created using Python API, decoupling from the VC version as much as possible.
How to use
This version needs to be used with CameraAnimator, if you want to record in static position, simply add a single View to the CameraAnimator.
You can set the recording start time and end time through StartTime and EndTime options.
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.
YouTube can recognize final video format as 360 video, for offline use, I tested with PotPlayer, other video players should also work.
Detail workflow
Record 6 directions videos
Use ffmpeg to stack 6 video
Use ffmpeg to set video as EAC(Equi-Angular Cubemap) format
Inject 360 metadata
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
YouTube360.zip (75.0 KB)
Unzip to C:\Users\<User Name>\Documents\Visual Components\4.x\My Commands
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.
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
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