On Sat, Dec 6, 2014 at 5:27 AM, Janne Liljeblad <janne.liljeb...@gmail.com>
wrote:

> Hi,
>
> I was trying to get JACK audio working and have been testing it on my
> system. i used QjackCtl program to start JACK and view messages.
>
> Result was that jack output using melt worked, but Shotcut(14.08.01)
> and Flowbladed didn't.
>
> Latest Shotcut also seems to crash on my system


Does 14.08 still work for you? I just discovered and fixed a launch a
problem on older versions of OS X. The fix is a universal fix, however. In
other words, while I did not reproduce the problem elsewhere, in theory I
suppose it could have affected more systems. So, the fix is applied
independent of a OS test, and I have a new version 14.12.06 I am going to
post today.


> terminal printout and gdb crash trace attached.
>

>From these, it simply looks like the OpenGL Qt 5 is trying to do is
incompatible with your system, but I think it could also be related to the
above.


>
> So after pressing Start on QjackCtl I got these messages:
> ---
> 01:39:38.419 D-BUS: JACK server was started (org.jackaudio.service aka
> jackdbus).
> Fri Dec  5 01:39:38 2014: Starting jack server...
> Fri Dec  5 01:39:38 2014: JACK server starting in realtime mode with
> priority 10
> Fri Dec  5 01:39:38 2014: Acquired audio card Audio0
> Fri Dec  5 01:39:38 2014: creating alsa driver ...
> hw:0|-|1024|2|48000|0|0|nomon|swmeter|-|32bit
> Fri Dec  5 01:39:38 2014: configuring for 48000Hz, period = 1024
> frames (21.3 ms), buffer = 2 periods
> Fri Dec  5 01:39:38 2014: ALSA: final selected sample format for
> playback: 32bit integer little-endian
> Fri Dec  5 01:39:38 2014: ALSA: use 2 periods for playback
> Fri Dec  5 01:39:38 2014: graph reorder: new port 'system:playback_1'
> Fri Dec  5 01:39:38 2014: New client 'system' with PID 0
> Fri Dec  5 01:39:38 2014: graph reorder: new port 'system:playback_2'
> Fri Dec  5 01:39:38 2014: graph reorder: new port 'system:playback_3'
> Fri Dec  5 01:39:38 2014: graph reorder: new port 'system:playback_4'
> Fri Dec  5 01:39:38 2014: graph reorder: new port 'system:playback_5'
> Fri Dec  5 01:39:38 2014: graph reorder: new port 'system:playback_6'
> Fri Dec  5 01:39:38 2014: graph reorder: new port 'system:playback_7'
> Fri Dec  5 01:39:38 2014: graph reorder: new port 'system:playback_8'
> Fri Dec  5 01:39:39 2014: Saving settings to
> "/home/janne/.config/jack/conf.xml" ...
> 01:39:40.648 JACK connection change.
> 01:39:40.649 Server configuration saved to "/home/janne/.jackdrc".
> 01:39:40.649 Statistics reset.
> 01:39:40.658 Client activated.
> 01:39:40.662 JACK connection graph change.
> Fri Dec  5 01:39:40 2014: New client 'qjackctl' with PID 2903
> ---
>
> So jack server is running with realtime mode and 48000Hz frequency.
>
> Then I run melt with command: melt /home/janne/movie.mpg -consumer sdl
> audio_off=1 frequency=48000 -attach jackrack out_1=system:playback_1
> out_2=system:playback_2
>
> Everything seems to work:
> ---
> 01:40:07.287 JACK connection graph change.
> Fri Dec  5 01:40:07 2014: New client 'mlt3056' with PID 3056
> 01:40:07.588 JACK connection graph change.
> 01:40:07.969 JACK connection graph change.
> 01:40:08.335 JACK connection graph change.
> 01:40:08.555 JACK connection change.
> 01:40:08.560 JACK connection graph change.
> Fri Dec  5 01:40:07 2014: Connecting 'mlt3056:out_1' to 'system:playback_1'
> Fri Dec  5 01:40:07 2014: Connecting 'mlt3056:out_1' to 'mlt3056:in_1'
> Fri Dec  5 01:40:07 2014: Connecting 'mlt3056:out_2' to 'system:playback_2'
> Fri Dec  5 01:40:07 2014: Connecting 'mlt3056:out_2' to 'mlt3056:in_2'
> Fri Dec  5 01:40:07 2014: Disconnecting 'mlt3056:out_1' from 'mlt3056:in_1'
> Fri Dec  5 01:40:07 2014: Disconnecting 'mlt3056:out_2' from 'mlt3056:in_2'
> Fri Dec  5 01:40:07 2014: Disconnecting 'mlt3056:out_1' from
> 'system:playback_1'
> Fri Dec  5 01:40:07 2014: Disconnecting 'mlt3056:out_2' from
> 'system:playback_2'
> Fri Dec  5 01:40:07 2014: Client 'mlt3056' with PID 3056 is out
> Fri Dec  5 01:40:07 2014: New client 'mlt3056' with PID 3056
> Fri Dec  5 01:40:08 2014: Connecting 'mlt3056:out_1' to 'system:playback_1'
> Fri Dec  5 01:40:08 2014: Connecting 'mlt3056:out_1' to 'mlt3056:in_1'
> Fri Dec  5 01:40:08 2014: Connecting 'mlt3056:out_2' to 'system:playback_2'
> Fri Dec  5 01:40:08 2014: Connecting 'mlt3056:out_2' to 'mlt3056:in_2'
> ---
> melt window closed:
> ---
> 01:40:59.885 JACK connection graph change.
> 01:41:00.039 JACK connection change.
> Fri Dec  5 01:40:59 2014: Disconnecting 'mlt3056:out_1' from 'mlt3056:in_1'
> Fri Dec  5 01:40:59 2014: Disconnecting 'mlt3056:out_2' from 'mlt3056:in_2'
> Fri Dec  5 01:40:59 2014: Disconnecting 'mlt3056:out_1' from
> 'system:playback_1'
> Fri Dec  5 01:40:59 2014: Disconnecting 'mlt3056:out_2' from
> 'system:playback_2'
> Fri Dec  5 01:40:59 2014: Client 'mlt3056' with PID 3056 is out
> ---
>
> So far so good. The I launched Shotcut. No messages before I do playback.
>
> ---
> 01:47:11.215 JACK connection graph change.
> 01:47:11.346 JACK connection graph change.
> 01:47:11.476 JACK connection change.
> Fri Dec  5 01:47:11 2014: New client 'mlt3178' with PID 3178
> Fri Dec  5 01:47:11 2014: Connecting 'mlt3178:out_1' to 'mlt3178:in_1'
> Fri Dec  5 01:47:11 2014: ERROR: JackGraphManager::Connect already
> connected port_src = 9 port_dst = 10
> Fri Dec  5 01:47:11 2014: Connecting 'mlt3178:out_2' to 'mlt3178:in_2'
> Fri Dec  5 01:47:11 2014: ERROR: JackGraphManager::Connect already
> connected port_src = 11 port_dst = 12
> ---
>
> Video playback works but no audio comes out from system.


