====== 리눅스 동영상 ====== * [[linux:vaapi|Linux VAAPI]] * [[:vlc|VLC]] * [[linux:haruna|Haruna Media Player]] * [[linux:celluloid|Celluloid]] * [[linux:smplayer|Linux SMPlayer]] * [[linux:umplayer|UMPlayer]] * [[linux:smplayer|Linux SMPlayer]] * [[linux:clapper|clapper]] * [[:subtitle_helper|자막 찾기 도우미]] * [[linux:video:handbrake|Handbrake]] : 손쉬운 동영상 변환기 * [[linux:webcam|Linux and webcam]] ===== 동영상 편집 ===== * [[linux:video:shotcut|Shotcut]] * [[linux:video:openshot|OpenShot]] * [[linux:video:kdenlive|Kdenlive]] ===== 방송 ===== * [[linux:video:obs|OBS - Open Broadcaster Software]] ===== Live Stream 녹화 ===== * [[https://linuxreviews.org/HOWTO_Dump_video_streams_from_the_Internet|HOWTO Dump video streams from the Internet - LinuxReviews]] * [[:vlc|VLC]] * [[youtube:youtube-dl|youtube-dl]] # 단순히 아래 명령만으로도 충분히 잘 녹화된다. Ctrl-C 를 눌러 종료한다. youtube-dl "" ===== 자막 합치기 ===== mencoder -oac copy -ovc lavc -utf8 -font 'Nanum Gothic' -sub "자막파일.srt" -o 결과물 자막_넣을_동영상 ===== 동영상 비율 변환(crop) ===== * 동영상을 16:9 비율로 변환하기. x -> 가로, y -> 세로 * ''x/y > 16/9'' : 가로가 비율보다 길 때 x 길이를 줄여준다. new x = x * ((y/9) / (x/16)) = 16/9y * ''x/y < 16/9'' : 세로가 비율보다 길 때 y 길이를 줄여준다. new y = y * ((x/16) / (y/9)) = 9/16x * 가로 비율이 길 때의 left/right crop px 계산 ''video_169.groovy'' int width = Integer.parseInt(args[0]) int height = Integer.parseInt(args[1]) if (width/height <= 16/9) { println "no need to crop" } int crop = width - (16.0 / 9.0 * height) println "crop left and right ${crop / 2}px" * 혹은 ''video_169.py'' #!/usr/bin/env python import sys width = int(sys.argv[1]) height = int(sys.argv[2]) if width/height <= 16.0/9.0: print 'no need to crop' crop = width - (16.0 / 9.0 * height) print('crop left and right %f px' % (crop/2.0)) ===== smi2srt ===== * [[http://deviantcj.tistory.com/407|SMI파일을 SRT로 변환하기]] sudo apt-get install libsubtitles-perl # smi to srt subs -c srt 파일명.smi -o 파일명.srt # srt to smi subs -c smi 파일명.srt -o 파일명.smi # 변환한 자막을 UTF-8로 바꿔준다. iconv -f euc-kr -t utf8 파일명1 > 파일명2 # 인코딩 오류가 발생하면 -c 옵션 추가 iconv -f euc-kr -t utf8 -c 파일명1 > 파일명2 * 위 명령을 스크립트 파일로 만들어두기 ''$HOME/.local/bin/smi2srt.sh [path/to/file.smi]'' #!/bin/sh fn=$(basename "$1") dn=$(dirname "$1") targetname="${fn%.*}.srt" subs -c srt "$1" -o "$dn/$targetname" read -p "Press Enter." nov * [[linux:mint:nemo|Nemo]] Action으로 변환 ''$HOME/.local/share/nemo/actions/smi2srt.nemo_action'' [Nemo Action] Name=SMI to SRT Comment=SMI to SRT Exec=gnome-terminal -x sh -c "/home/kwon37xi/.local/bin/smi2srt.sh '%F'" Selection=Any Extensions=smi * SRT가 ''EUC-KR'' 인코딩일 경우 UTF-8로 변환하는 [[linux:mint:nemo|Nemo]] Action ''$HOME/.local/share/nemo/actions/euckr_srt_to_utf8.nemo_action'' [Nemo Action] Name=EUC-KR SRT to UTF-8 SRT Comment=EUC-KR SRT to UTF-8 SRT Exec=gnome-terminal -x sh -c "iconv -f euc-kr -t utf8 '%F' > /tmp/iconvtemp;mv /tmp/iconvtemp '%F'" Selection=Any Extensions=srt ===== 바탕화면을 동영상으로 만들기 ===== * [[https://www.linuxuprising.com/2019/05/livestream-wallpaper-for-your-gnome.html|Video Livestream Wallpaper For Your GNOME, Xfce Or bspwm Desktop - Linux Uprising Blog]] * [[https://www.ostechnix.com/set-animated-video-wallpapers-linux-desktop/|Set Animated And Video Wallpapers For Your Linux Desktop - OSTechNix]]