Showing posts with label Support. Show all posts
Showing posts with label Support. Show all posts

Monday, February 13, 2023

ffmpeg: Extract mp3 from video

 

 ffmpeg -i mad-principio_peter.mp4 -vn -y out1.mp3 #9M

 

ffmpeg -i mad-principio_peter.mp4 -f mp3 -ab 192000 -vn out2.mp3 #14M

ffmpeg -i mad-principio_peter.mp4 -f mp3 -ab 128000 -vn out3.mp3 #9M
ffmpeg -i mad-principio_peter.mp4 -vn -acodec libmp3lame out4.mp3 #9M

ffmpeg -i mad-principio_peter.mp4 -acodec libmp3lame -ab 128k out5.mp3 #9M

ffmpeg -i gym.mp4 -f webm -c:v libvpx -b:v 1M -acodec libvorbis gym.webm -hide_banner

Second

ffmpeg -i sample.avi -q:a 0 -map a sample.mp3  #complete
ffmpeg -i sample.avi -ss 00:03:05 -t 00:00:45.0 -q:a 0 -map a sample.mp3 #fraction
Parameters :
-q:a 0 for variable bit rate
-ss starting timestamp
-t  the encoding time (If you don't specify, it will go to the end)
-map 0:a:3 selects audio stream #4 (ffmpeg starts counting from 0) 
** specific the timestamps in HH:MM:SS.xxx format.

 

References:

[1] https://json2video.com/how-to/ffmpeg-course/ffmpeg-extract-audio.html

Tuesday, November 16, 2021

Update Chrome in Ubuntu

 


# Install
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - 
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update 
sudo apt-get install google-chrome-stable


# Update

sudo apt-get --only-upgrade install google-chrome-stable

Tuesday, October 26, 2021

Video tools online

Rotate/Crop/Resize

[1] https://ezgif.com/rotate-video

[2] Fast https://www.rotatevideo.org/ 


Monday, March 15, 2021

Cuda on Linux18 (y2021)

After installation don't forget it(.bashrc):

#Cuda 8.0 Settings
export CUDA_HOME=/usr/local/cuda-8.0
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64  
PATH=${CUDA_HOME}/bin:${PATH}
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:

 

Drivers

[1] Legacy https://www.nvidia.com/en-us/drivers/unix/

To Review (Cuda and Driver)

CUDA 11.2             >= 450.80.02
CUDA 11.1 (11.1.0)     >= 450.80.02
CUDA 11.0 (11.0.3)     >= 450.36.06
CUDA 10.2 (10.2.89)     >= 440.33
CUDA 10.1 (10.1.105)     >= 418.39
CUDA 10.0 (10.0.130)     >= 410.48
CUDA 9.2 (9.2.88)     >= 396.26
CUDA 9.1 (9.1.85)     >= 390.46
CUDA 9.0 (9.0.76)     >= 384.81
CUDA 8.0 (8.0.61 GA2)     >= 375.26
CUDA 8.0 (8.0.44)     >= 367.48
CUDA 7.5 (7.5.16)     >= 352.31
CUDA 7.0 (7.0.28)     >= 346.46

[1] Compatibility  https://docs.nvidia.com/deploy/cuda-compatibility/index.html 

To Review (Cuda and GCC)

CUDA version     Max GCC version
11.1             10.0
11                9
10.1, 10.2    8
9.2, 10.0      7
9.0, 9.1        6
8                  5.3
7                  4.9
5.5, 6           4.8
4.2, 5           4.6
4.1               4.5
4.0               4.4

Cuda Toolkit from 6.5 to 10 and more

[1] https://developer.nvidia.com/cuda-toolkit-archive

Common problems

[1] Can't locate InstallUtils.pm in @INC

$sh ./cuda(your version).run --tar mxvf #for unpack

$cp InstallUtils.pm /usr/lib/x86_64-linux-gnu/perl-base #check path in error message

[2] Messages during Cuda installation

$sudo ./cuda_6.5.14_linux_64.run --override

$sudo ./cuda_xxx.run --override  #to ignore last compiler or related

#During Cuda 6.5

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.29?

#During Cuda 8

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 375.26?

#During Cuda 9

Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?

[3] Adicional  notes

https://forums.dual.sphysics.org/discussion/1324/get-the-gpu-running


[4] How to disable nouveau driver to install NVIDIA drivers

$vi /etc/modprobe.d/blacklist-nvidia-nouveau.conf
blacklist nouveau
options nouveau modeset=0
$sudo update-initramfs -u 
$sudo reboot 

 

 

Wednesday, March 10, 2021

Ubuntu enable Sony Xperia USB transfer

 

sudo apt-get install libusb-dev

sudo apt-get install gmtp

References:

[1] Manual installation of libmtp http://www.humans-enabled.com/2011/12/how-to-fix-samsung-galaxy-nexus-mtp.html

[2] https://gmtp.sourceforge.io/

[3] Original post https://android.stackexchange.com/questions/36376/cant-explore-files-on-my-sony-xperia-u-using-my-ubuntu-12-10-laptop

Wednesday, May 08, 2019

Planos/Tarifas VPS Brasil/Perú


Provedores Brasil

[0] https://dokehost.com.br/cloud-vps-windows-e-linux-com-protecao-ddos

[1] https://minivps.com.br/linux/brasil/
[2] https://www.weblink.com.br/servidores
[3] https://www.vpsbrasil.com/vpslinux
[4] https://www.hostinger.com.br/servidor-vps (Boleto bancario)

[5] https://br.godaddy.com/hosting/vps-hosting



Proveedores Perú
[1] https://www.sitiohost.pe/vps/
[2] https://www.bluehosting.pe/vps/ (Perú) BCP/Interbank
[3] https://www.rackeo.pe/virtualizacion/
[4] https://www.boxhosting.pe/vps/


[5] https://pe.godaddy.com/hosting/vps-hosting-vps4



International
[1] https://clients.databasemart.com/cart.php
[2] https://hostry.com/products/vps/

Tuesday, May 07, 2019

Fedora VPN

 
wget https://git.io/vpn -O openvpn-install.sh
 
 
References:
[1] https://www.ostechnix.com/easiest-way-install-configure-openvpn-server-linux/ 
[2] https://kifarunix.com/install-and-setup-openvpn-server-on-fedora-29-centos-7/2/
 
Reopen connection after close during openvpn execing 


Linux:
Connection drop after active openvpn 
/etc/sysctl.conf
net.ipv4.ip_forward = 1   

Windows:
https://www.geeknetic.es/Noticia/10486/Trucos-Como-usar-una-VPN-accediendo-a-Internet-con-tu-conexion-local.html
https://tutorialesenlinea.es/409-conectar-por-vpn-sin-perder-la-conexion-a-internet.html
https://social.technet.microsoft.com/Forums/es-ES/044c7659-3f63-42fd-b15f-f75a4291c080/conectarse-por-vpn-a-un-equipo-remoto-y-perder-la-conexin-a-internet-con-los-demas-programas?forum=servinfoeslatames
http://elblogdejuanbo.blogspot.com/2011/10/conexion-desde-casa-una-vpn-sin-perder.html
 
 


Monday, April 01, 2019

Ubuntu 16 - VMWare Player 12 - GCC Not found


First solution
cd /usr/lib/vmware/modules/source 
wget https://github.com/mkubecek/vmware-host-modules/archive/player-12.5.9.zip 
unzip player-12.5.9.zip 
cd vmware-host-modules-player-12.5.9/vmmon-only/ 
make 
cd ../vmnet-only/ 
make 
cd .. 
mkdir /lib/modules/`uname -r`/misc 
cp vmmon.o /lib/modules/`uname -r`/misc/vmmon.ko 
cp vmnet.o /lib/modules/`uname -r`/misc/vmnet.ko 
depmod -a /etc/init.d/vmware restart


Second solution

mkdir ~/vmmodules #create a temp folder and copy files.
cp /usr/lib/vmware/modules/source/vmnet.tar /usr/lib/vmware/modules/source/vmmon.tar ~/vmmodules/ 
# make the modules manually 
tar -xvf vmmon.tar 
cd vmmon-only 
make 
cd .. 
sudo cp vmmon.o /lib/modules/`uname -r`/kernel/drivers/misc/vmmon.ko.gz 
tar -xvf vmnet.tar 
cd vmnet-only 
make 
cd .. 
sudo cp vmnet.o /lib/modules/`uname -r`/kernel/drivers/misc/vmnet.ko.gz 
#Then reload the modules and restart vmware service, vmplayer should works now. 
sudo depmod -a 
sudo systemctl restart vmware


Thrid solution

#install the right version of gcc
$sudo apt-get install g++-4.9 

Trick

$sudo sed 's/gcc version 5.4.0/gcc version 6.4.0/' /proc/version > /tmp/version
$sudo mount --bind /tmp/version /proc/version
$sudo vmware-modconfig --console --install-all
$sudo umount /proc/version && rm /tmp/version


Final solution 2019
Update kernel from 4.4 to 4.11 works good[2] and download from [3].

References:
[1] https://unix.stackexchange.com/questions/310637/vmware-kernel-module-a-compatible-version-of-gcc-was-not-found
[2] Update kernel https://www.howtoforge.com/tutorial/how-to-upgrade-linux-kernel-in-ubuntu-1604-server/
[3] Ubuntu kernels https://kernel.ubuntu.com/~kernel-ppa/mainline/
[4] Update Ubuntu 18 kernel https://www.tecmint.com/upgrade-kernel-in-ubuntu/ 

Sunday, March 17, 2019

Dynamic DNS


FQDN (Fully Qualified Domain Name)

  • Pc name: "deb"
  • Domain name: "bar.com"
O FQDN is: "deb.bar.com."


Alternatives

[1] http://neorouter.com/products-nrfree

private VPN Services



Resources:

[1] Compare https://www.wizcase.com/best-vpns-for-brazil
[2] Perú https://www.vpnfan.com/blog/best-lima-vpns/
[3] Providers Pt https://canaltech.com.br/internet/descubra-por-que-usar-uma-vpn-e-veja-como-escolher-a-melhor/

Saturday, March 16, 2019

Stream Music from your Linux PC to Android Cellphone Speaker



1) SoundWire

