Check These Out
Simple command to convert a large number of images into jpeg-format. Will delete originals after conversion.
To rip DVD movie to ogg format using ffmpeg, follow these steps.
1) find the vob files on the mounted video DVD in VIDEO_TS that stores the movie itself. There would be a few other VOB files that stores splash screen or special features, the vob files for the movie itself can be identified by its superior size. You can verify these vob files by playing them directly with a player (e.g. mplayer)
2) concatenate all such vob files, pipe to ffmpeg
3) calculate the video size and crop size. The ogg video size must be multiple of 16 on both width and height, this is inherit limitation of theora codec. In my case I took 512x384.
The -vcodec parameter is necessary because ffmpeg doesn't support theora by itself. -acodec is necessary otherwise ffmpeg uses flac by default.
First (and only) argument should be a 4chan thread URL.
First the find command finds all files in your current directory (.). This is piped to xargs to be able to run the next shell pipeline in parallel.
The xargs -P argument specifies how many processes you want to run in parallel, you can set this higher than your core count as the duration reading is mainly IO bound.
The -print0 and -0 arguments of find and xargs respectively are used to easily handle files with spaces or other special characters.
A subshell is executed by xargs to have a shell pipeline for each file that is found by find. This pipeline extracts the duration and converts it to a format easily parsed by awk.
ffmpeg reads the file and prints a lot of information about it, grep extracts the duration line. cut and sed cut out the time information, and tr converts the last . to a : to make it easier to split by awk.
awk is a specialized programming language for use in shell scripts. Here we use it to split the time elements in 4 variables and add them up.
Requires a listening port on HOST
eg. "cat movie.mp4 | nc -l 1356 " (cat movie.mp4 | nc -l PORT)
Useful if you're impatient and want to watch a movie immediately and download it at the same time without using extra bandwidth.
You can't seek (it'll crash and kill the stream) but you can pause it.
stty sane resets the tty to basic usable function. The ^J is a newline -- sometimes CR/LF interpretation is broken so use the ^J explicitly.
Using this command you can track a moment when usb device was attached.