colinkeenan / silentcast

Create silent mkv screencast and animated gif.
GNU General Public License v3.0
512 stars 22 forks source link

Setup Not Working #33

Closed Xarcell closed 7 years ago

Xarcell commented 7 years ago

I am a ubuntu novice.

Anyway, I have installed it per instructions.

When I load it, it comes to the first screen. I edit my path to where I want the images at, and click ok, then nothing else happens. I don't know if this is intentional or not. Either way, it seems that is all I can do with this app.

The instructions say there should be additional setup pages? Also, there are no silentcast icons in the notification area.

I am using ubuntu 16.04.

colinkeenan commented 7 years ago

Please open a terminal and type silentcast, then press enter. In Ubuntu, I think you can get the terminal very quickly by pressing the 2 keys Ctrl+Enter at the same time. Otherwise, just search on "terminal". Next, highlight and copy the output shown in the terminal using mouse right-click->copy (because Ctrl-C isn't for copying in the terminal). Then, please paste that output here so I can see what errors there may be, if any.

Xarcell commented 7 years ago

When I type in silentcast in the terminal, it says "Sorry, there is nothing that matches your search".

Xarcell commented 7 years ago

Excuse me, "silentcast", not "silientcast".

Xarcell commented 7 years ago

Sorry, I made a mistake. Got too many issues I'm trying to do at once. When I type in "silentcast" in the terminal, it says nothing. However, the silentcast app loads, then afterwards it says:

xarcell@Xarcell-Ubuntu:~$ silentcast
/home/xarcell
f
8
/home/xarcell/silentcast
Unity, Pantheon, or Plasma 5 detected. Switching indicators...
/usr/share/silentcast/unity_indicator.py:3: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
/usr/share/silentcast/unity_indicator.py:4: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
  from gi.repository import AppIndicator3 as appindicator
ffmpeg version 2.8.8-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, x11grab, from ':0+0,0':
  Duration: N/A, start: 1477756542.896633, bitrate: N/A
    Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1600x900, 8 fps, 8 tbr, 1000k tbn, 8 tbc
Output #0, matroska, to '/home/xarcell/silentcast/temp.mkv':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), rgb24, 1600x900, q=2-31, 200 kb/s, 8 fps, 1k tbn, 8 tbc
    Metadata:
      encoder         : Lavc56.60.100 ffvhuff
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
frame=    7 fps=0.0 q=-0.0 size=    8329kB time=00:00:00.75 bitrate=90971.4kbitsframe=   11 fps= 10 q=-0.0 size=   13880kB time=00:00:01.25 bitrate=90966.6kbitsframe=   16 fps=9.4 q=-0.0 size=   20818kB time=00:00:01.87 bitrate=90953.5kbitsframe=   20 fps=9.1 q=-0.0 size=   26368kB time=00:00:02.37 bitrate=90949.5kbitsframe=   24 fps=8.9 q=-0.0 size=   31920kB time=00:00:02.87 bitrate=90953.2kbitsframe=   28 fps=8.8 q=-0.0 size=   37474kB time=00:00:03.37 bitrate=90958.5kbitsframe=   32 fps=8.7 q=-0.0 size=   43026kB time=00:00:03.87 bitrate=90959.6kbitsframe=   37 fps=8.6 q=-0.0 size=   49954kB time=00:00:04.50 bitrate=90937.6kbitsframe=   42 fps=8.5 q=-0.0 size=   56897kB time=00:00:05.12 bitrate=90946.5kbitsframe=   46 fps=8.4 q=-0.0 size=   62454kB time=00:00:05.62 bitrate=90955.5kbitsframe=   49 fps=8.2 q=-0.0 Lsize=   68014kB time=00:00:06.12 bitrate=90966.6kbits/s    
video:68011kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.004234%
Exiting normally, received signal 15.
1
8
gif
/home/xarcell

(nautilus:4259): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:4259): GLib-GIO-CRITICAL **: g_dbus_interface_skeleton_unexport: assertion 'interface_->priv->connections != NULL' failed

(nautilus:4259): Gtk-CRITICAL **: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed

(nautilus:4259): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(nautilus:4259): GLib-GObject-CRITICAL **: g_signal_connect_object: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
ffmpeg version 2.8.8-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
Input #0, matroska,webm, from 'temp.mkv':
  Metadata:
    ENCODER         : Lavf56.40.101
  Duration: 00:00:06.13, start: 0.000000, bitrate: 90966 kb/s
    Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), bgr0, 1600x900, SAR 1:1 DAR 16:9, 8 fps, 8 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc56.60.100 ffvhuff
      DURATION        : 00:00:06.125000000
Output #0, image2, to 'ew-%03d.png':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: png, rgb24, 1600x900 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 8 fps, 8 tbn, 8 tbc (default)
    Metadata:
      DURATION        : 00:00:06.125000000
      encoder         : Lavc56.60.100 png
Stream mapping:
  Stream #0:0 -> #0:0 (ffvhuff (native) -> png (native))
Press [q] to stop, [?] for help
frame=   49 fps= 40 q=-0.0 Lsize=N/A time=00:00:06.12 bitrate=N/A    
video:11782kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

(yad:4263): GLib-CRITICAL **: g_source_remove: assertion 'tag > 0' failed
colinkeenan commented 7 years ago

Ok, let me take a look at that. I was about to ask you to figure out what shell you were running, because that would've been a very unusual error message for any shell in that situation.

Xarcell commented 7 years ago

I don't know what a shell is. I'm using Ubuntu 16.04 default setup, with very few apps installed. I tried to install Byznte, nothing happened. I installed Kazaam through the app center.

The silentcast app seems to work if I launch it through the terminal, but since I've never used it, I don't know how to it's supposed to work.

colinkeenan commented 7 years ago

You are using the bash shell then. It would not have given you the error you said that it did though. For example, if I make a typo, bash says: bash: silientcast: No such file or directory.

Anyway, it was recording your whole screen.

  1. Did you see the notification area icon this time?
  2. If so, did you stop the recording from there? If so, it should've brought up some more dialogs and then open the folder where the animated gif was made. I see errors though concerning Nautilus (Ubuntu's file manager application). So, maybe Nautilus was not able to open.
  3. What happens if you open your file manager manually and go to the folder where you wanted the gif to be made?
  4. Do you see a "silentcast" folder? If you go into that folder, do you see anim.gif (and some other things)?
colinkeenan commented 7 years ago

By the way, just in case you've got one or more ffmpeg recordings going on now due to trying to launch Silentcast many times, it might be a good idea to logout and back in.

Xarcell commented 7 years ago
  1. only after I started recording.
  2. yes, I stopped recording from there, via dropdown "done". Yes, more dialogs came up, like: "Manually delete or otherwise manipulate the images and click ok, or enter any positive integer less than the total number of images".
  3. I'm not sure I understand. I can go to the folder where anim.gif was saved, and open it with firefox. As far as a folder where it was "made", I don't know here to look.
  4. I see a silentcast folder, in multiple locations where I have attempted to save the gif. However, in "home/username/silentcast" I see a bunch of pngs.

Ok, I'll try another reboot.

colinkeenan commented 7 years ago

I think silentcast is working for you. Eventually, I will redo the UI so it less confusing. For now, please try to follow the instructions more closely and see if it makes sense to you. You can delete all the Silentcast folders where you tried to save before.

Xarcell commented 7 years ago

Ok, thanks.

After a third reboot, running the app by clicking on the icon from search seem to make it work now. When before, it seemed to stop running.

colinkeenan commented 7 years ago

I didn't try Silentcast when you reported this bug, but did just now. On KDE Plasma 5.8.2 on Arch Linux, I also saw the problem you reported. So, I am reopening this bug.

Actually, Silentcast is running, and there is an icon in the notification area, but it is invisible for some reason. Then if you run Silentcast again, it will be running twice and both notification icons will be invisible. If you right click in the right place, you can still choose "done" to stop each instance of Silentcast.

Seth-Johnson commented 7 years ago

Silentcast still works for me on Ubuntu 16.04 Unity (not KDE), which is what I assume the OP is using. I'll test on Kubuntu tomorrow and see if I can reproduce.

colinkeenan commented 7 years ago

@Seth-Johnson