2) WiFiAudio Server for Linux 64bit

References:
[1] Client https://appuals.com/stream-audio-pc-android-device/
[2] Server http://georgielabs.net/
[3] http://wifiaudio.boards.net/thread/2/wifiaudio-support-links-download-application
[4] WifiAudio Sever Linux 64bits http://wifiaudio.boards.net/attachment/download/6

Linux Remote Desktop


sudo apt-get update
sudo apt-get install xrdp 
 
#desktop
sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon
 
#setting session
sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh
 
#firewall

sudo ufw allow 3389/tcp
 
#Use remmina desktop to connect
 


Extra
 
service --status-all
printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$GDMSESSION"

References:
[1] Setting xrdp https://medium.com/@vivekteega/how-to-setup-an-xrdp-server-on-ubuntu-18-04-89f7e205bd4e
[2] https://websiteforstudents.com/connect-to-ubuntu-16-04-17-10-18-04-desktop-via-remote-desktop-connection-rdp-with-xrdp/
[3] Print desktop name and session
https://askubuntu.com/questions/72549/how-to-determine-which-window-manager-is-running


Friday, March 15, 2019

SSH Skip port forwarding


Instant terminal sharing
https://tmate.io/


Share your UNIX terminal in seconds!
https://www.teleconsole.com/

