https://mytechservinginternetmeals.blogspot.com/2021/10/how-to-start-making-browser-video-game.html
more updated -- I'm creating 3d skatepark copy, my work here - https://drive.google.com/file/d/1ubGOpjX6iTFSM6sqyeyg6N8JndwVKoew/view?usp=sharing https://ibb.co/b1HTJtGceturtdiena, 2021. gada 23. decembris
Updated
piektdiena, 2021. gada 5. novembris
VIDEO EDITOR CONSOLE. *PSEUDO* CODE. (NOT FINISHED - MIGHT WORK!!)
IF YOU ALWAYS WANTED VIDEO EDITOR THAT JUST TRIMS AND MERGES CLIPS BASED ON CONSOLE INPUT - HERE IS THE C++ VERSION SOURCE CODE.
HOW TO COMPILE? INSTALL g++ AND ffmpeg (CODE IS FOR LINUX SO FAR!!!)
sudo apt install g++
then create new file editor.cpp
compile the file from command line -
g++ -std=c++17 editor.cpp -o editor
copy binary (editor) to /home/ and run the binary ./editor
#include <string>
#include <iostream>
#include <fstream>
#include <filesystem>
#include <algorithm>
#include <unistd.h>
//g++ -std=c++17 editor.cpp -o editor
namespace fs = std::filesystem;
bool in_array(const std::string & value,
const std::vector < std::string > & array) {
return std::find(array.begin(), array.end(), value) != array.end();
}
int main() {
//get username
std::string Username = getlogin();
//opens file list
system((std::string("cat /home/") + Username + std::string("/renders/mylist.txt")).c_str());
//asks which folder should program choose
std::string mape;
std::cout << "Kura mape?" << "!\n";
std::cin >> mape;
//asks which file name should final render choose
std::cout << "Final faila nosaukums? !\n";
std::string finalnosaukums;
std::cin >> finalnosaukums;
std::string path = "/home/" + Username + mape;
std::vector < std::string > arr;
int guesses = 0;
//counts how many files are in choosed directory
auto dirIter = std::filesystem::directory_iterator(mape);
int fileCount = 0;
for (auto& entry : dirIter)
{
if (entry.is_regular_file())
{
++fileCount;
}
}
for (const auto & entry: fs::directory_iterator(path)) {
std::string name;
std::cout << "Kurais video? !\n";
std::cout << entry.path() << std::endl;
std::cin >> name;
if (in_array(name, arr)) {
//std::cerr << "Found at position " << std::distance(std::array, foo) << endl;
std::cout << "Kurais video? !\n";
std::cin >> name;
std::cout << "Masīva garums. jeb cik video jau pievienoti:" << sizeof(arr) << "!\n";
std::cout << entry.path() << std::endl;
} else {
std::cout << "Not found" << std::endl;
arr.push_back(name);
}
std::cout << entry.path() << name << "!\n";
}
for (const auto & entry2: fs::directory_iterator(path)) {
guesses++;
std::string name2;
std::cout << "Kurais video?" << name2 << "!\n";
std::cout << entry2.path() << std::endl;
std::cin >> name2;
if (in_array(name2, arr)) {
//std::cerr << "Found at position " << std::distance(garumi, foo) << endl;
std::cout << "Kurais video?" << name2 << "!\n";
std::cin >> name2;
//std::cout << "Masīva garums. jeb cik video jau pievienoti:" << size << "!\n";
std::cout << entry2.path() << std::endl;
} else {
std::cout << "Not found" << std::endl;
if (in_array(name2, arr)) {
system("ffprobe -i name2 -show_entries format=duration -v quiet -of csv='p=0'");
int vienav = system("ffprobe -i name2 -show_entries format=duration -v quiet -of csv='p=0'");
std::cout << "No kuras sekundes sākt? !\n";
int sakums;
std::cin >> sakums;
std::cout << "No kuras sekundes beigt? !\n";
int beigas;
std::cin >> beigas;
if (vienav > beigas) {
system((std::string("ffmpeg -i name2 -ss") + std::to_string(sakums) + std::string("to") + std::to_string(beigas) + std::string("-c:v libx264 -crf 30 trim_opseek") + name2).c_str());
} else {
system("ffprobe -i name2 -show_entries format=duration -v quiet -of csv='p=0'");
std::cout << "PARSNIEDZI LIMITU ... No kuras sekundes beigt" << beigas << "!\n";
}
}
}
std::cout << entry2.path() << name2 << "!\n";
}
if(fileCount === guesses){
system((std::string("ffmpeg -f concat -safe 0 -i mylist.txt -c copy /home/") + Username + std::string("/renders"), finalnosaukums).c_str());
}
}
svētdiena, 2021. gada 24. oktobris
HOW TO START MAKING BROWSER VIDEO GAME WITH PREMADE GAME CODE? (STARTING POINT FAST, NOT FOR COMPUTER ILLITERATES)
trešdiena, 2021. gada 22. septembris
HOW TO SCREEN RECORD UBUNTU?
If ffmpeg -encoders |grep h264 output NVIDIA HVEC somewhere there, ubuntu uses hardware encoding by default.
ffmpeg -f x11grab -video_size 1920x1080 -framerate 60 -i :1 -v verbose -f pulse -i default -vf format=yuv420p output.mp4
ffmpeg -f x11grab -video_size 1920x1080 -framerate 60 -i :0 -v verbose -f pulse -i default -vf format=yuv420p output.mp4
otrdiena, 2021. gada 21. septembris
otrdiena, 2021. gada 15. jūnijs
Managing LVM Snapshots/ recording desktop on ubuntu / modified pnmixer volume slider for openbox tint2
https://wiki.learnlinux.tv/index.php/Managing_LVM_Snapshots_on_Arch_Linux
ffmpeg -video_size 1366x768 -framerate 30 -f x11grab -i :0.0+0,0 -f pulse -ac 2 -i 0 -c:v libx264rgb -crf 0 -preset ultrafast sample.mkvcreate system wide shortcut - sudo geany ~/.local/share/applications/pmx.desktop
pirmdiena, 2021. gada 14. jūnijs
Make Nautilus 3.26.4 for ubuntu 18.04 log copy/move/delete/rename actions. (UPDATED SECOND TIME) HIGHLY EXPERIMENTAL
I PERSONALLY THINK VANILLA VERSION ON UBUNTU IS FAILURE SO THIS ARTICLE DOES NOT MAKE A SENSE UNTIL OPENSOURCE COMMUNITY FIXES NAUTILUS ITSELF ON ANY DISTRO, BUT CMMON.
First of all, this Nautilus version will use Vanilla theme. (Might fix the styling issues for ubuntu 18.04 later.) Second of all, it does not log location of files that are renamed using it. Third of all, logged files have missing extensions. (So far these are only bugs there is to this code). So while using this version, I take no responsibility over it's doings as it is simply few lines of code added to few functions - IN NUTSHELL - https://paste.ubuntu.com/p/PvpBM6dMw5/.
Link to flatpak file (org.gnome.NautilusDevel.flatpak)-
https://drive.google.com/file/d/1sgXckMoXQmfm38nEfqWJ-k0OGDH17Tiv/view?usp=sharing
TO RUN YOUR NAUTILUS FLATPAK OR BUILD IT BY GNOME-BUILDER YOU NEED TO INSTALL FLATPAK ETC but ONCE YOU HAVE BUILDER INSTALLED WITH WORKING BUILDED APP YOU CAN GET APPLICATION THAT DOES NOT NEED FLATPAK - https://stackoverflow.com/questions/60800783/can-gnome-builder-actually-produce-something-else-than-flatpaks
sudo apt install flatpak
flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.gnome.Platform//3.28\
sudo flatpak --user install org.gnome.NautilusDevel.flatpak
IF EVERYTHING GOES WRONG:
flatpak uninstall --unused
sudo apt-get remove --autoremove flatpak
sudo apt-get purge flatpak
sudo rm -rf /var/lib/flatpak $HOME/.local/share/flatpak
To run Your Nautilus flatpak - flatpak run org.gnome.NautilusDevel . Log files are saved under /home/username/ directory.
Remember, this is flatpak and it will not replace original system wide used Nautilus, SO after doing this, original system wide used Nautilus, will still not have these features, but they will be USABLE ONLY FROM flatpak version.
In case You want to compile, follow article (There are some tips on creating system wide shortcuts at the end of it, and running Your flatpak Nautilus - >
For logging copy/move/delete functionality, here is the - nautilus-file-operations.c file - https://paste.ubuntu.com/p/kRhQFtZj4Q/
For logging renaming - here is the - nautilus-files-view.c file -
https://paste.ubuntu.com/p/PxwnBRQYmR/
(logging renaming does not include location of where files are renamed, or which ones are renamed)
Install gnome-builder - (don't run as root)
flatpak install --user --from https://flathub.org/repo/appstream/org.gnome.Builder.flatpakref flatpak run --user org.gnome.Builder Install gnome-builder -
Run gnome-builder -
flatpak run org.gnome.Builder -vvvv
Select Nautilus and choose this repository -
VANILLA VERSION -
https://gitlab.gnome.org/chrism/nautilus.git
UBUNTU VERSION -
https://git.launchpad.net/~ubuntu-desktop/ubuntu/+source/nautilus
Modify nautilus-file-operations.c and nautilus-files-view.c in source file directory (src).
Build and Export bundle.
create system wide shortcut - sudo geany ~/.local/share/applications/NEWNAUTILUS.desktop