diff --git a/src/WorkflowFileRenderer.cpp b/src/WorkflowFileRenderer.cpp index 521640ed2bf0a6d644fa45908b0529f43f21b081..63d8edfec481566f8117843abe89744af2327a1d 100644 --- a/src/WorkflowFileRenderer.cpp +++ b/src/WorkflowFileRenderer.cpp @@ -42,6 +42,8 @@ void WorkflowFileRenderer::run() m_media->addOption( buffer ); m_media->addOption( ":no-audio" ); m_media->addOption( ":fake" ); + sprintf(buffer, ":fake-duration=%lli", m_mainWorkflow->getLength() ); +// m_media->addOption( buffer ); QString transcodeStr = "sout=#transcode{vcodec=mp4v,vb=800,acodec=mpga,ab=128}" ":standard{access=file,mux=ps,dst=\"" diff --git a/src/gui/RenderPreviewWidget.cpp b/src/gui/RenderPreviewWidget.cpp index e4b15995437822f64244a182b3897007ac1fa37a..dea0fa7ecf1f63e7e0d4620ab3c9758170c33ac1 100644 --- a/src/gui/RenderPreviewWidget.cpp +++ b/src/gui/RenderPreviewWidget.cpp @@ -108,9 +108,13 @@ void RenderPreviewWidget::stopPreview() void RenderPreviewWidget::startPreview( Media* ) { + char buff[128]; + connect( m_mainWorkflow, SIGNAL( frameChanged(qint64) ), Timeline::getInstance()->tracksView()->tracksCursor(), SLOT( updateCursorPos( qint64 ) ) ); m_mainWorkflow->startRender(); + sprintf( buff, ":fake-duration=%lli", m_mainWorkflow->getLength() / FPS * 1000 ); + m_media->addOption( buff ); m_mediaPlayer->play(); m_isRendering = true; m_paused = false;