Share local machine port to public access
https://serveo.net/
https://github.com/milio48/serveo
$wget https://raw.githubusercontent.com/milio48/serveo/master/serveo.sh 

$./serveo.sh tcp 5432 0

vs ngrok
Serveo is an excellent alternative to ngrok. Serveo was inspired by ngrok and attempts to serve many of the same purposes. The primary advantage of Serveo over ngrok is the use of your existing SSH client, so there's no client application to install.

Other slight advantages include preservation of URLs across reconnect for free (ngrok allows this only for paid accounts) and in-terminal request inspection and replay (ngrok uses a web interface).

vs OpenSSH

Using Serveo instead of OpenSSH frees you from having to configure and maintain a server. It also handles HTTPS and subdomain generation, two features that complicate a typical SSH port-forwarding setup.

Apache Guacamole is a clientless remote desktop gateway


http://guacamole.apache.org/


Manual mode (A like to connect to B)

PCA ----+----  PCB
            |
          PCX

Server Side (PCX Need root permission)

$sudo vi /etc/ssh/sshd_config

AllowTcpForwarding yes
GatewayPorts yes


$sudo firewall-cmd --add-port=7004/udp [--permanent]
$sudo firewall-cmd --add-port=7004/tcp [--permanent]

Target PCB

$ssh -f -N -R 7004:127.0.0.1:22 -l user_PCX -p port PCX(ip/domain name)
This means open port 7004 on PCX forwarding to port 22, PCX will start to listen on port 7004.

