Closed azzamsa closed 6 years ago
I will try to get i3 working on my computer and experiment. It will take me awhile since I have never used i3 before. I have just installed the git version (because i3-config-wizard
was unreadable in 4.13 on my computer). Even in the git version I'm having issues with the font size being unreadable at the bottom of the screen and on some window title bars. I have not tried to figure out compositing yet which is needed for Silentcast.
By the way, what version of Silentcast are you using?
thank you so much for you effort, I really appreciate it. thank you for your contribution for community.
I downloaded it no more than 5 days ago, so I think it is the v3.04 taken from github releases
I will probably play around with i3 until it is working properly on my computer, but already I see the main problem. When I switched to using gtk, I didn't use any deprecated functions and the systray is deprecated. Instead of using the systray, I used the minimized icon that shows up in a task manager that most desktops have running at all times that lets them switch between active windows by clicking on an icon or description of the task. I set the recording to stop when that minimized task was selected. Since i3 doesn't appear to have that kind of task manager available for it, I would most likely need to figure out a keyboard way to do it. If I remember correctly, gtk disables keyboard input for a minimized application which is what I wanted, but it makes it hard for me to see how to use the keyboard to stop the recording.
I'm not sure why transparency isn't working with Compton, but that seems like an issue I may be able to solve. It's not worth fixing that if there's no way to stop recording though, so that's what I would focus on after playing around with i3 off and on for a while. I won't have a solution for this anytime soon, but it will work on it just because it's fun to try to use i3.
I don't know so much about systray. but there are some application (in my machine) that uses system tray, and it works fine. e.g Telegram, Hexchat, Kazam. I can stop Kazam recording using kazam system tray. this is i3 system tray.
system tray work fine for those application in my machine, but if you want to use window switcher, you can take a look at Rofi window switcher, I use it in my machine.
yes, I think it can be solved, I try peek
, it can have transparency working. but the .pam result for me was very extreme. I have reported the behavior to peek developer.
If I were still using systray I know it would work, but I didn't use it because it's deprecated in GDK. Thank you for pointing out that other application but I don't think it will help. Silentcast depends on being able to minimize itself and then detect when it's not minimized anymore. The i3wm doesn't have an option to minimize a window. I will have to figure out another way to get silentcast out of the way and then a way to use the keyboard to stop the recording.
After playing around with i3wm long enough to understand it, I have a workaround for getting transparency to work without changing anything in Silentcast. The problem is that i3wm interprets a fullscreen window as pushing out all other windows, so there's nothing to see behind it. To solve that, silentcast has to become a floating window and there are some other details that have to be taken care of. I have come up with a command to add to your ~/.config/i3/config
:
bindsym $mod+Shift+s move container to workspace SCtemp;layout tabbed;workspace SCtemp;move container to workspace back_and_forth;workspace back_and_forth;fullscreen toggle;floating toggle;move container to workspace back_and_forth;layout toggle split;workspace back_and_forth;move container to workspace back_and_forth;workspace back_and_forth
This keybinding will leave your windows in split mode except for Silentcast. You may want to make other keybindings to leave it in some other mode.
After adding that line and restarting, you will be able to see the windows being selected while using Silentcast by doing the following:
$mod+Shift+s
The main problem with this, besides being difficult, is that you don't actually cover the whole screen with this method because of the titlebar.
Of course, DO NOT PRESS ENTER/RETURN because I still have no solution for how to stop ffmpeg and move on to the next step. You can, however, press F3 to copy and paste the ffmpeg command and run it yourself. Press ESC to exit Silentcast after getting the ffmpeg command.
Let me know if this much works for you. Eventually I will make changes to Silentcast to work more properly with i3wm because I like this window manager. I wish I had chosen to learn qt instead of gtk for this latest rewrite because qt is still using the systray and that would've worked for i3wm. I really like the systray and have been upset at gtk for getting rid of it, but decided to just go with what they were doing.
If I were still using systray I know it would work, but I didn't use it because it's deprecated in GDK. Thank you for pointing out that other application but I don't think it will help. Silentcast depends on being able to minimize itself and then detect when it's not minimized anymore.
this news for me. I want to reply it in the morning. but the agenda eat my time.
I will have to figure out another way to get silentcast out of the way and then a way to use the keyboard to stop the recording.
I hope you can figure it out soon, I think if Silencast can operate without systray or mouse operation to stop, it will give benefit for Window Manager user. especially if ther WM does not support systray. I believe that it will help WM users.
Who does not like simplicity and minimal depedency.
I have tried you suggestion. you have cool ideas. my step is:
but the result is
$ /bin/sh -c '/usr/bin/ffmpeg -f x11grab -s 1068x1028 -r 8 -i :0+-11,5 -c:v ffvhuff -an -y temp.mkv'
ffmpeg version 3.2.5-1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[x11grab @ 0x564294ea6f20] Cannot get the image data event_error: response_type:0 error_code:8 sequence:9 resource_id:29360128 minor_code:4 major_code:130.
[x11grab @ 0x564294ea6f20] Cannot get the image data event_error: response_type:0 error_code:8 sequence:11 resource_id:230 minor_code:0 major_code:73.
Input #0, x11grab, from ':0+-11,5':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1068x1028, 8 fps, 1000k tbr, 1000k tbn, 1000k tbc
Output #0, matroska, to 'temp.mkv':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), rgb24, 1068x1028, q=2-31, 200 kb/s, 8 fps, 1k tbn, 8 tbc
Metadata:
encoder : Lavc57.64.101 ffvhuff
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
[x11grab @ 0x564294ea6f20] Cannot get the image data event_error: response_type:0 error_code:8 sequence:14 resource_id:230 minor_code:0 major_code:73.
:0+-11,5: Permission denied
frame= 0 fps=0.0 q=0.0 Lsize= 1kB time=00:00:00.00 bitrate=N/A speed= 0x
video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
i will also try to figure it what is the problem with my machine.
It's not your machine, it's your placement of the floating window (and maybe it has to do with the title bar as well). Look at this part: ...-i :0+-11,5
. The minus 11 is the problem. It will run fine if you remove the minus sign or just put "0" instead of "-11". There's probably some adjustment to be made with that part of the command since the drawing area is not quite the full screen.
I had made that workaround command unnecessarily complicated. Here is a simpler version that works the same. I will work on the title bar and border problem next.
bindsym $mod+Shift+s move container to workspace SCtemp;workspace SCtemp;fullscreen toggle;floating toggle;move container to workspace back_and_forth;workspace back_and_forth;
it works for me.
it give me temp.mkv
.
the ffmpeg command for me is:
/bin/sh -c '/usr/bin/ffmpeg -f x11grab -s 1076x996 -r 8 -i :0+-1,31 -c:v ffvhuff -an -y temp.mkv'
and it produce the same error as above, so I change the -1
to 0
, and it works.
I stop the ffmpeg with ctrl-c
$ /bin/sh -c '/usr/bin/ffmpeg -f x11grab -s 1076x996 -r 8 -i :0+0,31 -c:v ffvhuff -an -y temp.mkv'
ffmpeg version 3.2.5-1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.0 (Debian 6.3.0-18) 20170516
configuration: --prefix=/usr --extra-version=1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libebur128 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --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-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 34.101 / 55. 34.101
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.101 / 57. 56.101
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
[x11grab @ 0x5628613cbf20] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, x11grab, from ':0+0,31':
Duration: N/A, start: 1504047613.581095, bitrate: N/A
Stream #0:0: Video: rawvideo (BGR[0] / 0x524742), bgr0, 1076x996, 8 fps, 1000k tbr, 1000k tbn, 1000k tbc
Output #0, matroska, to 'temp.mkv':
Metadata:
encoder : Lavf57.56.101
Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), rgb24, 1076x996, q=2-31, 200 kb/s, 8 fps, 1k tbn, 8 tbc
Metadata:
encoder : Lavc57.64.101 ffvhuff
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> ffvhuff (native))
Press [q] to stop, [?] for help
frame= 170 fps=8.1 q=-0.0 Lsize= 197107kB time=00:00:21.12 bitrate=76431.8kbits/s speed= 1x
video:197098kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.004622%
Exiting normally, received signal 2.
now, what should I do with temp.mkv
?
it's around 193Mb with 18 seconds recoding.
$ du -h temp.mkv
193M temp.mkv
should I convert it to .gif manually using ffmpeg ?
Good. Although Ctrl+c
worked, you're supposed to stop ffmpeg with q
. I almost have a better command for the workaround which will solve some issues concerning the title bar, border, and resizing. It was just a matter of me finding the commands in the i3 manual.
For converting to gif, until I fix Silentcast, I think you could use the temptoanim
script from my older bash based version of Silentcast: https://raw.githubusercontent.com/colinkeenan/silentcast/0d9c613e6a9843188b5c297655c2aa7d76a4e369/temptoanim
Ok. I have a much better i3wm workaround keybind
bindsym $mod+Shift+s move container to workspace SCtemp;workspace SCtemp;border toggle;fullscreen toggle;floating toggle;move container to workspace back_and_forth;workspace back_and_forth;move absolute position 0 0;resize set 1920 1080
You have to put the size of your display in at the end though. Mine is 1920 by 1080. This will make selecting the area work exactly like it's supposed to. Note that if you want to select the whole screen, you press F11. Silentcast is still running even though you won't see the green rectangle. You can still use F3 to get the ffmpeg command. You still need to pres ESC to exit Silentcast. Pressing F11 again takes you out of full screen. On other desktops, there is a notification that you are in full screen, but I didn't see it on i3wm.
Let me know how that latest keybinding works for you. This is probably all I will do with this for a while.
Ok. I have a much better i3wm workaround keybind
wow, going better.
now I can:
f11
to get fullscreenf3
to get ffmpeg commandbut, I am confiused, How do run the ffmpeg command,
rofi run
I have to stop it using htop or kill in terminal, which of course make my "stopping ffmpeg" recorded too.silentcast works fine for me if i select fullscreen using f11
, but I will try to select some area (not fullscreen) and report the result here. because the first try silentcast fail to match the area I selected.
I get the notification from silentcast :). I use dunst
This will solve it:
bindsym $mod+z exec pkill -f ffmpeg
Also, I realized that instead of border toggle
, I should use border none
because maybe it was already set to none on somebody's system. So, here is that fix too:
bindsym $mod+Shift+s move container to workspace SCtemp;workspace SCtemp;border none;fullscreen toggle;floating toggle;move container to workspace back_and_forth;workspace back_and_forth;move absolute position 0 0;resize set 1920 1080
Where again, you have to change 1920 1080 to your display size. Of course, you could just change the one word that needs to be changed instead of copying this whole thing.
I want to write a comment one hour ago, but I have a sudden activity.
I am very happy with this current state already, I still don't try your last comment suggestion.
my step is:
Kdenlive
So, actually. this problem is already solved for me myself. but I hope there will be more workaround to make this more smoother.
I think the golden piece is the temptoanim
, using this script to convert the temp.mkv the result was relatively small compared to my work in past converting the .mp4 file to .gif, and it does not take lot of resource as peek
does. I don't know what is your recipe :). but temptoanim
is really cool.
before writing this comment, I imagine what if silencast have the:
f4
to echo >> ratio.txt
and run the f3 command with the ratio input from ratio.txtq
the ffmpeg proccess and run the temptoanim
.
it is just my idea :).I will try your last suggestion, and report the result here.
Thanks. Just about 20 min ago I decided to look at my C code for the first time in a few months to see what easy tweak I could do to get it to work with i3wm with the workarounds. I think I am coming up with an easy fix. It was working by noticing when it became iconified and then not iconified any more. Instead of iconified, I am just looking for when it is not drawn anymore, and then becomes drawn again while ffmpeg is running - then it should kill ffmpeg and move on to create the gif or whatever. The idea would be to have another keybinding that moves Silentcast to another workspace before triggering the recording by using xdotool to send Return to Silentcast. That makes Silentcast not drawn anymore, and then the $mod+z key binding would put Silentcast back on the current workspace, triggering it to continue. I may have something within an hour.
wow, so great.
This is the first experience in my life. talking with free software developer and discussing about technical aspect of free software application. Before, what I can do just share my view and thought about the philosophical aspect to my friends.
I have a dream, to become a good programmer and contributing to community.
I really thank you so much, Sir. You are very humble and have great spirit. Your inspiration will be last.
thank your so much Sir Colin Keenan, I hope I can reply you by contributing my work to community and become useful person.
Thanks.
For now I am stuck on the simple task of sending a Return to Silentcast in a keybinding so that it will both start ffmpeg and get Silentcast off the screen. I might have the C code right, but I don't know because I can't get the keybinding code right for i3wm. It's almost 2am here so I will get some sleep now.
On Wed, Aug 30, 2017 at 1:15 AM, azzamsa notifications@github.com wrote:
wow, so great.
This is the first experience in my life. talking with free software developer and discussing about technical aspect of free software application. Before, what I can do just share my view and thought about the philosophical aspect to my friends.
I have a dream, to become a good programmer and contributing to community.
I really thank you so much, Sir. You are very humble and have great spirit. Your inspiration will be last.
thank your so much Sir Colin Keenan, I hope I can reply you by contributing my work to community and become useful person.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/colinkeenan/silentcast/issues/49#issuecomment-325892646, or mute the thread https://github.com/notifications/unsubscribe-auth/ACVliyRi4zznQzaYhrTRgowBOj5spTjgks5sdP3vgaJpZM4PDTo5 .
have a great sleep, Sir. thank you so much.
I have released v3.05 which fixes this issue. The README.md explains what to do, but I will put it here too:
# Silentcast Workaround (because i3wm can't iconify)
#
# After copy and pasting this, make sure to change the display size at the end
# of the first definition ($enable_floating_fullscreen) to match your display size
#
# Use these keybindings as follows:
# 1. Start Silentcast
# 2. $mod+Shift+s to make Silentcast a floating window filling the display
# (which allows other windows to be seen below it)
# 3. Select the region to be recorded using standard Silentcast controls
# 4. $mod+z to "iconify" silentcast to start recording (actually putting it on a
# workspace named Silencast and making it fullscreen again instead of floating)
# 5. When done recording, $mod+x to "deiconify" Silentcast which will stop
# recording and move on to the next step as usual.
# define what fullscreen means for floating window - have to manually set the display size
set $enable_floating_fullscreen border none,fullscreen disable,floating enable,move absolute position 0 0,resize set 1920 1080
# more definitions (i3wm doesn't seem to support using $variables in definitions of other $variables)
set $work_in_temp move container to workspace Silentcast,workspace Silentcast
set $return_from_temp move container to workspace back_and_forth,workspace back_and_forth
set $iconify move container to workspace Silentcast,workspace Silentcast,floating disable,fullscreen enable,workspace back_and_forth
set $deiconify workspace Silentcast,border none,fullscreen disable,floating enable,move absolute position 0 0,resize set 1920 1080,move container to workspace back_and_forth,workspace back_and_forth
# change from fullscreen to floating_fullscreen because iw3m won't show other windows under it otherwise
bindsym $mod+Shift+s [class="Silentcast"] $work_in_temp,$enable_floating_fullscreen,$return_from_temp
# "iconify"
bindsym $mod+z [class="Silentcast"] $iconify
# "deiconify" to stop ffmpeg and continue
bindsym $mod+x [class="Silentcast"] $deiconify
#
# End of Silentcast Workaround
#
I will close this issue now but please let me know if it worked for you.
wow, works like a charm.
so my step is:
for WM users: don't forget to run compton.
Note: I have to press f11
to make silentcast area fill my screen, and using mouse/touchpad to select recoding area. if I do not make the area full screen at first, it will only record inside the green lines(figure 1), even we select the area bigger than green lines or the ffmpeg command for area ratio
bigger than green lines.
(1) figure 1. when I selected area bigger than green lines, silentcast will only record inside green lines.
(2) figure 2. it will works as expected when I make the f11
first before selecting region to record.
I put this note for other users to easily follow the step.
I want to learn what is inside the temptoanim
, it really fast to convert .mkv and does not eat my CPU and RAM unlike other app.
once again, thank you so much. we live in very different timezone, so you sleep at this time :).
thank you so much, Sir.
I'm glad it worked and thank you for your observation about F11. It wasn't necessary on my computer, but it may help somebody else. On my computer in KDE Plasma 5, there is a much bigger issue that nobody has reported. It doesn't happen every time, but frequently. Now that you got me to look at my code, I will probably work on that now.
As for what temptoanim does, one of my goals is to have F3 show all the commands that will be used, including converting to gif. Then when making outputs, it will list the commands on one window with progress bars next to each command so you can tell how much longer for that to complete. I think it will be a lot of work to get that done, so it won't happen anytime soon.
Also, you should take a look at the various tabs on F1 because it will let you know about a lot of other capabilities. You may find F2 useful at times too.
:), you are welcome. I am a KDE user for almost 2 years, but moving to i3 after Plasma 5 release, I installed XFCE just for supply in case I need a DE.
wow, that awesome. so we really know what is going on in background.
alright. thanks.
thank you so much, thank you. have a great days. :).
First, I really want to thanks for this cool application. before moving to i3, I was hard lover of silentcast, I produce some nice GIF on my work with this piece of software. but it does not work in i3wm.
here is my machine
Please ask me more, on what do you need me to produce an output of my sistem packages or configuration. any other system tray e.g Telegram, Veracrypt, Kazam works fine.
Thanks so much.