Merge pull request #1050 from erwincoumans/master
remove 20 second time limit for ffmpeg recording
This commit is contained in:
@@ -620,6 +620,15 @@ bool UrdfParser::parseVisual(UrdfModel& model, UrdfVisual& visual, TiXmlElement*
|
|||||||
if (parseMaterial(visual.m_geometry.m_localMaterial, mat,logger))
|
if (parseMaterial(visual.m_geometry.m_localMaterial, mat,logger))
|
||||||
{
|
{
|
||||||
UrdfMaterial* matPtr = new UrdfMaterial(visual.m_geometry.m_localMaterial);
|
UrdfMaterial* matPtr = new UrdfMaterial(visual.m_geometry.m_localMaterial);
|
||||||
|
|
||||||
|
UrdfMaterial** oldMatPtrPtr = model.m_materials[matPtr->m_name.c_str()];
|
||||||
|
if (oldMatPtrPtr)
|
||||||
|
{
|
||||||
|
UrdfMaterial* oldMatPtr = *oldMatPtrPtr;
|
||||||
|
model.m_materials.remove(matPtr->m_name.c_str());
|
||||||
|
if (oldMatPtr)
|
||||||
|
delete oldMatPtr;
|
||||||
|
}
|
||||||
model.m_materials.insert(matPtr->m_name.c_str(),matPtr);
|
model.m_materials.insert(matPtr->m_name.c_str(),matPtr);
|
||||||
visual.m_geometry.m_hasLocalMaterial = true;
|
visual.m_geometry.m_hasLocalMaterial = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -789,14 +789,14 @@ void SimpleOpenGL3App::dumpFramesToVideo(const char* mp4FileName)
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
sprintf(cmd, "ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s %dx%d -i - "
|
sprintf(cmd, "ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s %dx%d -i - "
|
||||||
"-threads 0 -y -b:v 50000k -t 20 -c:v libx264 -preset slow -crf 22 -an -pix_fmt yuv420p -vf vflip %s", width, height, mp4FileName);
|
"-threads 0 -y -b:v 50000k -c:v libx264 -preset slow -crf 22 -an -pix_fmt yuv420p -vf vflip %s", width, height, mp4FileName);
|
||||||
|
|
||||||
//sprintf(cmd, "ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s %dx%d -i - "
|
//sprintf(cmd, "ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s %dx%d -i - "
|
||||||
// "-y -crf 0 -b:v 1500000 -an -vcodec h264 -vf vflip %s", width, height, mp4FileName);
|
// "-y -crf 0 -b:v 1500000 -an -vcodec h264 -vf vflip %s", width, height, mp4FileName);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
sprintf(cmd, "ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s %dx%d -i - "
|
sprintf(cmd, "ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s %dx%d -i - "
|
||||||
"-threads 0 -y -b 50000k -t 20 -c:v libx264 -preset slow -crf 22 -an -pix_fmt yuv420p -vf vflip %s", width, height, mp4FileName);
|
"-threads 0 -y -b 50000k -c:v libx264 -preset slow -crf 22 -an -pix_fmt yuv420p -vf vflip %s", width, height, mp4FileName);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//sprintf(cmd,"ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s %dx%d -i - "
|
//sprintf(cmd,"ffmpeg -r 60 -f rawvideo -pix_fmt rgba -s %dx%d -i - "
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#include "../SharedMemory/PhysicsClientC_API.h"
|
#include "../SharedMemory/PhysicsClientC_API.h"
|
||||||
#include "../SharedMemory/PhysicsDirectC_API.h"
|
#include "../SharedMemory/PhysicsDirectC_API.h"
|
||||||
#include "../SharedMemory/SharedMemoryInProcessPhysicsC_API.h"
|
#include "../SharedMemory/SharedMemoryInProcessPhysicsC_API.h"
|
||||||
@@ -398,6 +399,22 @@ static PyObject* pybullet_disconnectPhysicsServer(PyObject* self,
|
|||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void b3pybulletExitFunc()
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
for (i=0;i<MAX_PHYSICS_CLIENTS;i++)
|
||||||
|
{
|
||||||
|
if (sPhysicsClients1[i])
|
||||||
|
{
|
||||||
|
b3DisconnectSharedMemory(sPhysicsClients1[i]);
|
||||||
|
sPhysicsClients1[i] = 0;
|
||||||
|
sNumPhysicsClients--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static PyObject* pybullet_saveWorld(PyObject* self, PyObject* args, PyObject* keywds)
|
static PyObject* pybullet_saveWorld(PyObject* self, PyObject* args, PyObject* keywds)
|
||||||
{
|
{
|
||||||
const char* worldFileName = "";
|
const char* worldFileName = "";
|
||||||
@@ -5453,6 +5470,10 @@ initpybullet(void)
|
|||||||
Py_INCREF(SpamError);
|
Py_INCREF(SpamError);
|
||||||
PyModule_AddObject(m, "error", SpamError);
|
PyModule_AddObject(m, "error", SpamError);
|
||||||
|
|
||||||
|
|
||||||
|
Py_AtExit( b3pybulletExitFunc );
|
||||||
|
|
||||||
|
|
||||||
#ifdef PYBULLET_USE_NUMPY
|
#ifdef PYBULLET_USE_NUMPY
|
||||||
// Initialize numpy array.
|
// Initialize numpy array.
|
||||||
import_array();
|
import_array();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public:
|
|||||||
{
|
{
|
||||||
std::string arg = argv[i];
|
std::string arg = argv[i];
|
||||||
|
|
||||||
if ((arg[0] != '-') || (arg[1] != '-')) {
|
if ((arg.length() < 2) || (arg[0] != '-') || (arg[1] != '-')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user