ffmpeg - Script to Capture VHS Tapes Using the Hauppauge 610 USB-Live 2 Analog Video Digitizer and Video Capture Device - Ask Ubuntu


this device supported in linux kernel modern linux distributions. have had success using vlc media player in digitizing (compared ffmpeg has rendered pixelated picture). however, how create script make digitizing vhs's efficient possible?

this script has been efficient me digitizing home vhs's. you'll need vlc media player , ffmpeg if want convert mp4 ideal compression level. adjust v4l2:///dev/video0 :input-slave=alsa://hw:2,0 (video , audio input) if needed according machine. can find information using vlc , going media > capture device. there can see video device name , audio device name.

it mpeg2 device. using vlc encode directly mp4 or h264 produce video lips out of sync. why first encode mpeg2 , process mp4. ffmpeg here set use 3 of 4 cpu cores not max out cpu. you'll want adjust -threads 3 according cpu. if you're not sure, -threads 3 can removed. sure mark script executable before using: chmod +x your-script-name

#!/bin/bash  # enter name of file. read -p "enter file name: " filename  # enter how many minutes. read -p "how many minutes? (if left blank hitting enter, default 124 minutes.): " minutes if [ -z "$minutes" ];     minutes=124 fi  # remove spaces in file name. filename=$(echo "$filename" | sed 's/ /-/g')  # metadata. show in media player playlist or after clicking properties (in os x info) on file context menu. read -p "enter description: " details  # turn off sleep. can uncomment if using xfce. # xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/inactivity-on-ac -s 14  # create videos directory if not there. if ! [ -d $home/videos ]; mkdir $home/videos; fi  # encode video.  timeout --foreground ${minutes}m cvlc v4l2:///dev/video0 :input-slave=alsa://hw:2,0 :v4l2-standard=ntsc :live-caching=300 --sout '#transcode{vcodec=mp2v,acodec=mpga,ab=128,channels=2,samplerate=48000,fps=29.97,deinterlace}:std{access=file{no-overwrite},mux=ts,dst='$home/videos/$filename.ts'}'  # convert libx264 compress further, add in metadata comments, , keep cpu usage 75%.  ffmpeg -i $home/videos/$filename.ts -s 720x480 -c:v libx264 -preset medium -crf 22 -acodec copy -metadata comment="$details" -threads 3 $home/videos/$filename.mp4 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User