Problems with Advene on Debian

You can post here general questions about Advene in english.

Problems with Advene on Debian

Post by cinematicity » Fri Jan 21, 2011 1:07 am

After asking a number of questions on the Advene forum, and thanks to some very precise responses, I finally got it installed on Debian.

As suggested, I downloaded advene_0.45-4_all.deb , and installed it using dpkg . I'm starting it from the command line as advene .

Now, however, there are still a number of issues, in particular with the video output view. It doesn't seem to be working at all. Maybe this is pilot error, so I'll describe what I'm doing.

(1) When I first launch Advene, I get a dialog box that says:

Code: Select all
Please use the 'File/Select a video file' menuitem to associate a media file.


First, I don't find this menu item. Is this dialog supposed to say Associate a video file ?

Second, as far as I know, "menuitem" is not a noun. It should say "menu item".

(2) Next, I tried to load some mpg files using Associate a video file . These are on a data DVD. Sometimes I see that it is reading the video file for a long time (the light on the DVD drive flickers) and a number of frames are displayed below, in the "south view", but sometimes nothing happens and the application just freezes. I am disappointed that there is no progress bar or indicator to tell me what Advene is doing when it tries to load in the file. Most of the time it just seems to silently crash and I have to force quit the application.

I thought, "well, maybe it's my video file" so I tried the mpeg version of Nosferatu:

Code: Select all
http://www.archive.org/details/nosferatu


I figured this was used in the Advene demo, so it should work.

However, this mpeg doesn't seem to work any better. Sometimes I can get it loaded, but nothing appears in the video output view. Sometimes the application just freezes. Sometimes I can press play but no video appears and the application just freezes after five seconds.

In the terminal window, I see the following errors:

Code: Select all
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started


If I look in the advene.log file, I see the following:

Code: Select all
Advene v. 0.45 release 20101130 (svn 7114) run at 21/01/11 09:42:36 JST on linux2
Using localedir /usr/share/locale
ctypes RSVG support
mediacontrol: using gstreamer
SVG: Using pysvgoverlay element
gstreamer: using xvimagesink
adding ghostpad for /GstBin:bin1/GstTextOverlay:captioner (__main__.GstTextOverlay)
Reparent 0x300003fL
SVG: Using pysvgoverlay element
check player
Port 1234 not free on '127.0.0.1'
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/advene/core/controller.py", line 354, in process_queue
method(*args, **kw)
File "/usr/lib/pymodules/python2.6/cherrypy/process/wspbus.py", line 184, in start
self.publish('start')
File "/usr/lib/pymodules/python2.6/cherrypy/process/wspbus.py", line 147, in publish
output.append(listener(*args, **kwargs))
File "/usr/lib/pymodules/python2.6/cherrypy/_cpserver.py", line 90, in start
ServerAdapter.start(self)
File "/usr/lib/pymodules/python2.6/cherrypy/process/servers.py", line 53, in start
wait_for_free_port(*self.bind_addr)
File "/usr/lib/pymodules/python2.6/cherrypy/process/servers.py", line 251, in wait_for_free_port
raise IOError("Port %r not free on %r" % (port, host))
IOError: Port 1234 not free on '127.0.0.1'

/usr/lib/pymodules/python2.6/advene/gui/util/dialog.py:204: DeprecationWarning: use set_markup() instead
if not dialog.label.get_text():
Cleaning up /tmp/advLotjgL
Trying to remove non-existant rule Rule 'internal' from internal ruleset


I can't interpret this but it seems like something is perhaps fundamentally broken here.

Other problems:

(3) I notice that the video output view is not refreshing properly. If a tool tip appears for one of the pull down menus, it leaves damage in the video output view that doesn't get cleaned up.

(4) After Advene crashes, I cannot eject the data DVD that I tried to read a movie file from. I get this error:

Code: Select all
Failed to eject media; one or more volumes on the media are busy.


This is annoying. How did advene manage to hold onto the volume after crashing? Or, is this a known problem with Debian?

