Issue 12911 - Video Support under linux
Summary: Video Support under linux
Status: CLOSED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: code (show other issues)
Version: OOo 1.1 RC4
Hardware: PC Linux, all
: P3 Trivial with 2 votes (vote)
Target Milestone: OOo 2.0
Assignee: marc.neumann
QA Contact: Unknown
URL:
Keywords:
: 18652 (view as issue list)
Depends on:
Blocks: 19134
  Show dependency tree
 
Reported: 2003-04-01 13:47 UTC by tschlechter
Modified: 2013-03-06 22:20 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
cleanup mplayer plugin support (2.09 KB, patch)
2004-01-06 18:11 UTC, opoplawski
no flags Details | Diff
video (2.09 KB, patch)
2013-03-06 22:20 UTC, anna.wysocka18
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description tschlechter 2003-04-01 13:47:40 UTC
Will there be video-support for OpenOffice version 1.1 running under Linux as 
suggested by the greyed-out menu-entry "Insert-->Video"? What video-formats 
will be supported?
Comment 1 wolframgarten 2003-04-01 14:03:17 UTC
Reassigned to Bettina.
Comment 2 horkana 2003-04-15 20:39:11 UTC
this bug report describes a workaround 
http://www.openoffice.org/project/www/issues/show_bug.cgi?id=6979



Comment 3 eric.savary 2003-04-16 15:33:25 UTC
Set to "NEW"
Comment 4 tschlechter 2003-09-29 08:26:30 UTC
Table of Content
================
0. Priority considerations
1. Fix
2. Required additional Software setup
3. Remaining Problems


0. Priority considerations
==========================
Videos are very important in scientific presentations. On conferences,
good presenters demonstrate the results of their work with videos.  As
we lastly experienced, videos can decide about funding or not funding
of a project.
Thus, non-working video support in OpenOffice.org will be a reason for
us to cancel migration to OpenOffice by the end of the year.
So I just had a look at the sources (of OOo 1.1.0rc4) and tried to
find some kind of a fix.


1. Fix
======
Patching 3 files does the whole thing for videos on linux (OOo1.1.0rc4):
in file: extensions/source/plugin/base/manager.cxx

change the only appearance of sal_False in the call of
provideNewStream to sal_True

in file: extensions/source/plugin/base/context.cxx

change the only appearance of sal_False in the call of
provideNewStream to sal_True

in file: extensions/source/plugin/base/xplugin.cxx

around line 673 in call of NPP_NewStream change constant sal_False
back to isfile. (This did not make sense, as isfile was constantly
sal_False by call)

All changes only affect one binary file, namely libpl645li.so. The
patched binary of OOo 1.1.0 rc4 works with OOo 1.1.0 rc5 as well.


2. Required additional Software setup
=====================================
After that, you should get the newest mplayerplug-in (I used 0.91),
copy the mplayerplug-in.so file into the directory
OpenOffice.org1.1.0/user/plugin/ and make sure you have the following
entries in your /etc/mplayerplugin.conf:
prefer-aspect=1
vo=x11
scaling=0
use-gui=no

Then you need mplayer (I used 1.0pre1) but you will have to fix some
bugs here as well. (see
http://mplayerhq.hu/pipermail/mplayer-users/2003-September/037841.html
and
http://mplayerhq.hu/pipermail/mplayer-users/2003-September/037842.html)


3. Remaining Problems
=====================
Finally, you will have working videos! Unfortunately Flash-plugin
still crashes OpenOffice. Inserting Java-applets still works, but I
think, they do not use the plugin. I did not try other plugins, as I
do not know what else should be needed.

Inserted videos will start running immediately upon insertion or upon
page switch. You may resize them in "drawing mode". Unfortunately, you
may not really communicate with them, i.e. you may not start them or
restart them by clicking, you may not loop them, they are not included
in the animation sequence of the slide, they are not printable (first
frame should represent the video, in fact this could be done manually,
if only the video could be part of an animation sequence). Upon page
switch, OpenOffice does not really clean up. This does not affect
mplayer, who terminates after the video is finished or crashes when
his window disappears, but there is still a process pluginapp.bin
running as zombie. Each restart of the video, caused by changing
pages, causes a zombieprocess pluginapp.bin. And those may leave a
black "window" at the video location on the screen in some of the
slide display modes (e.g. the notes page). Changing the order of the
slides by the tabs in drawing mode causes the videos not to display in
the visible top-window of OOo any longer. Restarting OpenOffice with
the reordered slides does work again.

Unfortunately I do not have the time and capabilities to fix those
more high level problems.


Keywords: OpenOffice, Linux, Presentation, Video, Fix, Workaround
Comment 5 tschlechter 2003-10-01 06:21:31 UTC
Additional Fix to clean up zombie-processes of pluginapp.bin:

In file 
extensions/source/plugin/unx/sysplug.cxx:
Add
wait4(m_nCommPID,0,0,0);
after line
kill( m_nCommPID, 9 );
in destructor
UnxPluginComm::~UnxPluginComm()

You need the following additional includes in the same file:
#include <sys/resource.h>
#include <sys/wait.h>

All changes affects the one and only binary file libpl645li.so

On the notes view, videos are shown but in broken size (OOo 1.1.0 rc5)
When reordering slides, the filename of included videos will be lost
(verified in XML of document file) (OOo 1.1.0 rc5)
Comment 6 opoplawski 2004-01-06 18:06:05 UTC
I'm attaching a patchset I made for OO 1.1 for the changes described above in
case it is of any use.  Also, while this seems to fix the problem with stale
processes, there are copies of the movie being left in /tmp.  It looks like OO
is using a "kill 9" to stop the plugin which seems drastic.  The plugin should
be able to clean up after itself like it does when run from mozilla.
Comment 7 opoplawski 2004-01-06 18:11:05 UTC
Created attachment 12300 [details]
cleanup mplayer plugin support
Comment 8 Martin Hollmichel 2004-02-08 01:15:13 UTC
mh->ka: can you please dispatch and/or set target milestone in correct way ?
Comment 9 Martin Hollmichel 2004-02-08 01:17:08 UTC
reset target milestone from next build.
Comment 10 fa 2004-02-08 01:27:13 UTC
Looking at the patch, I have a number of concerns.

1) The comments in provideNewStream() explicitly say that the sal_False was changed from isfile 
becuase plugins like Acrobat Reader don't want an on-disk file

    // sal_False in the following statement should logically be isfile
    // but e.g. the acrobat reader plugin does not WANT a file

