Driveway Cam

bash script to convert bvr files

to Mp4

I was looking for a method to convert .bvr files to mp4 without using up my Blue Iris camera servers processor. Currently I’m running an 4th gen i5 processor.  So it is not a workhorse compared to some other machines on my network. 

Note: This is a work in progress. 

If there is a better way, shoot me an email: james @ strickstuff [dot] com

 

 

#!/bin/bash
#
# Script to convert .bvr files to mp4 using ffmpeg
# NOTE: this is still a work in progress
# I am still working on the ffmpeg switches
# to make this work better. But it works fine
# as is.
#
#
# First pass & remove files as you convert them. 
##!/bin/bash
for vid in *.bvr; 
do ffmpeg -probesize 42M -framerate 30 -i $vid -vcodec copy -an -bsf:v h264_mp4toannexb "${vid%.*}.h264" && rm $vid;
done
#
# Second pass, 
#
for h264 in *.h264;
do ffmpeg -i $h264 "${h264%.*}.mp4" && rm $h264;
done
#
# This just merges all mp4s in the directory into a single file
# remove (or comment out) if not needed.
#
[ -e list.txt ] && rm list.txt
for f in *.mp4
do
echo "file $f" >> list.txt
done
ffmpeg -f concat -i list.txt -c copy joined-out.mp4 && rm list.txt

Edited an old conky script with updated colors to match my theme and added Spotify & BTC.