This is the command (which ends up in ffcom generated by the genffcom script) which is not working on my system: python /usr/share/silentcast/unity_indicator.py 1. There are some warnings as shown below.

/home/colin %python /usr/share/silentcast/unity_indicator.py 1
/usr/share/silentcast/unity_indicator.py:3: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
/usr/share/silentcast/unity_indicator.py:4: PyGIWarning: AppIndicator3 was imported without specifying a version first. Use gi.require_version('AppIndicator3', '0.1') before import to ensure that the right version gets loaded.
  from gi.repository import AppIndicator3 as appindicator

I checked if the yad command displayed the icon, and it does, but can't be stopped in Plasma 5, which is why we are using your unity_indicator.py.

Does python /usr/share/silentcast/unity_indicator.py 1 display the icon on your system? Do you get the same warnings that I got?

colinkeenan commented 7 years ago

Just to test it out, I directly edited /usr/share/silentcast/unity_indicator.py and got rid of the warnings, but the icon is still invisible in my notification area.

By the way, the simplest way to get rid of the warnings is to just add these 3 lines at top:

import gi
gi.require_version('Gtk', '3.0')
gi.require_version('AppIndicator3', '0.1')

But, Example 3 (copied below) from http://www.programcreek.com/python/example/72048/gi.require_version is worth looking at for more robust code:

def backend_gtk3agg_internal_check(x):
    try:
        import gi
    except ImportError:
        return (False, "Requires pygobject to be installed.")

    try:
        gi.require_version("Gtk", "3.0")
    except ValueError:
        return (False, "Requires gtk3 development files to be installed.")
    except AttributeError:
        return (False, "pygobject version too old.")

    try:
        from gi.repository import Gtk, Gdk, GObject
    except (ImportError, RuntimeError):
        return (False, "Requires pygobject to be installed.")

    return (True, "version %s.%s.%s" % (
        Gtk.get_major_version(),
        Gtk.get_micro_version(),
        Gtk.get_minor_version()))
colinkeenan commented 7 years ago

@Seth-Johnson

Actually, I don't understand how unity_indicator.py knows what icon to display. There are 2 icons, stop1.png and stop2.png in /usr/share/silentcast/ with unity_indicator.py, but the words "stop1.png" and "stop2.png" do not appear anywhere in unity_indicator.py.

The yad command correctly displays the icon because the image is directly specified: yad --notification --image="/usr/share/silentcast/stop1.png" --text="1"

colinkeenan commented 7 years ago

Ok, I see it is this line which is the second item listed in the definition:

"stop{}".format(args.silentcast_number),

Which translates to either stop1 or stop2. I guess .png is assumed by default and the second item is assumed to be the icon. However, it's not working.

colinkeenan commented 7 years ago

@Seth-Johnson

Specifying the full path fixes it:

"/usr/share/silentcast/stop{}".format(args.silentcast_number),

colinkeenan commented 7 years ago

Of course, it's better to have python figure out the path. We already did that 2 lines down, so I just defined that as a variable, filepath and "{}/stop{}".format(filepath,args.silentcast_number), shows the icon now:

#!/usr/bin/python
import gi
gi.require_version('Gtk', '3.0')
gi.require_version('AppIndicator3', '0.1')
from gi.repository import Gtk
from gi.repository import AppIndicator3 as appindicator
import os,argparse

filepath = os.path.dirname(os.path.realpath(__file__))

parser = argparse.ArgumentParser()
parser.add_argument("silentcast_number", help="The number of Silentcast instances running. \
        The system tray indicator icon will show the silentcast_number in it: either 1 or 2.")
args = parser.parse_args()

class IndicatorSilentcast:
    def __init__(self):
        self.indicator = appindicator.Indicator.new_with_path (
                "silentcast",
                "{}/stop{}".format(filepath,args.silentcast_number),
                appindicator.IndicatorCategory.APPLICATION_STATUS,
                filepath)
        self.indicator.set_status (appindicator.IndicatorStatus.ACTIVE)
.
.
.
colinkeenan commented 7 years ago

I have pushed the fix to the "next" branch. I will probably start working on the UI a little next week, all in "next" branch. If you will make changes, you should also work in "next".