Therefore, this change should be tested with Acrobat Reader before being committed.

2) Second, the patch changes all occurances of isfile when calling provideNewStream() to sal_True.  for 
the same reasons above, this should be tested with other plugins before it can be committed.  While it 
might provide working video support, it may well break everything else.

This change will need to be QA'd first to make sure it doesn't break stuff.
Comment 11 ooo 2004-02-09 14:41:07 UTC
.
Comment 12 philipp.lohmann 2004-02-10 10:22:48 UTC
accepted
Comment 13 philipp.lohmann 2004-02-10 10:58:04 UTC
started
Comment 14 philipp.lohmann 2004-02-10 14:20:55 UTC
mplayerplugin has other problems, too. e.g. it produces a little strange mime
description, but one can workaround that. One can also workaround acrobat
reader's problem by setting seekable to false in that case. But if i apply all
that i can still not see anything being played.

You wrote i need to fix something in mplayer; besides the fact that this will
not be useful to any user unless a fixed version of mplayer gets released the
links you posted do not point to anything patch like; frankly i won't begin to
debug mplayer as it is a little out of OOo's scope. Can you give me a hint what
you think i should do to make mplayer do its work ?
Comment 15 philipp.lohmann 2004-02-10 14:44:04 UTC
*** Issue 18652 has been marked as a duplicate of this issue. ***
Comment 16 opoplawski 2004-02-10 16:35:31 UTC
mplayerplugin and mplayer play fine for me "out of the box" with version 1.0
Comment 17 philipp.lohmann 2004-02-11 09:43:07 UTC
mplayerplugin 1.2 and mplayer 0.90 do for me, too - in mozilla and konqueror. I
couldn't get it to work in OOo yet.
Comment 18 philipp.lohmann 2004-02-13 10:26:59 UTC
OK, got it to run in OOo without any meddling with mplayer. Fixed in CWS vcl18
Comment 19 opoplawski 2004-02-13 16:09:01 UTC
Are the files in /tmp cleaned up now?
Comment 20 philipp.lohmann 2004-02-13 16:18:45 UTC
not reliably. mplayerplugin should probably remove them in NPP_Destroy; i'll
have another look at that.
Comment 21 philipp.lohmann 2004-02-13 16:19:05 UTC
.
Comment 22 philipp.lohmann 2004-02-16 14:43:09 UTC
got that, too. mplayerplugin relied on Xt callbacks to remove the temp files
instead of NPP_Destroy as it IMHO should. Without its code being open i wouldn't
have been able to fix this.
Comment 23 philipp.lohmann 2004-02-19 13:12:46 UTC
adjusted component field
Comment 24 philipp.lohmann 2004-02-19 14:27:21 UTC
pl->msc: please verify in CWS vcl18
Comment 25 philipp.lohmann 2004-02-19 14:27:44 UTC
resolved
Comment 26 marc.neumann 2004-03-16 09:11:31 UTC
(process:4572): GLib-GObject-CRITICAL **: gtype.c:1871: initialization assertion
failed, use g_type_init() prior to this function
 
(process:4572): GLib-GObject-CRITICAL **: gtype.c:1871: initialization assertion
failed, use g_type_init() prior to this function
 
(process:4572): GLib-GObject-CRITICAL **: gtype.c:1871: initialization assertion
failed, use g_type_init() prior to this function
 
