index.html

DIY 360 degree video


About my DIY 360 degree camcorder

Video rig and related stitching problems

360 video recording and synchronisation

Audio.

Auto vs Manual White Balance.

360 degree video assembling.

Preparing series of images.

Geometric template.

Stitching images to 360 video frames.

RAM disk as a working directory.

Coverting frames to a 360 video.

Multiblend on my Linux box

Software

ASCII video and panorama


Libcaca video

Jp2a video

AAlib video

360 ASCII panorama

Software


Other ...


Hero4 black fisheye correction using kdenlive.

Linux to cifs/smb share rsync.

AMDGPU-PRO and Vega 56 setup on my Ubuntu 16.04.

Back to traditional Vim settings.

Virtualbox: time sync and encrypted VM commandline start.

Ubuntu 20.04, Wait for Network to be configured.



Youtube 360Cities



Video to ASCII converter script using Libcaca and Imgkit.




Libcaca video:



https://youtu.be/OyTuZYKMF24









Scripts.



regulation-internal
    
    import imgkit
    import sys

    options = {
	    'quiet': '',
	    'quality': '100'
	    }

    imgkit.from_url(sys.argv[1], sys.argv[2], options=options)

    



Top of Page


regulation-internal
    
    #!/bin/bash
      
    f=$( ls *.mp4 )
    ffmpeg -i $f -r 25 -f image2 %7d.jpg

    for i in $(ls | grep jpg | sort) ; do
	    echo $i
	    j=$( echo $i | sed '1,$ s/\(.*\)\.jpg/\1/')
	    img2txt -W 734 -H 190 -x 3 -y 5 $i -f html3 > $j.html
	    eval 'python3 ./aaa.py $j.html _$j.png'
	    #convert _$j.png -trim +repage -resize '3840x' -sharpen 0x1.0 $j.png
	    convert _$j.png -trim +repage -adaptive-resize '3840x' -adaptive-sharpen 1.0 $j.png
	    rm $j.html _$j.png
    done

    ffmpeg -r 25 -f image2 -i %7d.png -vcodec libx264 -crf 17 -pix_fmt yuv420p $f.mkv

    


Top of Page



    
    #!/bin/bash

    c=16	# CPU cores

    echo
    echo "############################## 1 ################################"
    echo

    f=$( ls *.mp4 )				# .mp4 input
    ffmpeg -i $f -r 25 -f image2 %7d.jpg	# PAL 25 fps

    echo
    echo "############################## 2 ################################"
    echo

    for i in $(ls | grep jpg | sort) ; do
	    j=$( echo $i | sed '1,$ s/\(.*\)\.jpg/\1/')
	    ( img2txt -W 430 -H 110 $i -f html3 > $j.html ; rm $i ) &

	    s=$( ps -ef | grep img2txt | grep -v grep | wc -l )
	    echo $j.html" "$s

	    while [[ $s -ge $c ]] ; do
		    echo -n "."
		    sleep 1
		    s=$( ps -ef | grep img2txt | grep -v grep | wc -l )
		    if [[ $s -lt $c ]]
		    then
			    echo "."
		    fi
	    done
    done

    echo
    echo "############################## 3 ################################"
    echo

    for i in $(ls | grep html | sort) ; do
	    j=$( echo $i | sed '1,$ s/\(.*\)\.html/\1/')
	    ( eval 'python3 ./aaa.py $i _$j.png' ; rm $i ) &		#  the Python part

	    echo -n _$j.png " "
	    s=$( ps -ef | grep "aaa.py" | grep -v grep | wc -l )
	    echo $s

	    while [[ $s -ge $c ]] ; do
		    echo -n "."
		    sleep 1
		    s=$( ps -ef | grep "aaa.py" | grep -v grep | wc -l )
		    if [[ $s -lt $c ]]
		    then
			    echo "."
		    fi
	    done
    done

    echo
    echo "############################## 4 ################################"
    echo

    for i in $(ls | grep _ | grep png | sort) ; do
	    j=$( echo $i | sed '1,$ s/_\(.*\)\.png/\1/')
	    ( convert $i -trim +repage -adaptive-resize 3840x2160\! -adaptive-sharpen 2.0 $j.png ; rm $i ) &

	    echo -n $j.png" "
	    s=$( ps -ef | grep convert | grep -v grep | wc -l )
	    echo $s

	    while [[ $s -ge $c ]] ; do
		    echo -n "."
		    sleep 1
		    s=$( ps -ef | grep convert | grep -v grep | wc -l )
		    if [[ $s -lt $c ]]
		    then
			    echo "."
		    fi
	    done
    done

    echo
    echo "############################## 5 ################################"
    echo

    f=$( cat $f | sed '1,$ s/\(.*\)\.mp4/\1/' )
    ffmpeg -r 25 -f image2 -i %7d.png -vcodec libx264 -crf 0 -pix_fmt yuv420p $f.mkv		# .mkv output, crf = 0 for best quality

    exit 0

    


Top of Page