<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/11976" />

	<title>Real-Time Physics Simulation Forum</title>
	
	<link href="https://pybullet.org/Bullet/phpBB3/index.php" />
	<updated>2018-01-14T22:00:51+00:00</updated>

	<author><name><![CDATA[Real-Time Physics Simulation Forum]]></name></author>
	<id>https://pybullet.org/Bullet/phpBB3/app.php/feed/topic/11976</id>

		<entry>
		<author><name><![CDATA[MIT]]></name></author>
		<updated>2018-01-14T22:00:51+00:00</updated>

		<published>2018-01-14T22:00:51+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40324#p40324</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40324#p40324"/>
		<title type="html"><![CDATA[Re: Limit video framerate of STATE_LOGGING_VIDEO_MP4]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40324#p40324"><![CDATA[
Thanks for following up, that explains the behavior I'm seeing.  I'll file an issue with the tracker as I think it's a worthwhile option.<br><br>That said, just grabbing the images and compositing them into a video later is a good solution, so I'll use that as a workaround in the meantime.  Didn't realize this method existed, should have looked harder at the API.  Interestingly this is actually the preferred way to render video in Blender, save images to disk and then create the video as a second step.  That way if your render takes 3 days and fails half way thru you don't have to restart the thing from scratch.  Thanks for the help!<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12441">MIT</a> — Sun Jan 14, 2018 10:00 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Erwin Coumans]]></name></author>
		<updated>2018-01-12T16:26:47+00:00</updated>

		<published>2018-01-12T16:26:47+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40317#p40317</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40317#p40317"/>
		<title type="html"><![CDATA[Re: Limit video framerate of STATE_LOGGING_VIDEO_MP4]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40317#p40317"><![CDATA[
At the moment, the ffmpeg video stream is generated from the graphics thread, which runs asynchronously from the physics. It cannot be synchronized.<br><br>We can add an option to force to synchronize them for this purpose, you could file an issue in <a href="https://github.com/bulletphysics/bullet3/issues" class="postlink">our tracker</a>?<br><br>Alternatively, just grab the individual images using 'getCameraImage' and create the video from Python?<br><div class="codebox"><p>Code: </p><pre><code>p.setRealTimeSimulation(False)while (1):  p.stepSimulation()  img=p.getCameraImage(width, height, renderer=p.ER_BULLET_HARDWARE_OPENGL)  #save image to disk or stream img to a ffmpeg pipe</code></pre></div>See the <a href="https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA/edit#" class="postlink">PyBullet Quickstart Guide</a> for details on getCameraImage.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=2">Erwin Coumans</a> — Fri Jan 12, 2018 4:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[MIT]]></name></author>
		<updated>2018-01-06T19:30:38+00:00</updated>

		<published>2018-01-06T19:30:38+00:00</published>
		<id>https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40305#p40305</id>
		<link href="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40305#p40305"/>
		<title type="html"><![CDATA[Limit video framerate of STATE_LOGGING_VIDEO_MP4]]></title>

		
		<content type="html" xml:base="https://pybullet.org/Bullet/phpBB3/viewtopic.php?p=40305#p40305"><![CDATA[
As the title states, is there a way to constrain the framerate of the video created using the command:<br><br>p.startStateLogging( p.STATE_LOGGING_VIDEO_MP4, filename )<br><br>As of now, the framerate fluctuates based on the cpu load of my computer.  If this is connected to the framerate that the Physics simulator is running at perhaps I'm not setting it correctly?  I'm currently using:<br><br>p.setPhysicsEngineParameter( fixedTimeStep=1./60., ... )<br><br>But reducing the fixedTimeStep value seems to have no effect on the logging. I've also tried the following on playback and it fails to solve the issue.<br><br>p.setRealTimeSimulation( True )<br><br>I'm probably mis-understanding how bullet works, but any help would be appreciated.<p>Statistics: Posted by <a href="https://pybullet.org/Bullet/phpBB3/memberlist.php?mode=viewprofile&amp;u=12441">MIT</a> — Sat Jan 06, 2018 7:30 pm</p><hr />
]]></content>
	</entry>
	</feed>