(process:4572): GLib-GObject-CRITICAL **: file gtype.c: line 1937
(g_type_add_interface_static): assertion `G_TYPE_IS_INSTANTIATABLE
(instance_type)' failed
 
(process:4572): GLib-GObject-CRITICAL **: gtype.c:1871: initialization assertion
failed, use g_type_init() prior to this function
 
(process:4572): GLib-GObject-CRITICAL **: gtype.c:1871: initialization assertion
failed, use g_type_init() prior to this function
 
(process:4572): GLib-GObject-CRITICAL **: gtype.c:1871: initialization assertion
failed, use g_type_init() prior to this function
 
(process:4572): GLib-GObject-CRITICAL **: file gobject.c: line 615
(g_object_new): assertion `G_TYPE_IS_OBJECT (object_type)' failed
 
Comment 27 marc.neumann 2004-03-16 09:20:07 UTC
Hi,

not fixed on my Redhat fedora core.

see my last comment for the output of OOo when insert any video or audio file.

Then the office loop.

With the current master the office doesn't loop. however I get no video play.
I have installed these Mplayer packages

mplayerplug-in-2.45-fc1
mplayer-common-1.0pre3-1
mplayer-1.0pre3-1

I copy the file mplayerplug-in.so to the ~/StarOffice8/user/plugin directory.

Bye Marc

Comment 28 philipp.lohmann 2004-03-16 12:24:24 UTC
pl->msc: the mplayer plugin you installed expects a running gtk and is in fact
linked to gtk; it cannot run in any browser that is not gtk based - which
includes OOo. We need a version that is X or Xt based.

Still a crashing plugin should not cause OOo to hang since it runs in an
external process. fixed in CWS vcl18
Comment 29 philipp.lohmann 2004-03-16 12:24:40 UTC
fixed
Comment 30 marc.neumann 2004-03-16 16:02:38 UTC
verify in CWS vcl18
Comment 31 tschlechter 2004-03-29 09:48:25 UTC
On OpenOffice 1.1.1-rc3, the filenamestring transferred to the mplayerplug-in
seems to be non NULL-Terminated...

Using my personally patched mplayerplug-in that works fine with the above
described OpenOffice patch I see that OpenOffice transmits the filename ending
with a lot of dots instead of the filename alone. MPlayer started with the
transmitted string does not find the file:

File not found: '/home/schlechter/Desktop/test.avi........................
.........................................'
Failed to open file:///home/schlechter/Desktop/test.avi............
...............................................................

(There are 86 Points, the visible string from file:/// to the last dot has a
total length of 126 characters, quite near to this magic 128 number)

Additionally, OOo freezes completely and has to be kill -9 ´ed...

My libpl645.so file, patched for OOo 1.1.0-rc4 still works with OOo 1.1.1-rc4
together with my mplayerplug-in !
Comment 32 tschlechter 2004-03-29 09:58:39 UTC
As newest mplayerplug-in is gtk-based and does no longer work with OOo, does
anybody know some other plugin, that can be used with openoffice. 

As no existing plugin supports the actual interaction from openoffice-presenter
to the videoplayer (MPlayer or whatever), i.e. transmission of starting, looping
and pausing options from OpenOffice-Presenter to some videoplayer, extracting
the first image of the video for printouts, allowing for more than one video on
a page, ... I believe OpenOffice.org should provide its own configurable plugin
(=interface to some videoplayers, imageextractors, ... with their own special
parameters).
Comment 33 rene 2004-03-29 11:05:23 UTC
Hi,

what about building the plugin with --enable-x? :-)
(which I do in Debian for exact the same reason):

 mplayerplug-in (2.45-4) unstable; urgency=low
 .
   * some programs wanting to use this plugin are not gtk(2), so
     just use --enable-x; [...]
     will _probably_ create -x and -gtk2 packages or somesuch..
[...]

Regards,

René
Comment 34 tschlechter 2004-04-01 13:35:56 UTC
plugger-5.0 is working. And it is quite easy to customize...

Unfortunately, OpenOffice 1.1.1 final still does not wait4 for pluginapp.bin
after killing it, leading to lots of zombies after intensive use of plugins.

There is another problem with different working views of a slide show:
 - Drawing view and presentation mode both work well
 - Video does not show at all in Preview (low priority)
 - Video is displayed with filename only in slides view (low priority)
 - Notes view displays the video _unscaled_ somewhere on the page... quite ugly
:-(, the same is true for handout view.  (High priority!)

I believe this view problem is video-independent, it's most probably the same
problem for all kind of plugins. 
Finally plugins in general should be allowed to be part of an animation
sequence, which in fact they seem to be. Unfortunately the allowed settings are
ignored, videos start playing directly when the slide is brought up.
Additionnally it should be possible to configure wether a "plugged in media", a
video, a flash animation, ... is played only once or more often, wether it
should be stopped after each playback or not...

Flashplayer-plugin still crashes OpenOffice.org
Inserting Java-Applets works, but they are not scaled and flicker enormously.
Both flash and java plugins would be a very very nice addon especially for
teaching, and ... M$ does not have it (yet).
Comment 35 marc.neumann 2004-04-05 14:01:02 UTC
works in src680m33s1 -> close
Comment 36 anna.wysocka18 2013-03-06 22:20:03 UTC
Created attachment 80381 [details]
video