What should I try next?
cinematicity
Posts: 31
Joined: Sun Jan 16, 2011 7:18 am

Re: Problems with Advene on Debian

Post by oaubert » Fri Jan 21, 2011 10:47 am

Hello

Let's take the errors in order :

(1) Good remarks. I have fixed this.

(2) Some preliminary advice: Generally, MPEG is a notoriously bad format for seeking. It has been designed for streaming, and the encapsulating format does not hold any index of keyframes, so seeking is laborious for players which have to rebuild indexes or make guesses/tries about positions. This is not an Advene limitation, it is a limitation of the format. I would recommend using if possible other encapsulations such as .avi or .mkv.

It is even worse since you say you are reading from a data DVD. DVDs are also very bad at seeking, and Advene requires many random access to the video (either during the navigation, but also at the start when capturing screenshots). For the anecdote, a constraint that we have from the beginning is that we are able to deal with movie DVDs, but we crashed (hardware) 2 DVD players when using them for annotating: DVDs are simply not made to do frequent seeks. This is valid for movie DVDs and data DVDs as well.

That said, nothing prevents you from using MPEG files on DVDs, but it is basically the worst configuration you could find for this kind of work (there would also be annotating a streaming video on a bad line, but at least you do not risk crashing hardware here), and Advene (gstreamer in fact) will do as best as it can.

In a first step, could you try to copy your MPEG files to a harddisk and see if it improves the situation? If not, you can easily encapsulate a MPEG file into a .avi container with
Code: Select all
mencoder -ovc copy -oac copy -idx foo.mpg -o foo.avi

This copies the encoded audio and video streams in a .avi file and builds an index for it.

The errors about jack server socket can be ignored: there are many ways to output sound in Linux, and the audio output tries to find the most appropriate, which generates these errors. I agree that the messages are misleading, but they are generated by the gstreamer framework and tweaking it to fix this would take (precious) time for little benefit.

The output in advene.log is basically harmless for annotation: Advene embeds a small webserver to serve documents generated from the annotation data. The webserver listens on the port 1234. Since you mentioned that Advene crashed before, I can only guess that you have some Advene processes that were not properly killed, and thus still holding a socket reference to the 1234 port, preventing new Advene processes to listen to it. I have not yet found a proper (and cross-platform) way to test for this before trying to launch the webserver.

To solve this, if you execute the command
Code: Select all
netstat -lnp | grep 1234
, you will see the process ids for processes listening to the 1234 port, and you can
Code: Select all
kill -9 pid
them.

(3) The refresh issue on the video output is strange. I occurs on windows, since the video output module has some issues, but it works perfectly on my dev and test machines. The video output window is handled by the video player component (gstreamer) and a refresh issue could indicate that the player is not functioning correctly.

(4) This issue is related to the previous one (about remaining Advene processes): if there is a remnant Advene process that had opened a file on the DVD, Linux will refuse to eject the DVD since a process is using data from it. The proposed solution should solve this too.
oaubert
Site Admin
Posts: 88
Joined: Mon Jan 07, 2008 4:02 pm

Re: Problems with Advene on Debian

Post by cinematicity » Fri Jan 21, 2011 12:41 pm

Thanks again for lots of helpful pointers.

I rebooted the machine and tried Advene using nosferatuVCD.mpg from archive.org. It's on the hard disk, not a DVD, but I cannot get it to play.

I'm just starting Advene, selecting Associate a video file , choosing nosferatuVCD.mpg from my home directory, and it hangs. One out of three or four times I see a bunch of thumbnail frames appear below, but if I try to play the film Advene hangs again. I've tried three or four different films, but I haven't seen the player work at all yet. I also tried a film in avi format, also on the hard disk. Same result: the application freezes.

Advene isn't giving me an actual error message, but if I had to guess about the failure, I'd say that something isn't right with the installation of the application or else my upgrade to Squeeze is funny, and Advene lacks the exception or error-handling code to recognize this situation.

At this point, I'm stuck again. Is there anything else I can do to collect more useful information about why the application is freezing? Is there a debugging mode of some sort?
cinematicity
Posts: 31
Joined: Sun Jan 16, 2011 7:18 am