Source PCA
$ssh PCX(ip/domain name) -l user_PCB -p 7004

Enjoy!



References:
[1] https://rootsaid.com/ssh-without-port-forwarding/
[2] https://linuxhint.com/ssh-port-forwarding-linux/
[3] https://dev.to/samuyi/the-how-to-of-ssh-port-forwarding-1f4e



Thursday, March 07, 2019

Linux root password reset


Mode 1:Recover mode

In recover mode try to remount and after that change password

mount -o remount,rw /
 
Mode 2: Using live

mkdir /mnt/recover
mount /dev/sda2 /mnt/recover
 
chroot /mnt/recover
 
passwd  #or
passwd user 
exit
umount /mnt/recover

Other way : Using files(for root or any user)
 
 /etc/passwd
 /etc/shadow
  
root:x:0:0:root:/root:/bin/bash
to
root::0:0:root:/root:/bin/bash 
 
References:
[1] http://www.microhowto.info/howto/reset_a_forgotten_root_password_using_a_live_distribution.html
[2] https://www.computersecuritystudent.com/UNIX/UBUNTU/1204/lesson5/index.html
 

Sunday, March 03, 2019

Ubuntu users


#adduser username
 
#usermod -aG sudo username
 
$su - username
 
$whoami
$sudo whoami   
 
Examples to use
 
$fdisk -l
$sudo fdisk -l
$sudo ls -l /root

Wednesday, February 20, 2019

Fedora 23 Services



$systemctl status sshd.service
$systemctl enable httpd.service
$systemctl disable service_name.service

$systemctl start service_name.service
$systemctl stop service_name.service 
$systemctl restart service_name.service
$systemctl list-units --type=service 



 
 

References:
[1] General info https://docs.fedoraproject.org/en-US/fedora/rawhide/system-administrators-guide/infrastructure-services/Services_and_Daemons/
[2] List services https://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/s1-services-running.html
 

 



Tuesday, February 19, 2019

Fedora 29 mySQL

$sudo dnf install https://dev.mysql.com/get/mysql80-community-release-fc29-1.noarch.rpm

$sudo dnf --disablerepo=mysql80-community --enablerepo=mysql57-community install mysql-community-server


works too for Fedora 23 (Server Edition)

Problems
$ mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

$ sudo grep 'temporary password' /var/log/mysqld.log


Referencias:
[1] https://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com