- int w;
- if (m_isPal) w = 768;
- else w = 640;
- pix = KThumb::getImage(m_view.background_image->url(), 0, w, m_height);
- pix = pix.scaled(m_width, m_height);
+ m_movieLength = -1;
+ QString profileName = DvdWizardVob::getDvdProfile(m_format);
+ Mlt::Profile profile(profileName.toUtf8().constData());
+ profile.set_explicit(true);
+ Mlt::Producer *producer = new Mlt::Producer(profile, m_view.background_image->url().path().toUtf8().data());
+ if (producer && producer->is_valid()) {
+ pix = QPixmap::fromImage(KThumb::getFrame(producer, 0, m_finalSize.width(), m_width, m_height));
+ m_movieLength = producer->get_length();
+ }
+ if (producer) delete producer;