conky.config = { 
-- set to yes if you want Conky to be forked in the background
background = false,

cpu_avg_samples = 2,
net_avg_samples = 2,

out_to_console = false,

-- X font when Xft is disabled, you can pick one with program xfontsel
--font 7x12
--font 6x10
--font 7x13
--font 8x13
--font 7x12
--font *mintsmild.se*
--font -*-*-*-*-*-*-34-*-*-*-*-*-*-*
--font -artwiz-snap-normal-r-normal-*-*-100-*-*-p-*-iso8859-1

-- Use Xft?
use_xft = true,

-- Xft font when Xft is enabled
font = 'Bitstream Vera Sans Mono:size=8',

own_window_transparent = false,

--own_window_colour hotpink
-- Text alpha when using Xft
xftalpha = 0.8,

-- Update interval in seconds
update_interval = 1,
-- Create own window instead of using desktop (required in nautilus)
own_window = true,
own_window_transparent = true,
own_window_hints = 'undecorated,below,skip_taskbar',
own_window_type = 'desktop',

-- Use double buffering (reduces flicker, may not work for everyone)
double_buffer = true,

-- Minimum size of text area
minimum_width = 260, minimum_height = 5,
maximum_width = 260,

-- Draw shades?
draw_shades = false,

-- Draw outlines?
draw_outline = false,

-- Draw borders around text
draw_borders = false,

-- Stippled borders?
stippled_borders = no,

-- border width
border_width = 1,

-- Default colors and also border colors
default_color = 'white',
default_shade_color = 'white',
default_outline_color = 'white',

-- Text alignment, other possible values are commented
--alignment top_left
--minimum_size 10 10
gap_x = 15,
gap_y = 70,
alignment = 'top_right',
--alignment bottom_left
--alignment bottom_right

-- Gap between borders of screen and text

-- Add spaces to keep things from moving about? This only affects certain objects.
use_spacer = 'none',

-- Subtract file system buffers from used memory?
no_buffers = true,

-- set to yes if you want all text to be in uppercase
uppercase = false,

-- boinc (seti) dir
-- seti_dir /opt/seti

-- Possible variables to be used:

-- Variable Arguments Description 
-- acpiacadapter ACPI ac adapter state. 
-- acpifan ACPI fan state 
-- acpitemp ACPI temperature. 
-- adt746xcpu CPU temperature from therm_adt746x 
-- adt746xfan Fan speed from therm_adt746x 
-- battery (num) Remaining capasity in ACPI or APM 
-- battery. ACPI battery number can be 
-- given as argument (default is BAT0). 
-- buffers Amount of memory buffered 
-- cached Amount of memory cached 
-- color (color) Change drawing color to color 
-- cpu CPU usage in percents 
-- cpubar (height) Bar that shows CPU usage, height is 
-- bar's height in pixels 
-- downspeed net Download speed in kilobytes 
-- downspeedf net Download speed in kilobytes with one 
-- decimal 
-- exec shell command Executes a shell command and displays 
-- the output in torsmo. warning: this 
-- takes a lot more resources than other 
-- variables. I'd recommend coding wanted 
-- behaviour in C and posting a patch :-). 
-- execi interval, shell Same as exec but with specific interval. 
-- command Interval can't be less than 
-- update_interval in configuration. 
-- fs_bar (height), (fs) Bar that shows how much space is used on 
-- a file system. height is the height in 
-- pixels. fs is any file on that file 
-- system. 
-- fs_free (fs) Free space on a file system available 
-- for users. 
-- fs_free_perc (fs) Free percentage of space on a file 
-- system available for users. 
-- fs_size (fs) File system size 
-- fs_used (fs) File system used space 
-- hr (height) Horizontal line, height is the height in 
-- pixels 
-- i2c (dev), type, n I2C sensor from sysfs (Linux 2.6). dev 
-- may be omitted if you have only one I2C 
-- device. type is either in (or vol) 
-- meaning voltage, fan meaning fan or temp 
-- meaning temperature. n is number of the 
-- sensor. See /sys/bus/i2c/devices/ on 
-- your local computer. 
-- kernel Kernel version 
-- loadavg (1), (2), (3) System load average, 1 is for past 1 
-- minute, 2 for past 5 minutes and 3 for 
-- past 15 minutes. 
-- machine Machine, i686 for example 
-- mails Mail count in mail spool. You can use 
-- program like fetchmail to get mails from 
-- some server using your favourite 
-- protocol. See also new_mails. 
-- mem Amount of memory in use 
-- membar (height) Bar that shows amount of memory in use 
-- memmax Total amount of memory 
-- memperc Percentage of memory in use 
-- new_mails Unread mail count in mail spool. 
-- nodename Hostname 
-- outlinecolor (color) Change outline color 
-- pre_exec shell command Executes a shell command one time before 
-- torsmo displays anything and puts output 
-- as text. 
-- processes Total processes (sleeping and running) 
-- running_processes Running processes (not sleeping), 
-- requires Linux 2.6 
-- shadecolor (color) Change shading color 
-- stippled_hr (space), Stippled (dashed) horizontal line 
-- (height) 
-- swapbar (height) Bar that shows amount of swap in use 
-- swap Amount of swap in use 
-- swapmax Total amount of swap 
-- swapperc Percentage of swap in use 
-- sysname System name, Linux for example 
-- time (format) Local time, see man strftime to get more 
-- information about format 
-- totaldown net Total download, overflows at 4 GB on 
-- Linux with 32-bit arch and there doesn't 
-- seem to be a way to know how many times 
-- it has already done that before torsmo 
-- has started. 
-- totalup net Total upload, this one too, may overflow 
-- updates Number of updates (for debugging) 
-- upspeed net Upload speed in kilobytes 
-- upspeedf net Upload speed in kilobytes with one 
-- decimal 
-- uptime Uptime 
-- uptime_short Uptime in a shorter format

-- seti_prog Seti@home current progress
-- seti_progbar (height) Seti@home current progress bar
-- seti_credit Seti@hoome total user credit


-- variable is given either in format $variable or in ${variable}. Latter
-- allows characters right after the variable and must be used in network
-- stuff because of an argument
--${font Dungeon:style=Bold:pixelsize=10}I can change the font as well
--${font Verdana:size=10}as many times as I choose
--${font Perry:size=10}Including UTF-8,
-- stuff after 'TEXT' will be formatted on screen
--${font Grunge:size=12}${time %a %b %d}${alignr -25}${time %k:%M}

};

