sudo pacman -S community/owncloud-client
samedi 21 août 2021
mercredi 18 août 2021
how to move /home to another hard drive?
https://www.howtogeek.com/442101/how-to-move-your-linux-home-directory-to-another-hard-drive/
mardi 6 juillet 2021
vendredi 20 novembre 2020
Laptop graphics card and manjaro / arch
https://wiki.manjaro.org/index.php/Configure_Graphics_Cards#Dual_GPU
https://wiki.archlinux.org/index.php/PRIME
list everything about your machine
inxi -Fxzc0
list graphics cards
xrandr --listproviders
vendredi 3 avril 2020
dimanche 29 décembre 2019
postgresql on Arch/Manjaro
Install: pacman -S postgresql
= this will create user "postgres"
Then: sudo passwd postgres
= choose a password
Then switch to postgres user using:
Add a new database user using the createuser command:
[postgres]$ createuser --interactive
Create a new database over which the above user has read/write privileges using the createdb command (execute this command from your login shell if the database user has the same name as your Linux user, otherwise add
Then to connect:
Get help:
=> \help Connect to a particular database:
=> \c <database> List all users and their permission levels:
=> \du Show summary information about all tables in the current database:
=> \dt Exit/quit the
=> \q or CTRL+d
sources http://www.postgresqltutorial.com/postgresql-uuid/
Add the UUID plugin:
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
Test it with:
SELECT uuid_generate_v1();
= this will create user "postgres"
Then: sudo passwd postgres
= choose a password
Then switch to postgres user using:
sudo -iu postgres
Then: [postgres]$ initdb -D /var/lib/postgres/data
Then:
systemctl enable postgresql
and
systemctl start postgresql
ThenBecome the postgres user.
sudo -iu postgres
Add a new database user using the createuser command:
[postgres]$ createuser --interactive
Create a new database over which the above user has read/write privileges using the createdb command (execute this command from your login shell if the database user has the same name as your Linux user, otherwise add
-O database-username
to the following command):
$ createdb myDatabaseName
Then to connect:
[postgres]$ psql -d myDatabaseName
Some helpful commands:
Get help:
=> \help Connect to a particular database:
=> \c <database> List all users and their permission levels:
=> \du Show summary information about all tables in the current database:
=> \dt Exit/quit the
psql
shell:
=> \q or CTRL+d
sources http://www.postgresqltutorial.com/postgresql-uuid/
Add the UUID plugin:
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
Test it with:
SELECT uuid_generate_v1();
mercredi 17 juillet 2019
how to add subtitles to mkv file with ffmpeg
If needed, convert from mp4 to mkv:
ffmpeg -i src.mp4 -acodec copy -vcodec copy output.mkv
Optionaly convert srt file to .ass :)
ffmpeg -i src.mp4 -acodec copy -vcodec copy output.mkv
Optionaly convert srt file to .ass :)
ffmpeg -i subtitles.srt subtitles.ass
Then add some .ass to the mkv file:
ffmpeg -i mymovie.mkv -vf ass=subtitles.ass mysubtitledmovie.mkv
Or if srt
ffmpeg -i video.mkv -vf subtitles=subtitles.srt out.avi
Extract srt from mkv
ffmpeg -i the.winchesters.mkv -map 0:s:0 The.Winchesters.srt
the simple example:
ffmpeg -i file.mkv -f srt -i file.srt -map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s srt output.mkv
The fat example:
ffmpeg -i The.Mandalorian.S01E01.WEBRip.x264-ION10.mp4
-i Subs/2_English.srt -i Subs/3_English.srt -i Subs/4_Danish.srt
-i Subs/5_Dutch.srt -i Subs/6_Finnish.srt -i Subs/7_French.srt
-i Subs/8_German.srt -i Subs/9_Italian.srt -i Subs/10_nor.srt
-i Subs/11_Polish.srt -i Subs/12_Portuguese.srt -i Subs/13_Portuguese.srt
-i Subs/14_Spanish.srt -i Subs/15_Spanish.srt -i Subs/16_Swedish.srt
-c:s mov_text -c:v copy -c:a copy -map 0:v -map 0:a -map 1 -map 2 -map 3
-map 4 -map 5 -map 6 -map 7 -map 8 -map 9 -map 10 -map 11 -map 12 -map 13
-map 14 -map 15
-metadata:s:s:0 language=eng -metadata:s:s:1 language=eng
-metadata:s:s:2 language=dnk -metadata:s:s:3 language=nld
-metadata:s:s:4 language=fin -metadata:s:s:5 language=fra
-metadata:s:s:6 language=ger -metadata:s:s:7 language=ita
-metadata:s:s:8 language=nor -metadata:s:s:9 language=pol
-metadata:s:s:10 language=bra -metadata:s:s:11 language=bra
-metadata:s:s:12 language=esp -metadata:s:s:13 language=spa
-metadata:s:s:14 language=swe The.Mandalorian.S01E01.WEBRip.x264-ION10-subs.mp4
Inscription à :
Articles (Atom)
bash script to convert all mp4 in a folder to mkv files with ffmpeg
#!/bin/bash for i in *.mp4; do echo "$i" "${i%%.*}.mkv" ffmpeg -i "$i" -vcodec copy -acodec copy "${...
-
- install xorg-xev: sudo pacman -S xorg-xev - run xev - in the window press the key you want to remap and look in the terminal what's ...
-
When I installed Manjaro I choose "minimal installation" so only the most basic packages are installed on my system by default. B...