Re: Problems with Advene on Debian

Post by oaubert » Fri Jan 21, 2011 2:00 pm

Advene delegates all video playing work to gstreamer, so most if not all issues are gstreamer issues. I have downloaded the MPEG4 and MPEG1 files from http://www.archive.org/details/nosferatu and both play without any problem on my machine (Debian/testing). You can:

1- check that you have installed all the gstreamer-related packages: gstreamer0.10-plugins-good, gstreamer0.10-plugins-bad, gstreamer0.10-plugins-ugly, gstreamer0.10-ffmpeg, gstreamer0.10-gnonlin. If this solves your issues, I think I would need to put them in the Recommends: or Suggests: field of the Debian package.

2- try to directly use gstreamer from command-line to see if it is where the issue lies:
Code: Select all
gst-launch-0.10  playbin2 uri=file:///tmp/nosferatuVCD_512kb.mp4
oaubert
Site Admin
Posts: 88
Joined: Mon Jan 07, 2008 4:02 pm

Re: Problems with Advene on Debian

Post by cinematicity » Sat Jan 22, 2011 4:10 am

I tried this:

Code: Select all
gst-launch-0.10 playbin2 uri=file:///home/me/nosferatuVCD.mpg


It plays the mpg -- works fine.

I checked which gstreamer packages are installed. Everything you mentioned was there, except for gstreamer0.10-gnonlin . I tried installing that with aptitude , and then tried advene again. Same problem -- it freezes when I try to use the video player.

For reference, here are the gstreamer packages that I have installed:

Code: Select all
gstreamer0.10-alsa         install
gstreamer0.10-ffmpeg         install
gstreamer0.10-fluendo-mp3      install
gstreamer0.10-gnonlin         install
gstreamer0.10-nice            install
gstreamer0.10-plugins-bad         install
gstreamer0.10-plugins-base      install
gstreamer0.10-plugins-good      install
gstreamer0.10-plugins-ugly      install
gstreamer0.10-tools            install
gstreamer0.10-x            install


What should I check now?
cinematicity
Posts: 31
Joined: Sun Jan 16, 2011 7:18 am

Re: Problems with Advene on Debian

Post by oaubert » Mon Jan 24, 2011 8:52 pm

Hello

It could be that previous settings may interfere. You can try to quit advene, delete the $HOME/.advene directory where Advene stores its settings, and start again.

If it still does not work, check in the Player/Select Player menu that gstreamer is selected (prefixed with >). If not, select it.

If there are still issues, you can try to change the video output setting (Edit/Preferences menu, then Video Player tab, and try X11 for video output).

As last measure, launch Advene with gstreamer debug activated:
Code: Select all
GST_DEBUG=\*:3 advene > /tmp/gst.log 2>&1

try to play a file, quit Advene and send me the generated file /tmp/gst.log.
oaubert
Site Admin
Posts: 88
Joined: Mon Jan 07, 2008 4:02 pm

Re: Problems with Advene on Debian

Post by cinematicity » Sat Feb 05, 2011 7:33 am

Sorry about the delay. I looked at advene again.

I deleted the $HOME/.advene directory, checked the Player/Select Player setting, and tried again. Same problem: no video and advene locks up.

I changed the video output setting to X11 and tried again. It plays, but only a few frames per second and it looks like the video image is cropped.

I launched advene with debug activated for gstreamer. The log file is 6,771,616 bytes long. How should I send it to you?

Thanks.
cinematicity
Posts: 31
Joined: Sun Jan 16, 2011 7:18 am

Re: Problems with Advene on Debian

Post by oaubert » Mon Feb 07, 2011 10:26 am

Strange problems indeed. You can send the log file via e-mail (olivier.aubert at liris.cnrs.fr) or through a file sharing service like yousendit.com or dl.free.fr
oaubert
Site Admin
Posts: 88
Joined: Mon Jan 07, 2008 4:02 pm


Return to English questions