tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 078f882d771d474547d67e5d097e3da9fffd7fc4
parent ec3a97d6104ea69cc2078bc37e7ba561630d7120
Author: rbckman <rob@tarina.org>
Date:   Fri, 27 Nov 2020 20:03:46 +0200

new i2c func button added, now new i2c button keys; insert, copy move and peak. also changed keyboard shortcuts for copy and move

Diffstat:
Mdocs/tarina-manual.html | 121+++++++++++++++++++++++++++++++++++++++----------------------------------------
Mdocs/tarina-manual.md | 6++----
Mtarina.py | 138+++++++++++++++++++++++++++++++++++++++++++++++++------------------------------
3 files changed, 147 insertions(+), 118 deletions(-)

diff --git a/docs/tarina-manual.html b/docs/tarina-manual.html @@ -1,36 +1,37 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> +<!DOCTYPE html> +<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> <head> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <meta http-equiv="Content-Style-Type" content="text/css" /> + <meta charset="utf-8" /> <meta name="generator" content="pandoc" /> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> <meta name="keywords" content="Camera, 3d Printed, Filmmaker, Raspberry pi" /> <title>Tarina – Tarina Manual</title> - <style type="text/css">code{white-space: pre;}</style> - <link rel="stylesheet" href="style.css" type="text/css" /> + <style type="text/css"> + code{white-space: pre-wrap;} + span.smallcaps{font-variant: small-caps;} + span.underline{text-decoration: underline;} + div.column{display: inline-block; vertical-align: top; width: 50%;} + </style> + <link rel="stylesheet" href="style.css" /> </head> <body> -<div class="figure"> -<img src="tarina-logo.png" /> - -</div> +<p><img src="tarina-logo.png" /></p> <p><br></p> <h1 id="manual">MANUAL</h1> -<p>This is still a work in progress and documentation is on its way, if you're in a hurry feel free to drop a message in <a href="https://riot.im/app/#/room/#tarina:matrix.tarina.org">#tarina:matrix.tarina.org</a></p> -<div class="figure"> -<img src="tarina-filming-01.jpg" alt="Filming with Tarina" /> -<p class="caption">Filming with Tarina</p> -</div> +<p>This is still a work in progress and documentation is on its way, if you’re in a hurry feel free to drop a message in <a href="https://riot.im/app/#/room/#tarina:matrix.tarina.org">#tarina:matrix.tarina.org</a></p> +<figure> +<img src="tarina-filming-01.jpg" alt="Filming with Tarina" /><figcaption>Filming with Tarina</figcaption> +</figure> <h2 id="contents">Contents</h2> <h3 id="the-interface">The interface</h3> -<ol style="list-style-type: decimal"> +<ol type="1"> <li><a href="#introduction">Introduction</a></li> <li><a href="#keys">Keys</a></li> <li><a href="#menus">Menus</a></li> <li><a href="#faq">Faq</a></li> </ol> <h3 id="building-repairing-modding">[Building, repairing &amp; modding]</h3> -<ol style="list-style-type: decimal"> +<ol type="1"> <li><a href="#get-the-parts">Get the parts</a></li> <li><a href="#3d-printing">3d printing</a></li> <li><a href="#post-processing">Post processing</a></li> @@ -40,68 +41,63 @@ <li><a href="#tested-lenses">Tested lenses</a></li> </ol> <h1 id="introduction">Introduction</h1> -<div class="figure"> -<img src="tarina-filming-02.jpg" alt="Tarina UI" /> -<p class="caption">Tarina UI</p> -</div> +<figure> +<img src="tarina-filming-02.jpg" alt="Tarina UI" /><figcaption>Tarina UI</figcaption> +</figure> <p>The interface presents all the essential tools in film making under one menu that is present and accessible all the time. You can control it with a keyboard or with the physical buttons; Enter, Up, Down, Left, Right, Record, Retake, View and Remove.</p> <h2 id="retake-function">Retake function</h2> -<p>Always after recording a take you'll be presented with the last frame of that take. Now, if you are happy with it, press record again and you'll move to the next shot in your movie, oterwise press retake and you'll be filming a new take of that shot. At the time of writing the last take is always chosen into your movie film.</p> -<p>Hint! pressing record while browsing existing takes, shots and scenes will take you to the last shot in that scene. Pressing retake will do just that, a retake. Makes perfectly sense, right? Fiddle around with it, you'll totally get it.</p> +<p>Always after recording a take you’ll be presented with the last frame of that take. Now, if you are happy with it, press record again and you’ll move to the next shot in your movie, oterwise press retake and you’ll be filming a new take of that shot. At the time of writing the last take is always chosen into your movie film.</p> +<p>Hint! pressing record while browsing existing takes, shots and scenes will take you to the last shot in that scene. Pressing retake will do just that, a retake. Makes perfectly sense, right? Fiddle around with it, you’ll totally get it.</p> <h1 id="keys">Keys</h1> <h3 id="buttons">Buttons</h3> -<div class="figure"> -<img src="buttons.png" alt="Buttons" /> -<p class="caption">Buttons</p> -</div> +<figure> +<img src="buttons.png" alt="Buttons" /><figcaption>Buttons</figcaption> +</figure> <h3 id="keyboard">Keyboard</h3> -<div class="figure"> -<img src="keyboard.jpg" alt="Buttons" /> -<p class="caption">Buttons</p> -</div> +<figure> +<img src="keyboard.jpg" alt="Buttons" /><figcaption>Buttons</figcaption> +</figure> <p>With keys up and down you change a specific setting, for example shutter speed. With keys left and right you change what settings to change. With view, you can view the last shot or if you have a specific scene highlighted the camera would automatically glue all shots together and play that scene for you, same goes for film. With remove you can remove a specific take, shot, scene or film. With the retake button you retake a bad take, this is how the camera keeps track of your good takes. The last take is always the chosen one.</p> <p>Special keys on the keyboard (CAPITAL):</p> -<p>Y = Copy scene/shot</p> +<p>C = Copy scene/shot</p> <p>M = Cut (as in cut and paste) scene/shot</p> -<p>P = Paste scene/shot</p> -<p>I = Insert empty scene/shot</p> +<p>I = Insert empty or copied scene/shot</p> <p>space / pgup = Rec / Stop</p> <p>pgdwn / backspace = Retake</p> <p>tab = view</p> <h1 id="menus">Menus</h1> <p>A short explanation of all the settings and why they are where they are.</p> <h3 id="film-scene-shot-and-take">Film, scene, shot and take</h3> -<p>This you don't see on other cameras because they don't care about what you're filming, however this camera does and it wants to know where you are in your filmmaking process and help put it together. Of course, this means that <strong><em>you</em></strong> have to know where you are in your filmmaking process. The idea of the workflow is: film only the essentials, check your montage on the spot and do a retake if you need to fix something rather than filming a bunch of things and fixing it later on. This will save <strong><em>you</em></strong> alot of time.</p> +<p>This you don’t see on other cameras because they don’t care about what you’re filming, however this camera does and it wants to know where you are in your filmmaking process and help put it together. Of course, this means that <strong><em>you</em></strong> have to know where you are in your filmmaking process. The idea of the workflow is: film only the essentials, check your montage on the spot and do a retake if you need to fix something rather than filming a bunch of things and fixing it later on. This will save <strong><em>you</em></strong> alot of time.</p> <h3 id="dubbing">Dubbing</h3> -<p>If you press enter while you've highlighted the film name or a scene you'll be entering dub settings menu. (ADD:d:1.0/o:1.0) this indicates the volume of the (d)ub to the previous (o)riginal mix. So, for example if you want the dub volume to be 50% of the previous audio, the settings would look like this (ADD:d:0.5/o:1.0). A good all-around background music volume level is only 10% so it would look like this (ADD:d:0.1/o:1.0). The other setting is fade in and out in seconds (in: 0.5) (out: 1.0) whould be half a second in and a second out. Now if you press enter while the ADD is highlighted you'll be dubbing. You can change the settings later if you come back to the menu.</p> +<p>If you press enter while you’ve highlighted the film name or a scene you’ll be entering dub settings menu. (ADD:d:1.0/o:1.0) this indicates the volume of the (d)ub to the previous (o)riginal mix. So, for example if you want the dub volume to be 50% of the previous audio, the settings would look like this (ADD:d:0.5/o:1.0). A good all-around background music volume level is only 10% so it would look like this (ADD:d:0.1/o:1.0). The other setting is fade in and out in seconds (in: 0.5) (out: 1.0) whould be half a second in and a second out. Now if you press enter while the ADD is highlighted you’ll be dubbing. You can change the settings later if you come back to the menu.</p> <h3 id="shutter-iso-red-blue">Shutter, iso, red, blue</h3> -<p>Shutter and iso are well know basic camera concepts. With red and blue you control the colors. If you press enter while on any of these then it will go into auto mode and if you press it again it will go back to manual mode with the current auto settings. I'm using this feature to quickly find a reasonable good value before I'm locking and tuning the settings manually to my likings. Cuz you always will know better than the robots!</p> +<p>Shutter and iso are well know basic camera concepts. With red and blue you control the colors. If you press enter while on any of these then it will go into auto mode and if you press it again it will go back to manual mode with the current auto settings. I’m using this feature to quickly find a reasonable good value before I’m locking and tuning the settings manually to my likings. Cuz you always will know better than the robots!</p> <h3 id="bright-cont-sat">Bright, cont, sat</h3> -<p>Color grade on the go with brightness, contrast and saturation. You will probably have to play with theses to figure out what you want. Remember that as you're making your film ready while you're shooting it take by take, there's no color grading later on so you'll have to settle on your color grade before you film. To get that good old spaghetti western look go with the contrast at -19.</p> +<p>Color grade on the go with brightness, contrast and saturation. You will probably have to play with theses to figure out what you want. Remember that as you’re making your film ready while you’re shooting it take by take, there’s no color grading later on so you’ll have to settle on your color grade before you film. To get that good old spaghetti western look go with the contrast at -19.</p> <h3 id="flip-beep-lenght">Flip, beep, lenght</h3> -<p>If you go gonzo, flippin it is the way to go! beep is a countdown timer from the moment you press rec or retake to when it actually starts filming. Lenght let's you put in the lenght of your take before you actually start filming. Both of these are very useful if you film action alone and can't reach for the buttons.</p> +<p>If you go gonzo, flippin it is the way to go! beep is a countdown timer from the moment you press rec or retake to when it actually starts filming. Lenght let’s you put in the lenght of your take before you actually start filming. Both of these are very useful if you film action alone and can’t reach for the buttons.</p> <h3 id="mic-phones-comp">Mic, phones, comp</h3> -<p>Control teh level of your mic and headphones. Comp is a basic compressor so your message comes across and we hear ya! it's quite harsh at the moment but I like it when it goes craking up abit like in the good old 70s cinema.</p> +<p>Control teh level of your mic and headphones. Comp is a basic compressor so your message comes across and we hear ya! it’s quite harsh at the moment but I like it when it goes craking up abit like in the good old 70s cinema.</p> <h3 id="timelapse">Timelapse</h3> -<p>Do a timelapse when you need to tell about time. There's an under menu here where you can choose the intervall of the takes, now this isn't really a traditional timelapse, it will instead do a 0.2 sec video at each intervall or it can be set to your likings but 0.2 is good for a traditional timelapse effect. At the bottom of the screen is a calculation of how long the clip will be if you do the timelapse for an hour. I'd say don't over do it! a 10 - 20 sec clip is already quite a stretch but its up to you, you're the movie film director.</p> +<p>Do a timelapse when you need to tell about time. There’s an under menu here where you can choose the intervall of the takes, now this isn’t really a traditional timelapse, it will instead do a 0.2 sec video at each intervall or it can be set to your likings but 0.2 is good for a traditional timelapse effect. At the bottom of the screen is a calculation of how long the clip will be if you do the timelapse for an hour. I’d say don’t over do it! a 10 - 20 sec clip is already quite a stretch but its up to you, you’re the movie film director.</p> <h3 id="lens">Lens</h3> <p>A future implementation of lens shade correction will come where you get to do your own lens corrections to get those colors right on the spot!</p> <h3 id="dsk-shutdown-srv-wifi">Dsk, shutdown, srv, wifi</h3> -<p>Disk space, showing you how much of space left on your sd card. Shutdown, when your really done! it's good to do this before cutting the power or otherwise there's a small chance of sd card corruption. Srv is a network server, if your connected to a network and put this on you should be able to go to any browser on any device and watch your movie films (that is if you've rendered them first), just go to http://tarina.local or it might be that you have to know the ip address of your tarina (you'll find it when you've connected it. Press enter on wifi. There it is on the bottom of the screen, looks like this 192.168.1.105). If you press enter on wifi you will be transported to a glorious program called Wicd curses, here you really need to have a keyboard to set up your connections. Hints are down on the screen what buttons to press. To get back into Tarina press &quot;q&quot;.</p> +<p>Disk space, showing you how much of space left on your sd card. Shutdown, when your really done! it’s good to do this before cutting the power or otherwise there’s a small chance of sd card corruption. Srv is a network server, if your connected to a network and put this on you should be able to go to any browser on any device and watch your movie films (that is if you’ve rendered them first), just go to http://tarina.local or it might be that you have to know the ip address of your tarina (you’ll find it when you’ve connected it. Press enter on wifi. There it is on the bottom of the screen, looks like this 192.168.1.105). If you press enter on wifi you will be transported to a glorious program called Wicd curses, here you really need to have a keyboard to set up your connections. Hints are down on the screen what buttons to press. To get back into Tarina press “q”.</p> <h3 id="update-and-upload">Update and upload</h3> -<p>Update the camera to the most exclusive version, this is still pretty much a-work-in-progress and as a warnign expect some bugs! don't worry I'll be improving things but it takes time. Upload your film to the web, there is a youtube uploader mod you can install but you'll have to do some configs to make it work for you. Details coming soon. Reach out to the matrix room if you're in a hurry..</p> +<p>Update the camera to the most exclusive version, this is still pretty much a-work-in-progress and as a warnign expect some bugs! don’t worry I’ll be improving things but it takes time. Upload your film to the web, there is a youtube uploader mod you can install but you’ll have to do some configs to make it work for you. Details coming soon. Reach out to the matrix room if you’re in a hurry..</p> <p>to get the youtube api secrets <code>wget https://tarina.org/yt/.client_secrets.json</code></p> <h3 id="backup">Backup</h3> -<p>It's good to always backup your stuff! Plug in your usb drive and just press enter and sit back and relax as the wonderful work of computer copying does the magic. While you're at it open a beer cuz it can take quite a while if you got much stuff on there. Now, this should be working on almost all hard drives but there are some that still use a very old file system called fat, and its as lazy as its given name and doesnt store critical information we would want, because we want the copying to only copy our new takes or retakes. So please use new drives like ntfs systems or ext or whatever they all are called. You'll find all your takes even the shitty ones on your harddrive in a directory called /tarinafilms/. One more thing, there are some drives that are very power hungry and doesnt come with it's own power source, now these drives are very bad for this particular use because the Tarina has limited amounts of power for usb use, so to be sure it's gonna work, use powered hard drives that has got a power cord.</p> +<p>It’s good to always backup your stuff! Plug in your usb drive and just press enter and sit back and relax as the wonderful work of computer copying does the magic. While you’re at it open a beer cuz it can take quite a while if you got much stuff on there. Now, this should be working on almost all hard drives but there are some that still use a very old file system called fat, and its as lazy as its given name and doesnt store critical information we would want, because we want the copying to only copy our new takes or retakes. So please use new drives like ntfs systems or ext or whatever they all are called. You’ll find all your takes even the shitty ones on your harddrive in a directory called /tarinafilms/. One more thing, there are some drives that are very power hungry and doesnt come with it’s own power source, now these drives are very bad for this particular use because the Tarina has limited amounts of power for usb use, so to be sure it’s gonna work, use powered hard drives that has got a power cord.</p> <h3 id="load-and-new">Load and new</h3> <p>You can have many on going films, load em up or start as many films as you like.</p> <hr /> <h1 id="building-repairing-and-modding">Building, repairing and modding</h1> <h2 id="get-the-parts">Get the parts</h2> -<div class="figure"> -<img src="tarina-build.jpg" alt="Tarina parts layed out" /> -<p class="caption">Tarina parts layed out</p> -</div> +<figure> +<img src="tarina-build.jpg" alt="Tarina parts layed out" /><figcaption>Tarina parts layed out</figcaption> +</figure> <p>Here is a list of parts that will work, there are other parts that probably will work but requires some hacking.</p> <h2 id="raspberry-pi-3-b">Raspberry pi 3 B</h2> <p>Price ~30 eur</p> @@ -118,6 +114,10 @@ <p>Price ~10 eur</p> <p>This is a good performance card.</p> <p><a href="https://www.aliexpress.com/item/32676225311.html?spm=a2g0o.productlist.0.0.11ed1b664kPdEf&amp;algo_pvid=d9155fff-7ddc-47bb-9512-f7e686fe69ac&amp;algo_expid=d9155fff-7ddc-47bb-9512-f7e686fe69ac-0&amp;btsid=e2f36205-1c37-47bc-9a94-c006837f0992&amp;ws_ab_test=searchweb0_0,searchweb201602_7,searchweb201603_55">Aliexpress</a></p> +<h2 id="raspberry-pi-high-quality-camera-recommended">Raspberry Pi High Quality Camera (recommended)</h2> +<p>Price ~60 eur</p> +<p>This is the recommended camera module for Tarina, 12.3 megapixel Sony IMX477 sensor, 7.9mm diagonal image size, and back-illuminated sensor architecture, with adjustable back focus and support for C- and CS-mount lenses.</p> +<p><strong>Links</strong> <strong>Buy</strong> <a href="https://www.raspberrypi.org/products/raspberry-pi-high-quality-camera/?resellerType=home">Raspberry pi</a></p> <h2 id="arducam-5-mp-ov5647-camera-module-with-cs-lens">Arducam 5 MP OV5647 camera module with CS lens</h2> <p>Price ~30 eur</p> <p>This module and lens gives good hd video quality with the ability to manually focus and replace lenses. See tested lenses down below.</p> @@ -144,7 +144,7 @@ <p><strong>Buy</strong> <a href="https://www.aliexpress.com/item/free-shipping-3-7v-7800mah-18650-li-ion-rechargeable-battery-pack-18650-3P-lithium-ion-battery/32823635264.html?spm=a2g0s.9042311.0.0.49ba4c4dyoKkZS">Aliexpress</a></p> <p>Or you can buy 3 pcs of 3.7V 18650 Lithium cells and protect them with an Lithium Battery Protection Board Overcharge Over-discharge.</p> <p><a href="https://www.aliexpress.com/item/32826851071.html?spm=a2g0s.9042311.0.0.27424c4dUBojcv">Aliexpress</a></p> -<p>Here's a pack with 40 pcs of 2600mAh 3.7V 18650 cells.</p> +<p>Here’s a pack with 40 pcs of 2600mAh 3.7V 18650 cells.</p> <p><a href="https://www.aliexpress.com/item/32795814865.html?spm=a2g0s.9042311.0.0.27424c4dUBojcv">Aliexpress</a></p> <h2 id="adafruit-powerboost-1000c">Adafruit Powerboost 1000C</h2> <p>Price ~23 eur</p> @@ -214,7 +214,7 @@ <p><strong>Buy</strong> <a href="https://www.aliexpress.com/store/product/1-Piece-Short-0-2M-20cm-Red-3-5mm-Jack-to-Jack-Aux-Cable-Male-to/505072_32833465555.html?spm=2114.search0104.3.9.383e3c3dVjq9DY&amp;ws_ab_test=searchweb0_0,searchweb201602_5_10065_10068_5016020_10059_10696_100031_5015320_5016120_10084_10083_5015420_10103_451_10618_452_10304_10307_10820_10821_10302,searchweb201603_55,ppcSwitch_2&amp;algo_expid=9ba0b376-e66f-48d2-9ccd-ecc1e8794812-1&amp;algo_pvid=9ba0b376-e66f-48d2-9ccd-ecc1e8794812&amp;priceBeautifyAB=0">Aliexpress</a></p> <h2 id="rii-mini-i8-mini-keyboard">Rii mini i8+ mini keyboard</h2> <p>Price ~17 eur</p> -<p>Wireless control over camera. You will also need this for wifi settings etc. (Recommended) This is one of the best mini keyboards I've tried.</p> +<p>Wireless control over camera. You will also need this for wifi settings etc. (Recommended) This is one of the best mini keyboards I’ve tried.</p> <p><strong>Buy</strong> <a href="https://www.aliexpress.com/item/Rii-mini-i8-Russian-English-Spanish-Hebrew-Version-Wireless-Backlit-Keyboard-with-Touchpad-for-PC-Smart/32450468690.html?spm=a2g0s.9042311.0.0.27424c4dKdqpVO">Aliexpress</a></p> <p>Parts grand total ~200 eur</p> <h1 id="optional-parts">Optional parts</h1> @@ -230,8 +230,8 @@ <p>Price ~3 eur 10 pcs</p> <p><strong>Buy</strong> <a href="https://www.aliexpress.com/item/32963277127.html?spm=a2g0s.9042311.0.0.27424c4dRc1vCZ">Aliexpress</a></p> <h1 id="d-printing">3d printing</h1> -<p>While waiting for ordered parts lets 3d print the rest of the parts. I recommend printing with a solid 90% infill. Now it is pretty crucial that you have a good calibrated printer so that you don't over/under print. Some parts need to be very precise to work.</p> -<p>You'll find all the 3d parts in the 3d folder.</p> +<p>While waiting for ordered parts lets 3d print the rest of the parts. I recommend printing with a solid 90% infill. Now it is pretty crucial that you have a good calibrated printer so that you don’t over/under print. Some parts need to be very precise to work.</p> +<p>You’ll find all the 3d parts in the 3d folder.</p> <ul> <li><a href="https://github.com/rbckman/tarina/blob/master/3d/tarina-body.stl">body</a></li> <li><a href="https://github.com/rbckman/tarina/blob/master/3d/tarina-button-plate-bottom.stl">button-plate-bottom</a></li> @@ -247,8 +247,8 @@ <li><a href="https://github.com/rbckman/tarina/blob/master/3d/tarina-screen-lid.stl">screen-lid</a></li> </ul> <h1 id="post-processing">Post processing</h1> -<p>This is still a work in progress...</p> -<p>So far I've come to this conclusion:</p> +<p>This is still a work in progress…</p> +<p>So far I’ve come to this conclusion:</p> <ul> <li>Put 3d printed parts together with screws.</li> <li>Sand with sandpaper from rough to finest (from 120 to 400). I like to sand down all corners making them round.</li> @@ -264,7 +264,7 @@ <h1 id="wiring">Wiring</h1> <p><img src="wiring.png" alt="Tarina wiring diagram" /> <img src="tarina-build-13.jpg" alt="3d printed and painted, next up sanding and adding one more paint layer" /> <img src="tarina-build-04.jpg" alt="Fitting everything together" /> <img src="tarina-build-02.jpg" alt="Ready for screen" /> <img src="tarina-build-08.jpg" alt="MCP and buttons" /> <img src="tarina-build-10.jpg" alt="Sound card ready to be soldered" /></p> <h1 id="putting-it-together">Putting it together</h1> -<p>Documentation on its way, if you're in a hurry feel free to drop a message in <a href="https://riot.im/app/#/room/#tarina:matrix.tarina.org">#tarina:matrix.tarina.org</a></p> +<p>Documentation on its way, if you’re in a hurry feel free to drop a message in <a href="https://riot.im/app/#/room/#tarina:matrix.tarina.org">#tarina:matrix.tarina.org</a></p> <h1 id="installing-software">Installing software</h1> <p>Download latest <a href="https://www.raspberrypi.org/downloads/raspbian/">Raspbian</a> and follow <a href="https://www.raspberrypi.org/documentation/installation/installing-images/README.md">install instructions</a>. <a href="https://www.raspberrypi.org/documentation/remote-access/ssh/">Ssh into</a> Raspberry Pi and run:</p> <p>Go to home folder</p> @@ -275,15 +275,14 @@ <pre><code>git clone https://github.com/rbckman/tarina.git cd tarina sudo ./install.sh</code></pre> -<p>You'r ready to rumble:</p> +<p>You’r ready to rumble:</p> <pre><code>python3 tarina.py</code></pre> <p>Happy filming!</p> -<div class="figure"> -<img src="tarina-leone.jpg" alt="Should be looking like this once finnished" /> -<p class="caption">Should be looking like this once finnished</p> -</div> +<figure> +<img src="tarina-leone.jpg" alt="Should be looking like this once finnished" /><figcaption>Should be looking like this once finnished</figcaption> +</figure> <h1 id="tested-lenses">Tested lenses</h1> -<p>Here is what I'm testing right now.</p> +<p>Here is what I’m testing right now.</p> <h2 id="mm-3mp-f1.2-cs">2.8mm 3MP F1.2 CS</h2> <p>Price ~ 6 €</p> <p>This is a good wide all around lens. Recomended! <a href="https://www.aliexpress.com/item/32973023765.html?spm=a2g0o.productlist.0.0.4e9c3761rLgRE0&amp;algo_pvid=f9a62bbd-7981-48cb-a080-c39336b9f53f&amp;algo_expid=f9a62bbd-7981-48cb-a080-c39336b9f53f-1&amp;btsid=028c8b49-83e8-4c56-9b8b-6c32c36e65d9&amp;ws_ab_test=searchweb0_0,searchweb201602_7,searchweb201603_55">Aliexpress</a></p> diff --git a/docs/tarina-manual.md b/docs/tarina-manual.md @@ -54,13 +54,11 @@ With keys up and down you change a specific setting, for example shutter speed. Special keys on the keyboard (CAPITAL): -Y = Copy scene/shot +C = Copy scene/shot M = Cut (as in cut and paste) scene/shot -P = Paste scene/shot - -I = Insert empty scene/shot +I = Insert empty or copied scene/shot space / pgup = Rec / Stop diff --git a/tarina.py b/tarina.py @@ -111,6 +111,7 @@ def main(): oldsettings = '' comp = 1 yankedscene = '' + cuttedscene = '' yankedshot = '' #SAVE SETTINGS FREQUENCY IN SECS pausetime = time.time() @@ -160,11 +161,17 @@ def main(): pressed, buttonpressed, buttontime, holdbutton, event, keydelay = getbutton(pressed, buttonpressed, buttontime, holdbutton) #event = screen.getch() if recording == False: - #SHUTDOWN - if pressed == 'middle' and menu[selected] == 'SHUTDOWN': - writemessage('Hold on shutting down...') - time.sleep(1) - run_command('sudo shutdown -h now') + #PEAKING + if pressed == 'peak' and recordable == True: + if shot > 1: + peakshot = shot - 1 + peaktake = counttakes(filmname, filmfolder, scene, peakshot) + p_imagename = filmfolder + filmname + '/scene' + str(scene).zfill(3) + '/shot' + str(peakshot).zfill(3) + '/take' + str(peaktake).zfill(3) + '.jpeg' + overlay = displayimage(camera, p_imagename) + while holdbutton == 'peak': + pressed, buttonpressed, buttontime, holdbutton, event, keydelay = getbutton(pressed, buttonpressed, buttontime, holdbutton) + writemessage('peaking ' + str(peakshot)) + overlay = removeimage(camera, overlay) #TIMELAPSE elif pressed == 'middle' and menu[selected] == 'TIMELAPSE': overlay = removeimage(camera, overlay) @@ -303,71 +310,83 @@ def main(): vumetermessage('Film title changed to ' + filmname + '!') else: vumetermessage('') - #YANK(COPY) SHOT - elif event == 'Y' and menu[selected] == 'SHOT:' and recordable == False: + #(YANK) COPY SHOT + elif pressed == 'copy' and menu[selected] == 'SHOT:' and recordable == False: yankedshot = filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3) +'/shot' + str(shot).zfill(3) - vumetermessage('Shot ' + str(shot) + ' yanked(copied)') + vumetermessage('Shot ' + str(shot) + ' copied! (I)nsert button to place it...') time.sleep(1) - #YANK(COPY) SCENE - elif event == 'Y' and menu[selected] == 'SCENE:' and recordable == False: + #(YANK) COPY SCENE + elif pressed == 'copy' and menu[selected] == 'SCENE:' and recordable == False: yankedscene = filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3) - vumetermessage('Scene ' + str(scene) + ' yanked(copied)') + vumetermessage('Scene ' + str(scene) + ' copied! (I)nsert button to place it...') + time.sleep(1) + #(CUT) MOVE SHOT + elif pressed == 'move' and menu[selected] == 'SHOT:' and recordable == False: + cuttedshot = filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3) +'/shot' + str(shot).zfill(3) + vumetermessage('Moving shot ' + str(shot) + ' (I)nsert button to place it...') + time.sleep(1) + #(CUT) MOVE SCENE + elif pressed == 'move' and menu[selected] == 'SCENE:' and recordable == False: + cuttedscene = filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3) + vumetermessage('Moving scene ' + str(scene) + ' (I)nsert button to place it...') time.sleep(1) #PASTE SHOT and PASTE SCENE - elif event == 'P': - if menu[selected] == 'SHOT:' and yankedshot: - vumetermessage('Pasting shot, please wait...') - pasteshot = filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3) +'/shot' + str(shot-1).zfill(3) + '_yanked' - try: - os.makedirs(filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3)) - except: - pass - os.system('cp -r ' + yankedshot + ' ' + pasteshot) - add_organize(filmfolder, filmname) - updatethumb = True - vumetermessage('Shot pasted!') - time.sleep(1) - elif menu[selected] == 'SCENE:' and yankedscene: - vumetermessage('Pasting scene, please wait...') - pastescene = filmfolder + filmname + '/' + 'scene' + str(scene-1).zfill(3) + '_yanked' - os.system('cp -r ' + yankedscene + ' ' + pastescene) - add_organize(filmfolder, filmname) - shot = countshots(filmname, filmfolder, scene) - updatethumb = True - vumetermessage('Scene pasted!') - time.sleep(1) + elif pressed == 'insert' and menu[selected] == 'SHOT:' and yankedshot: + vumetermessage('Pasting shot, please wait...') + pasteshot = filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3) +'/shot' + str(shot-1).zfill(3) + '_yanked' + try: + os.makedirs(filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3)) + except: + pass + os.system('cp -r ' + yankedshot + ' ' + pasteshot) + add_organize(filmfolder, filmname) + updatethumb = True + yankedshot = '' + vumetermessage('Shot pasted!') + time.sleep(1) + elif pressed == 'insert' and menu[selected] == 'SCENE:' and yankedscene: + vumetermessage('Pasting scene, please wait...') + pastescene = filmfolder + filmname + '/' + 'scene' + str(scene-1).zfill(3) + '_yanked' + os.system('cp -r ' + yankedscene + ' ' + pastescene) + add_organize(filmfolder, filmname) + shot = countshots(filmname, filmfolder, scene) + updatethumb = True + yankedscene = '' + vumetermessage('Scene pasted!') + time.sleep(1) #MOVE SHOT and MOVE SCENE - elif event == 'M': - if menu[selected] == 'SHOT:' and yankedshot: + elif pressed == 'insert' and menu[selected] == 'SHOT:' and cuttedshot: vumetermessage('Moving shot, please wait...') pasteshot = filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3) +'/shot' + str(shot-1).zfill(3) + '_yanked' try: os.makedirs(filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3)) except: pass - os.system('cp -r ' + yankedshot + ' ' + pasteshot) - os.system('rm -r ' + yankedshot + '/*') + os.system('cp -r ' + cuttedshot + ' ' + pasteshot) + os.system('rm -r ' + cuttedshot + '/*') #Remove hidden placeholder - os.system('rm ' + yankedshot + '/.placeholder') + os.system('rm ' + cuttedshot + '/.placeholder') add_organize(filmfolder, filmname) organize(filmfolder, filmname) + cuttedshot = '' updatethumb = True vumetermessage('Shot moved!') time.sleep(1) - elif menu[selected] == 'SCENE:' and yankedscene: + elif pressed == 'insert' and menu[selected] == 'SCENE:' and cuttedscene: vumetermessage('Moving scene, please wait...') pastescene = filmfolder + filmname + '/' + 'scene' + str(scene-1).zfill(3) + '_yanked' - os.system('cp -r ' + yankedscene + ' ' + pastescene) - os.system('rm -r ' + yankedscene + '/*') - os.system('rm ' + yankedscene + '/.placeholder') + os.system('cp -r ' + cuttedscene + ' ' + pastescene) + os.system('rm -r ' + cuttedscene + '/*') + os.system('rm ' + cuttedscene + '/.placeholder') add_organize(filmfolder, filmname) organize(filmfolder, filmname) shot = countshots(filmname, filmfolder, scene) + cuttedscene = '' updatethumb = True vumetermessage('Scene moved!') time.sleep(1) #INSERT SHOT - elif event == 'I' and menu[selected] == 'SHOT:' and recordable == False: + elif pressed == 'insert' and menu[selected] == 'SHOT:' and recordable == False: insertshot = filmfolder + filmname + '/' + 'scene' + str(scene).zfill(3) +'/shot' + str(shot-1).zfill(3) + '_insert' os.makedirs(insertshot) add_organize(filmfolder, filmname) @@ -376,7 +395,7 @@ def main(): vumetermessage('Shot ' + str(shot) + ' inserted') time.sleep(1) #INSERT SCENE - elif event == 'I' and menu[selected] == 'SCENE:' and recordable == False: + elif pressed == 'insert' and menu[selected] == 'SCENE:' and recordable == False: insertscene = filmfolder + filmname + '/' + 'scene' + str(scene-1).zfill(3) + '_insert' logger.info("inserting scene") os.makedirs(insertscene) @@ -440,6 +459,7 @@ def main(): loadfilmsettings = True updatethumb = True time.sleep(0.5) + #RECORD AND PAUSE if pressed == 'record' or pressed == 'retake' or reclenght != 0 and t > reclenght or t > 3600: overlay = removeimage(camera, overlay) @@ -2521,6 +2541,10 @@ def getbutton(lastbutton, buttonpressed, buttontime, holdbutton): if i2cbuttons == True: readbus = bus.read_byte_data(DEVICE,GPIOB) readbus2 = bus.read_byte_data(DEVICE,GPIOA) + if readbus != 255: + print('i2cbutton pressed: ' + str(readbus)) + if readbus2 != 247: + print('i2cbutton pressed: ' + str(readbus2)) else: readbus = 255 readbus2 = 247 @@ -2528,30 +2552,38 @@ def getbutton(lastbutton, buttonpressed, buttontime, holdbutton): if buttonpressed == False: if event == 27: pressed = 'quit' - elif event == 'KEY_ENTER' or event == 10 or event == 13 or readbus == 247: + elif event == 'KEY_ENTER' or event == 10 or event == 13 or (readbus == 247 and readbus2 == 247): pressed = 'middle' - elif event == 'KEY_UP' or readbus == 191: + elif event == 'KEY_UP' or (readbus == 191 and readbus2 == 247): pressed = 'up' - elif event == 'KEY_DOWN' or readbus == 254: + elif event == 'KEY_DOWN' or (readbus == 254 and readbus2 == 247): pressed = 'down' - elif event == 'KEY_LEFT' or readbus == 239: + elif event == 'KEY_LEFT' or (readbus == 239 and readbus2 == 247): pressed = 'left' - elif event == 'KEY_RIGHT' or readbus == 251: + elif event == 'KEY_RIGHT' or (readbus == 251 and readbus2 == 247): pressed = 'right' - elif event == 'KEY_PGUP' or event == ' ' or readbus == 127: + elif event == 'KEY_PGUP' or event == ' ' or (readbus == 127 and readbus2 == 247): pressed = 'record' - elif event == 'KEY_PGDOWN' or readbus == 253: + elif event == 'KEY_PGDOWN' or (readbus == 253 and readbus2 == 247): pressed = 'retake' - elif event == 'KEY_TAB' or readbus == 223: + elif event == 'KEY_TAB' or (readbus == 223 and readbus2 == 247): pressed = 'view' elif event == 'KEY_DELETE' or readbus2 == 246: pressed = 'remove' + elif event == 'P' or (readbus2 == 245 and readbus == 191): + pressed = 'peak' + elif event == 'I' or (readbus2 == 244 and readbus == 255): + pressed = 'insert' + elif event == 'C' or (readbus2 == 245 and readbus == 254): + pressed = 'copy' + elif event == 'M' or (readbus2 == 245 and readbus == 253): + pressed = 'move' #elif readbus2 == 247: # pressed = 'shutdown' buttontime = time.time() holdbutton = pressed buttonpressed = True - if readbus == 255 and readbus2 == 247 and event == '': + if readbus == 255 and event == '': buttonpressed = False if float(time.time() - buttontime) > 0.2 and buttonpressed == True: if holdbutton == 'up' or holdbutton == 'down' or holdbutton == 'right' or holdbutton == 'left' or holdbutton == 'shutdown' or holdbutton == 'remove':