quick_command_list
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| quick_command_list [2017/07/26 17:59] – k2patel | quick_command_list [2022/05/16 20:05] (current) – [remove comments and blank lines from output] k2patel | ||
|---|---|---|---|
| Line 333: | Line 333: | ||
| grep -v -e ' | grep -v -e ' | ||
| </ | </ | ||
| + | OR | ||
| + | <code bash> | ||
| + | grep ' | ||
| + | </ | ||
| ==== Calculating Date ==== | ==== Calculating Date ==== | ||
| Line 437: | Line 440: | ||
| </ | </ | ||
| + | ==== Remove file with ASCII Name ==== | ||
| + | |||
| + | Simplest thing to do is use built in functionality to search and remove in command. | ||
| + | Here is the file i've on my machine. | ||
| + | <code bash> | ||
| + | �^? | ||
| + | </ | ||
| + | |||
| + | which translate to //'' | ||
| + | So check or list all the files with ascii in it. | ||
| + | <code bash> | ||
| + | ls [^[: | ||
| + | </ | ||
| + | |||
| + | now to remove | ||
| + | <code bash> | ||
| + | rm [^[: | ||
| + | </ | ||
| + | |||
| + | :!: Regex can be modified to list all matching file before removal. | ||
| + | |||
| + | ==== Testing connection or port without any software ==== | ||
| + | In linux proper way to test tcp or udp port connection without any software installed should be creating dev node. | ||
| + | |||
| + | <code bash> | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | out put can be redirected to tty with help of cat. | ||
| + | <code bash> | ||
| + | cat < / | ||
| + | </ | ||
| + | |||
| + | ==== Setting id tag on mp3 ==== | ||
| + | Setting mp3 tag on multiple file based on filename as song name.\\ | ||
| + | Same artist. | ||
| + | <code bash> | ||
| + | while read k2; do id3tag -a'xyz guru' -A' | ||
| + | </ | ||
| + | |||
| + | ==== FFMpeg Conversion of 4K ==== | ||
| + | I had issue of no audio while playing file over DLNA.\\ | ||
| + | I've did the transcoding so it can play audio on my Phillips 4K TV. | ||
| + | |||
| + | <code bash> | ||
| + | ffmpeg -i < | ||
| + | -map 0:0 -map 0:1 -map 0:2 -map 0:3 -map 0:5 -map 0:12 \ | ||
| + | -c:v copy \ | ||
| + | -c:a:0 truehd -strict -2 \ | ||
| + | -c:a:1 ac3 \ | ||
| + | -c:s copy \ | ||
| + | < | ||
| + | </ | ||
| + | OR | ||
| + | <code bash> | ||
| + | ffmpeg -i old_file.mp4 \ | ||
| + | -map 0:0 -map 0:1 -map 0:3 -map 0:5 \ | ||
| + | -c:v copy \ | ||
| + | -c:a:0 ac3 \ | ||
| + | -c:s copy \ | ||
| + | new_file.mp4 | ||
| + | </ | ||
| + | OR | ||
| + | <code bash> | ||
| + | ffmpeg -i old_file.mkv \ | ||
| + | -map 0:0 -map 0:1 -map 0:2 \ | ||
| + | -c:v copy \ | ||
| + | -c:a:0 ac3 \ | ||
| + | -c:s copy \ | ||
| + | -disposition: | ||
| + | new_file.mkv | ||
| + | </ | ||
| + | |||
| + | - First thing list all mapping on your existing file using ' | ||
| + | - Select all streams using map you would like to copy to your new file. | ||
| + | - each map should be listed using map so i selected only 6 out of 12. | ||
| + | - After that specify wich codecs to use. | ||
| + | - in -c:v i'm copying video as is. | ||
| + | - in -c:a:0 i'm converting audio to truehd | ||
| + | - in -c:a:1 i'm also adding second audio stream which is ac3. | ||
| + | - in -c:s i'm copying subtitles. | ||
quick_command_list.1501091959.txt.gz · Last modified: 2020/08/10 02:29 (external edit)