conky.text = [[
${color #2EB7FF}$sysname $kernel - $nodename 
#${font TlwgMono:size=9}
${color #2EB7FF}Uptime:${color lightgrey} $uptime ${color #2EB7FF} Load:${color lightgrey} $loadavg

#${color #2EB7FF}${execi 1000 cat /proc/cpuinfo | grep 'model name' | sed -e 's/model name.*: //'}
${color #2EB7FF}Usage:${color #2EB7FF} ${color lightgrey}${cpu}% ${color #2EB7FF}${cpubar}
${color #2EB7FF}${cpugraph 000000 2EB7FF}
${color #2EB7FF}Proces:${color lightgrey} $processes ${color #2EB7FF}Run:${color lightgrey} $running_processes ${color #2EB7FF}T1:${color lightgrey}${execi 30 sensors | grep 'Core 0' | cut -c15-18}°C ${color}${color #2EB7FF}T2:${color lightgrey}${execi 30 sensors | grep 'Core 1' | cut -c15-18}°C${color}${font}

${color #2EB7FF}RAM:${color lightgrey} $mem/$memmax - $memperc% ${alignr}${color #2EB7FF}${membar 5,110}
${color #2EB7FF}SWP:${color lightgrey} $swap/$swapmax - $swapperc% ${alignr}${color #2EB7FF}${swapbar 5,110}

${color #2EB7FF}HD IO: ${color lightgrey}${diskio}
${color #2EB7FF}${diskiograph 000000 2EB7FF}

${color #2EB7FF}Disc Mounts:
${color #2EB7FF} Root ${color lightgrey}${fs_used /}/${fs_size /}${alignr}${color #2EB7FF}${fs_bar 5,120 /}
${if_mounted /home/james/mounts/backup}${color #2EB7FF} Backup ${color lightgrey}${fs_used /home/james/mounts/backup}/${fs_size /home/james/mounts/backup}${alignr}${color #2EB7FF}${fs_bar 5,120 /home/james/mounts/backup}${endif}
${if_mounted /home/james/mounts/shares}${color #2EB7FF} Shares ${color lightgrey}${fs_used /home/james/mounts/shares}/${fs_size /home/james/mounts/shares}${alignr}${color #2EB7FF}${fs_bar 5,120 /home/james/mounts/shares}${endif}

${color #2EB7FF}Network: 
${color #2EB7FF}WLAN IP: ${color lightgrey}${addr wlo1} ${color #2EB7FF}LAN IP: ${color lightgrey}${addr eno2}
${color #2EB7FF}SSID: ${color lightgrey}${wireless_essid} ${color #2EB7FF}Bitrate: ${color lightgrey}${wireless_bitrate wlo1}
${color #2EB7FF}Qual: ${color lightgrey} ${wireless_link_qual_perc wlo1}% ${alignr}${color #2EB7FF}${wireless_link_bar 5,135 wlo1}
${color #2EB7FF}Down:${color lightgrey} ${downspeed wlo1} $alignr${color #2EB7FF} Up:${color lightgrey} ${upspeed wlo1}
${color #2EB7FF}${downspeedgraph wlo1 27,120 000000 2EB7FF 180} $alignr${color #2EB7FF}${upspeedgraph wlo1 27,120 000000 2EB7FF 25}
${color lightgrey}${totaldown wlo1} $alignr${color lightgrey}${totalup wlo1}

${color #2EB7FF}Battery:
${color #2EB7FF}Status ${color lightgrey}${battery} ${alignr}${color #2EB7FF}${battery_bar 5,120}
${color #2EB7FF}Time Remaining ${color lightgrey}${battery_time}
${if_running spotify}
${color #2EB7FF}Spotify: ${color lightgrey}${exec ~/.conky/conky-spotify/scripts/status.sh}
${color #2EB7FF}Title: ${color lightgrey}${exec ~/.conky/conky-spotify/scripts/title.sh}
${color #2EB7FF}Artist: ${color lightgrey}${exec ~/.conky/conky-spotify/scripts/artist.sh}
${color #2EB7FF}Album: ${color lightgrey}${exec ~/.conky/conky-spotify/scripts/album.sh}
#${exec ~/.conky/conky-spotify/scripts/cover.sh}${image ~/.conky/conky-spotify/current/current.jpg -p 200,465 -s 60x60}
${endif}
${color #2EB7FF}Bitcoin:
${color #2EB7FF}${font TlwgMono:size=14}BTC: ${color lightgrey}${font TlwgMono:size=14}${color lightgrey}$$${texeci 300 curl https://api.kraken.com/0/public/Ticker?pair=XXBTZUSD | jq ".result.XXBTZUSD.c[0]" | grep -oE "[0-9]*\..."}
]];

 

Yet another year is about to pass, as such, so should the old look. I was going for a “paper” look, to match the “theme” I have for my main site. Doesn’t really match, but it will work.  It is my intention to write more in my blog in 2012.

I really hope 2012 to be a prosperous year for our family. We certainly need some prosperity! I will go back to school next month getting my computer certifications. North West Florida State College is my weapon of choice.  I should come out with Comptia A+, Security+, Linux+, and Network+ and a College Certificate in IT Technology.

Looking for something different, I recently downloaded and installed Ubuntu on my netbook. I have been a LOYAL Sabayon Linux user for many years now. I still use Sabayon, but wanted to learn another distribution. Since Ubuntu seems to be a popular distribution, I thought I would give it a try.

I first downloaded the Ubuntu netbook remix, but I hated the interface. Then, I downloaded and installed the standard desktop edition (10.04). On my Hannspree Hanns Note Netbook, installation worked like a champ. No issues, wireless and bluetooth worked out of the box. 10.04 is fast and responsive. Webcam and hotkeys worked too.

Linux basic commands are all the same, but there are some differences between Sabayon and Ubuntu. I’m working on getting used to the new commands like apt-get.

Fellow Readers… (Whomever that may be…)

Just some updates.  July was a busy month for me.  My little baby had to have surgery, so we were flown Hawaii where Doctors at Tripler Army Medical Center (TAMC) operated on my little girl.  The surgery went well, and we are very thankful.

It was very nice to visit Hawaii, but I was glad, as always, to get back home.  My Dad was fortunate enough to make it over to be with Audrey and I during the surgery.  This was the first time he had flown since around 1966.  Airports and aircraft have changed dramatically since then, huh?

I’m back to work now, and actually looked forward to coming to work for the first time in a long time.  The weather is raining, as usual this time in the pacific.  August is just around the corner, and school will be starting.

Sabayon Linux 3.5 was released while I was gone.  I’m downloading it now, and will install it when it’s done downloading or later on this week.  Probably won’t be done downloading until later on this week.  My ISP sucks over here.

As far as my website goes, I plan on redoing it once again.  It needs a new look.  I’m pretty much tired of the look.  And since I have more time now, I plan on hand coding my new site.  As soon as I come up with a color scheme, I’ll get busy.

Enough for now… I’ll try to post more later and include some photo’s I took in Hawaii…

-ME

I think the majority of the world uses Microsoft Products. Whether it’s Windows XP/Vista or Microsoft Office. Like a Southern Baptist Preacher, I feel it my responsibility to let the world know that there are free alternatives out there that not only does the same thing that Microsoft Products do, they do even more. The type of software I’m talking about is called Open Source Software. Open Source Software is software that is available for all to change, copy, distribute, etc.

Windows XP/Vista

Most households are familiar with Windows. Whether it’s XP or Vista, “Windows” is in nearly every home in America and probably across the world. Most businesses use Windows. Most schools use Windows. Most people don’t know that there are other Operating Systems (OS’s) out there. In the past few years, since Malware, Virii, and Spam is up, I’ve noticed that Apple have increased their sales of Macintosh computers. Apple/Mac computers do not use “Windows,” they use a Linux based OS called “OS X.” Since MAC OS X isn’t a Windows based OS, Viruses, Spyware and Malware are all incompatible. Now, don’t get confused, OS X isn’t Open Source Software. I just mentioned it because it’s an alternative to Windows. OS X, still costs you money. Now, what I use is called Linux. Linux is a Unix based OS that is yet another of the many Alternatives to Windows. Check this page out: DISTRO WATCH to learn more about the different Distro’s or Versions of Linux that’s available. Ubuntu and PCLinuxOS is probably the best to start off with. By getting rid of Windows and getting Linux, you’re saying goodbye to Spyware, Malware, and Viruses. You’re also saying goodbye to the famous “Blue Screen of Death” (BSoD).

OFFICE SOFTWARE

Another Microsoft product that people think they can’t live without is MS Office. You know Word, Excel, Power Point, etc. There are several alternatives to Microsoft Office products as well. The most known (I think) and the one I use is an Office Suite by Sun Microsystems called Open Office. You can check it out at OpenOffice.org. Open Office does everything that MS Office does and looks just as good. MS Office was required for my classes, but Open Office works just fine. And most importantly, it’s 100% Microsoft Office Compatible. So there’s no excuse for not switching NOW. Also, it’s available for Windows, Mac, & Linux.

Open Source Software is a great FREE alternative to Commercial software. For everything you do in Windows or Mac, there’s an alternative in Linux that’s just as good or better. If you have any questions on Free Alternative Software, feel free to contact me and I’ll see what I can do to help!