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.

Shrinking images.

Stitching images to 360 video frames.

RAM disk as a working directory.

Coverting frames to a 360 video and publishing.

Multiblend on my Linux box

Software

ASCII video and panorama


NEW! Libcaca video

NEW! Jp2a video

OUTDATED! Jp2a video

AAlib video

OUTDATED! Libcaca 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.



Youtube 360Cities



Video to ASCII converter script using Jp2a and Imgkit.




Jp2a video:



https://youtu.be/7OgkW1Un2zU









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 *.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/')
	    jp2a --width=400 --height=112 --background=light --colors $i --html > $j.html
	    eval 'python3 ./aaa.py $j.html _$j.png'
	    convert _$j.png -trim +repage -modulate 100,0,0 -adaptive-resize 1920x1080\! -adaptive-sharpen 2.0 $j.png
    done

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

    


Top of Page



    
    #!/bin/bash

    c=16	# CPU cores

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

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

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

    for i in $(ls | grep jpg | sort) ; do
	    j=$( echo $i | sed '1,$ s/\(.*\)\.jpg/\1/')
	    ( jp2a --width=400 --height=110 --background=light --colors $i --html > $j.html ; rm $i ) &		# jp2a

	    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 ) &		# python

	    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 1920x1080\! -adaptive-sharpen 2.0 $j.png ; rm $i ) &	# images

	    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

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

    exit 0

    


Top of Page