Replies: 5 comments 1 reply
-
|
Beta Was this translation helpful? Give feedback.
-
I would eventually try to use GL texture (qglsl?), I already use this technique with mpv. Commenting the line don't fix it.
|
Beta Was this translation helpful? Give feedback.
-
I just updated the Then, I extended the play example to use a playlist and multitrack tractor as you did, and it worked #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Import required modules
from __future__ import print_function
import mlt7 as mlt
import time
import sys
# Start the mlt system
mlt.Factory().init()
# Establish a default (usually "dv_pal") profile
profile = mlt.Profile()
# Create the producer
p = mlt.Producer(profile, sys.argv[1])
if p.is_valid():
# Derive a profile based on the producer
profile.from_producer(p)
# Reload the producer using the derived profile
p = mlt.Producer(profile, sys.argv[1])
# Create the consumer
c = mlt.Consumer(profile, "sdl2")
if not c.is_valid():
print("Failed to open the sdl2 consumer")
sys.exit(1)
# Setup a multitrack
playlist = mlt.Playlist(profile)
playlist.append(p)
tractor = mlt.Tractor()
tractor.set_track(playlist, 0)
# Connect the producer to the consumer
c.connect(tractor)
# Start the consumer
c.start()
# Wait until the user stops the consumer
while not c.is_stopped():
time.sleep(1)
else:
# Diagnostics
print("Unable to open ", sys.argv[1])
sys.exit(1) If you still have trouble you need to validate your build and install of MLT using |
Beta Was this translation helpful? Give feedback.
-
Thank you very much! It worked. Then I tried to embed the SDL2 into a QWidget with no success, but I made a PR (#1033) that would enable it. We need to set it as in Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Ok, cool. And you confirm that embedding with Qt worked with your patch? |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm experimenting with MLT for a side project, and I just want to create a multitrack player, that is, I want to basically play a video file in sync with an audio file. I tried the following basic code, with no success. I just want to make sure that's not something on my system and that's really something I am missing:
It keep crashing ("Floating point exception"), no matter what I do. If I just add the audio file, the window open, but wont play anything. Otherwise, it just crash.
Versions: Ubuntu 24.04.1, Python 3.10, mlt 7.22. I compiled the latest version 7.28, but still crashing.
Thanks for your attention!
Beta Was this translation helpful? Give feedback.
All reactions