One solution that usually works is to use pdfjam from the texlive distribution
pdfinfo input.pdf
pdfjam --outfile output.pdf --paper letter input.pdf
One solution that usually works is to use pdfjam from the texlive distribution
pdfinfo input.pdf
pdfjam --outfile output.pdf --paper letter input.pdf
Soft links
Commonly referred to as symbolic links, soft links link together non-regular and regular files. They can also span multiple filesystems. By definition, a soft link is not a standard file, but a special file that points to an existing file. Format:
ln -s (file path [original] you want to point to) (the soft path pointing to the original)
Example:
ln -s /home/simon/snap/jgrasp/bin/jgrasp /usr/bin/jgrasp
Hard links
The concept of a hard link is the most basic. Every file on the Linux filesystem starts with a single hard link. The link is between the filename and the actual data stored on the filesystem. Creating an additional hard link to a file means a few different things. The syntax is:
ln (original file path) (new file path)
Example:
ln TestFile /tmp/link2TestF
First, you create a new filename pointing to the exact same data as the old filename. This means that the two filenames, though different, point to identical data. When changes are made to one filename, the other reflects those changes. The permissions, link count, ownership, timestamps, and file content are the exact same. If the original file is deleted, the data still exists under the secondary hard link. The data is only removed from your drive when all links to the data have been removed. If you find two files with identical properties but are unsure if they are hard-linked, use the "ls -i" command to view the inode number. Files that are hard-linked together share the same inode number. Example:
ls -li TestFile /tmp/link2TestF
Conclusion
---
FFmpeg has three concatenation methods:
1. concat video filter
Use this method if your inputs do not have the same parameters (width, height, etc), or are not the same formats/codecs, or if you want to perform any filtering.
Note that this method performs a re-encode of all inputs. If you want to avoid the re-encode, you could re-encode just the inputs that don't match so they share the same codec and other parameters, then use the concat demuxer to avoid re-encoding everything.
ffmpeg -i opening.mkv -i episode.mkv -i ending.mkv \
-filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] \
concat=n=3:v=1:a=1 [v] [a]" \
-map "[v]" -map "[a]" output.mkv
2. concat demuxer
Use this method when you want to avoid a re-encode and your format does not support file-level concatenation (most files used by general users do not support file-level concatenation).
$ cat mylist.txt
file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'
$ ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4
3. concat protocol
Use this method with formats that support file-level concatenation (MPEG-1, MPEG-2 PS, DV). Do not use with MP4.
$ ffmpeg -i "concat:input1|input2" -codec copy output.mkv
This method does not work for many formats, including MP4, due to the nature of these formats and the simplistic concatenation performed by this method.
--
If in doubt about which method to use, try the concat demuxer.
---
Source: Stackoverflow.
The following is to download a only a particular part of a video from YouTube
ffmpeg -i $(youtube-dl -f 22 --get-url https://www.youtube.com/watch?v=cmne_rokrs4) -ss 00:10:10 -to 00:12:52 -c:v copy -c:a copy happy.mp4
Or you can download all the video first and then cut some parts following the instructions here.
If you want to concatenate MP4 videos (you can prepare an script):
echo file input1.mp4 > mylist.txt
echo file input2.mp4 >> mylist.txt
ffmpeg -f concat -i mylist.txt -c copy output.mp4
To list all subs for a video:
youtube-dl --list-subs URL
To download all subs, but not the video:
youtube-dl --all-subs --skip-download URL
Or you can only download one subtitle
youtube-dl --write-sub --sub-lang en --skip-download URL
Or for downloading the automatically generated subtitles
youtube-dl --write-auto-sub --skip-download URL
If you want to convert the subtitles do:
ffmpeg -i input.vtt output.srt
The following is to convert videos to a higher speed. For instance, if you want to multiply by 1.15, the command is:
ffmpeg -i input.mkv -filter_complex "[0:v]setpts=0.87*PTS[v];[0:a]atempo=1.15[a]" -map "[v]" -map "[a]" output.mkv
#The "setpts" corresponds to the inversed speed (in this case 100/1.25 = 0.8)
#while the "atempo" corresponds to the desired direct speed of the video.
#Those values are proportionally inversed.
#For a 25% higher speed output video the values
#would be "setpts=0.8*PTS" and "atempo=1.25"
100/1.25 = 0.8
References:If Windows was installed to run in UEFI, the Linux OS must also be installed using the UEFI mode. This means that most likely you need to disable in the BIOS the legacy mode and allow secure boot.
Is the "Install Ubuntu alongside Windows 10" option missing?
Please note that in the following circumstances the Ubuntu 20.04 installation option "Install Ubuntu alongside Windows 10" may be missing, if your Windows 10 installation: is not correctly shutdown or is hibernating, has corrupted partition which needs repair, partition has not enough free disk space left for resizing, uses Dynamic Disk or the file system contains uncontrollable file fragmentation.
Another case is if you try to install Linux using legacy boot for your installation media; the installation would be possible but the dual boot won't work.
References: LinuxConfig.org
dd is a great tool to fully wipe out your disk data to forensic levels
# dd if=/dev/zero of=/dev/DISK/TO/WIPE bs=4096
# dd if=/dev/zero of=/dev/sda bs=4096
# dd if=/dev/zero of=/dev/sdX bs=512
If you messed up your master boot record (MBR) you can wipe it using this command:
dd if=/dev/zero of=/dev/hdX bs=446 count=1 #replace X with the target drive letter.
If you are wiping your hard drive for security, you should populate it with random data rather than zeros (This is going to take even longer than the first example.) :
# dd if=/dev/urandom of=/dev/DISK/TO/WIPE bs=4096
# dd if=/dev/urandom of=/dev/sda bs=4096
# dd if=/dev/urandom of=/dev/sdX bs=512
# dd if=/dev/urandom of=/dev/sdX bs=4096 status=progress
---