As strange as this might seem, Shotcut does not presume that you want to
use JACK to output Shotcut's audio. If you want that, you need to establish
the connections yourself. In your melt command you did that.

JACK introduces all sorts of possible workflows. In my experience, it is
not common that someone is using JACK as a mundane audio server for mixing
desktop environment sounds and desktop apps. Rather, it seems more the
domain for people using audio apps. in that case, more often than not, it
is my belief that people do not care about the audio from the video editor.
Rather, they want the transport sync and care about the audio from their
audio editor. That is the workflow for which Shotcut is tuned. One can
manually still choose the option of using JACK for a simple audio server by
establishing a connection in their tool of choice. Also, I am not very
confident about my understanding of JACK workflows and ways to make them
easier to use in a video editor.

Surely, this can be improved, but I am not working on it now.


> After I close Shotcut I get these messages.
>
> ---
> 01:48:25.583 XRUN callback (1).
> 01:48:25.761 JACK connection graph change.
> 01:48:25.935 JACK connection change.
> Fri Dec  5 01:48:25 2014: ERROR: JackEngine::XRun: client = mlt3178
> was not finished, state = Running
> Fri Dec  5 01:48:25 2014: ERROR:
> JackAudioDriver::ProcessGraphAsyncMaster: Process error
> Fri Dec  5 01:48:25 2014: ERROR:
> JackAudioDriver::ProcessGraphAsyncMaster: Process error
> Fri Dec  5 01:48:25 2014: ERROR:
> JackAudioDriver::ProcessGraphAsyncMaster: Process error
> Fri Dec  5 01:48:25 2014: ERROR:
> JackAudioDriver::ProcessGraphAsyncMaster: Process error
> Fri Dec  5 01:48:25 2014: ERROR:
> JackAudioDriver::ProcessGraphAsyncMaster: Process error
> Fri Dec  5 01:48:25 2014: ERROR:
> JackAudioDriver::ProcessGraphAsyncMaster: Process error
> Fri Dec  5 01:48:25 2014: ERROR:
> JackAudioDriver::ProcessGraphAsyncMaster: Process error
> Fri Dec  5 01:48:25 2014: ERROR:
> JackAudioDriver::ProcessGraphAsyncMaster: Process error
> Fri Dec  5 01:48:25 2014: ERROR:
> JackAudioDriver::ProcessGraphAsyncMaster: Process error
> Fri Dec  5 01:48:25 2014: Disconnecting 'mlt3178:out_1' from 'mlt3178:in_1'
> Fri Dec  5 01:48:25 2014: Disconnecting 'mlt3178:out_2' from 'mlt3178:in_2'
> Fri Dec  5 01:48:25 2014: ERROR: Failed to find port 'mlt3178:in_1' to
> destroy
> Fri Dec  5 01:48:25 2014: ERROR: Failed to find port 'mlt3178:in_2' to
> destroy
> Fri Dec  5 01:48:25 2014: ERROR: Failed to find port 'mlt3178:out_1' to
> destroy
> Fri Dec  5 01:48:25 2014: ERROR: Failed to find port 'mlt3178:out_2' to
> destroy
> Fri Dec  5 01:48:25 2014: Client 'mlt3178' with PID 3178 is out
> ----
>

