@@ -58,8 +58,6 @@ VideoExporter::VideoExporter() :
5858 needToGrab = false ;
5959 exportVideoFlag = false ;
6060
61- codecsList = {" hevc" ," libx264" ," jpeg2000" ," mjpeg" ," mpeg4" };
62- selectedCodec = 4 ;
6361 recButtonLabel = " REC" ;
6462
6563 this ->setIsTextureObj (true );
@@ -104,6 +102,7 @@ void VideoExporter::updateObjectContent(map<int,shared_ptr<PatchObject>> &patchO
104102
105103 if (this ->inletsConnected [0 ] && static_cast <ofTexture *>(_inletParams[0 ])->isAllocated () && filepath != " none" && bang){
106104 if (!recorder.isRecording ()){
105+ recorder.setVideoCodec (" hevc" );
107106 recorder.setBitRate (20000 );
108107 recorder.startCustomRecord ();
109108 recButtonLabel = " STOP" ;
@@ -275,6 +274,7 @@ void VideoExporter::drawObjectNodeConfig(){
275274 }else {
276275 if (!recorder.isRecording ()){
277276 recorder.setBitRate (20000 );
277+ recorder.setVideoCodec (" hevc" );
278278 recorder.startCustomRecord ();
279279 recButtonLabel = " STOP" ;
280280 ofLog (OF_LOG_NOTICE," START EXPORTING VIDEO" );
@@ -286,19 +286,6 @@ void VideoExporter::drawObjectNodeConfig(){
286286 }
287287 }
288288 ImGui::PopStyleColor (3 );
289- ImGui::Spacing ();
290- if (ImGui::BeginCombo (" Codec" , codecsList.at (selectedCodec).c_str () )){
291- for (int i=0 ; i < codecsList.size (); ++i){
292- bool is_selected = (selectedCodec == i );
293- if (ImGui::Selectable (codecsList.at (i).c_str (), is_selected)){
294- selectedCodec = i;
295- recorder.setVideoCodec (codecsList.at (selectedCodec));
296- }
297- if (is_selected) ImGui::SetItemDefaultFocus ();
298- }
299-
300- ImGui::EndCombo ();
301- }
302289
303290 ImGuiEx::ObjectInfo (
304291 " Export video from every texture cable (blue ones). You can choose the video codec: mpeg4, mjpeg, jpg2000, libx264, or hevc." ,
@@ -313,6 +300,7 @@ void VideoExporter::drawObjectNodeConfig(){
313300 filepath += " .avi" ;
314301 }
315302 recorder.setOutputPath (filepath);
303+ recorder.setVideoCodec (" hevc" );
316304 // prepare blank video file
317305 recorder.startCustomRecord ();
318306 recorder.stop ();
@@ -325,6 +313,7 @@ void VideoExporter::drawObjectNodeConfig(){
325313 filepath += " .mp4" ;
326314 }
327315 recorder.setOutputPath (filepath);
316+ recorder.setVideoCodec (" hevc" );
328317 // prepare blank video file
329318 recorder.startCustomRecord ();
330319 recorder.stop ();
0 commit comments