open recorded video
This commit is contained in:
parent
16d115960e
commit
bccd2c84e7
|
@ -25,9 +25,9 @@ fi
|
|||
|
||||
mkdir -p ~/.zen/tmp/
|
||||
|
||||
echo "Voulez-vous enregistrer le bureau? ENTER sinon"
|
||||
read desktop
|
||||
[[ $desktop != "" ]] && screencapture
|
||||
#echo "Voulez-vous enregistrer le bureau? ENTER sinon"
|
||||
#read desktop
|
||||
#[[ $desktop != "" ]] && screencapture
|
||||
|
||||
espeak "Starting Video record. Press ENTER to stop."
|
||||
# Find "input-slave" :: pactl list short sources
|
||||
|
@ -45,7 +45,7 @@ kill -15 $processid
|
|||
# cvlc v4l2:///dev/video0:width=640:height=480 --input-slave=pulse://alsa_input.usb-HD_Web_Camera_HD_Web_Camera_Ucamera001-02.analog-mono --sout '#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100,threads=4,audio-sync=1}:standard{access=file,mux=mp4,dst='~/.zen/tmp/MyVid.mp4'}' --run-time=$RECTIME --stop-time=$RECTIME cvlc://quit
|
||||
## RECOMMANCER ?
|
||||
|
||||
espeak "mp4 transcoding" #-acodec aac
|
||||
espeak "video transcoding" #-acodec aac
|
||||
# Ecran vert : ffmpeg -i input.mp4 -i greenscreen.mp4 -filter_complex '[1:v]colorkey=color=00FF00:similarity=0.85:blend=0.0[ckout];[0:v][ckout]overlay[out]' -map '[out]' output.mp4
|
||||
|
||||
rm -f ~/.zen/tmp/output.mp4
|
||||
|
@ -55,10 +55,12 @@ ffmpeg -i ~/.zen/tmp/output.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_l
|
|||
IPFSID=$(ipfs add -wrHq ~/.zen/tmp/output.mp4 | tail -n 1)
|
||||
echo "NEW VIDEO FILE /ipfs/$IPFSID/output.mp4"
|
||||
|
||||
espeak "OK"
|
||||
|
||||
mkdir -p ~/.zen/game/players/.current/publish
|
||||
|
||||
## Creating new video chain index.html
|
||||
PSEUDO=$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null)
|
||||
PLAYER=$(cat ~/.zen/game/players/.current/.player 2>/dev/null)
|
||||
OLDID=$(cat ~/.zen/game/players/.current/.vlog.index 2>/dev/null)
|
||||
if [[ $OLDID ]]; then
|
||||
sed s/_OLDID_/$OLDID/g ${MY_PATH}/../templates/video_chain.html > /tmp/index.html
|
||||
|
@ -67,7 +69,7 @@ else
|
|||
sed s/_IPFSID_/$IPFSID/g ${MY_PATH}/../templates/video_first.html > /tmp/index.html
|
||||
fi
|
||||
sed -i s/_DATE_/$(date -u "+%Y-%m-%d#%H:%M:%S")/g /tmp/index.html
|
||||
sed s/_PSEUDO_/$PSEUDO/g /tmp/index.html > ~/.zen/game/players/.current/publish/index.html
|
||||
sed s/_PSEUDO_/$PLAYER/g /tmp/index.html > ~/.zen/game/players/.current/publish/index.html
|
||||
|
||||
# Copy style & js
|
||||
cp -R ${MY_PATH}/../templates/styles ~/.zen/game/players/.current/publish/
|
||||
|
@ -82,6 +84,7 @@ IPFSROOT=$(ipfs add -rHq ~/.zen/game/players/.current/publish | tail -n 1)
|
|||
|
||||
echo "NEW VIDEO http://127.0.0.1:8080/ipfs/$IPFSROOT"
|
||||
|
||||
xdg-open "http://127.0.0.1:8080/ipfs/$IPFSROOT"
|
||||
|
||||
# https://stackoverflow.com/questions/49846400/raspberry-pi-use-vlc-to-stream-webcam-logitech-c920-h264-video-without-tran
|
||||
# record to MKV cvlc v4l2:///dev/video0:chroma=h264 :input-slave=alsa://hw:1,0 --sout '#transcode{acodec=mpga,ab=128,channels=2,samplerate=44100,threads=4,audio-sync=1}:standard{access=file,mux=mkv,dst='~/.zen/tmp/Webcam_Record/MyVid.mkv'}'
|
||||
|
|
Loading…
Reference in New Issue