Yeah, I do not know. I just made a test and did not get those.


> The I started Flowblade. The code I'm using to turn on jack output is:
>
>         self.consumer.set("audio_off", "1")
>         self.consumer.set("frequency", "48000")
>
>         self.jack_output_filter = mlt.Filter(self.profile, "jackrack")
>         self.jack_output_filter.set("out_1", "system:playback_1")
>         self.jack_output_filter.set("out_2", "system:playback_2")
>
>         self.consumer.attach(self.jack_output_filter)
>
>
That looks OK to me.


> consumer is SDLConsumer here.
>
> Scratching on timeline works, and playback for about a second, but
> then Flowblade playback hangs and python process shoots up 20-40% CPU.
>
> GUI stays responsive and program runs basically normally, but playback
> no longer works until program is closed and restarted. So probably
> some MLT thread enters some busy loop and never leaves.
>
> Messages that are printed at start up:
> ---
> 01:56:02.884 JACK connection graph change.
> 01:56:02.946 JACK connection change.
> 01:56:02.957 JACK connection graph change.
> Fri Dec  5 01:56:02 2014: New client 'mlt3513' with PID 3513
> Fri Dec  5 01:56:02 2014: Connecting 'mlt3513:out_1' to 'system:playback_1'
> Fri Dec  5 01:56:02 2014: Connecting 'mlt3513:out_1' to 'mlt3513:in_1'
> Fri Dec  5 01:56:02 2014: Connecting 'mlt3513:out_2' to 'system:playback_2'
> Fri Dec  5 01:56:02 2014: Connecting 'mlt3513:out_2' to 'mlt3513:in_2'
> ---
> I did gdb trace at this point that is attached.
>
> After playback is started and hangs no more messages are printesd
> until I force close terminal used to start Flowblade, then we get:
> ---
> 01:56:59.733 JACK connection graph change.
> 01:56:59.855 JACK connection change.
> Fri Dec  5 01:56:59 2014: Disconnecting 'mlt3513:out_1' from 'mlt3513:in_1'
> Fri Dec  5 01:56:59 2014: Disconnecting 'mlt3513:out_2' from 'mlt3513:in_2'
> Fri Dec  5 01:56:59 2014: Disconnecting 'mlt3513:out_1' from
> 'system:playback_1'
> Fri Dec  5 01:56:59 2014: Disconnecting 'mlt3513:out_2' from
> 'system:playback_2'
> Fri Dec  5 01:56:59 2014: ERROR: Failed to find port 'mlt3513:in_1' to
> destroy
> Fri Dec  5 01:56:59 2014: ERROR: Failed to find port 'mlt3513:in_2' to
> destroy
> Fri Dec  5 01:56:59 2014: ERROR: Failed to find port 'mlt3513:out_1' to
> destroy
> Fri Dec  5 01:56:59 2014: ERROR: Failed to find port 'mlt3513:out_2' to
> destroy
> Fri Dec  5 01:56:59 2014: Client 'mlt3513' with PID 3513 is out
> ---
>

Sorry, but the messages are not speaking to me in a way that I can tell you
what is going wrong. I do not work with the JACK code often to suggest
something about the errors.


> If I export the sequence as MLT XML file and do melt playback it works.
>
> So melt jack playback works, Shotcut is doing something at connection
> phase that doesn't work, and Flowblade connects and seems to work, but
> then hangs on playback.
>
> I can't test on latest Shotcut as it crashes, info attached.
>
> If you have any ideas if I'm doing something wrong on Flowblade those
> would be appreciated. I can also test Shotcut on my system to fix
> crash/jack playback.
>
>
> Regards,
>
> Janne
>
>
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to