<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Vivek Maskara on Medium]]></title>
        <description><![CDATA[Stories by Vivek Maskara on Medium]]></description>
        <link>https://medium.com/@maskaravivek?source=rss-5862a1b8ebd5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6vaJevEKVRfeTbGnyjQb9w.jpeg</url>
            <title>Stories by Vivek Maskara on Medium</title>
            <link>https://medium.com/@maskaravivek?source=rss-5862a1b8ebd5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 06:03:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@maskaravivek/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Scanning image using Epson Scanner on Raspberry Pi]]></title>
            <link>https://maskaravivek.medium.com/scanning-image-using-epson-scanner-on-raspberry-pi-7441d85bad?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/7441d85bad</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[epson]]></category>
            <category><![CDATA[scanner]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Sat, 10 Sep 2022 01:45:20 GMT</pubDate>
            <atom:updated>2022-09-10T01:45:20.120Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STJRZ5ns1gxrPlnIIyGTAQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@harrisonbroadbent?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Harrison Broadbent</a> on <a href="https://unsplash.com/@harrisonbroadbent?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h4>Learn how to scan images using Epson Scanner with a Python Script</h4><p>In this post, we will learn how to use Epson Scanner’s Linux utility to scan images using a Python script.</p><p>Let us jump right into it and learn how it can be done.</p><h3>Setup scanner utility</h3><p>First, we need to set up the Epson scanner utility on the Raspberry Pi.</p><h4>Step 1: Download the utility tar</h4><p>Download the tar file from <a href="https://download2.ebz.epson.net/epsonscan2/common/deb/arm/epsonscan2-bundle-raspbian-6.6.40.0.armv7l.deb.tar.gz">this</a> location. You can also run the following command in the terminal to download the tar.</p><pre>wget <a href="https://download2.ebz.epson.net/epsonscan2/common/deb/arm/epsonscan2-bundle-raspbian-6.6.40.0.armv7l.deb.tar.gz">https://download2.ebz.epson.net/epsonscan2/common/deb/arm/epsonscan2-bundle-raspbian-6.6.40.0.armv7l.deb.tar.gz</a></pre><h4>Step 2: Unzip the tar</h4><p>Next, unzip the downloaded tar.</p><pre>tar -tvf <a href="https://download2.ebz.epson.net/epsonscan2/common/deb/arm/epsonscan2-bundle-raspbian-6.6.40.0.armv7l.deb.tar.gz">epsonscan2-bundle-raspbian-6.6.40.0.armv7l.deb.tar.gz</a></pre><h4>Step 3: Install the scanner utility</h4><p>Locate the install.sh file and run the script to install the scanner utility.</p><pre>./install.sh</pre><p>Now, that we have the scanner utility setup, we can go ahead and use it to scan images. First, let us learn about some of the key scanner commands.</p><h3>Epson scanner commands</h3><h4>Checking connected scanners</h4><p>We can fetch a list of connected scanners to the Raspberry Pi using the following command.</p><pre>epsonscan2 --list</pre><h4>Checking scanner status</h4><p>We can check the status of the connected scanner using the following command.</p><pre>epsonscan2 --get-status</pre><h4>Scanning image</h4><p>We can scan images using the following command.</p><pre>epsonscan2 --scan scan_settings.sf2</pre><p>Notice, that the command takes a config file as input. You can check out the <a href="https://gist.github.com/maskaravivek/ca2ee61fc04dd1a5ed29aaca453881fb">config file</a> here.</p><h3>Scanning images using python script</h3><p>Finally, let us learn how to scan images using the Epson scanner’s utility using a python script.</p><h4>Step 1: Add the scan settings</h4><p>Create a file named scan_settings.sf2for the scan settings and add the following contents to it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/99f9e43e941ea67b2a1a28e2fe9534ae/href">https://medium.com/media/99f9e43e941ea67b2a1a28e2fe9534ae/href</a></iframe><p>Notice that we have set the FileNamePrefix as img2 which will result in the image being saved at /home/&lt;username&gt;/img2.jpg .</p><p>You can tweak any of the other settings based on your use case.</p><h4>Step 2: Write a python script for scanning images</h4><p>Next, create a main.py file and add the following code snippet to it for scanning images.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3e3864fb3cefa461badfb1f52318b8c0/href">https://medium.com/media/3e3864fb3cefa461badfb1f52318b8c0/href</a></iframe><p>That’s it. Once you run the python script, it should trigger a scan on the connected scanner. Once the scan completes, a new image will be generated at /home/&lt;username&gt;/img2.jpg .</p><p>That’s it for this post. Please leave a clap if you found this article useful. Consider subscribing to Medium to read more of my stories.</p><p><a href="https://maskaravivek.medium.com/membership">Join Medium with my referral link - Vivek Maskara</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7441d85bad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fetching WiFi Configs on Raspberry Pi]]></title>
            <link>https://maskaravivek.medium.com/fetching-wifi-configs-on-raspberry-pi-2b8cf72a9b8?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2b8cf72a9b8</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[wifi]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Sat, 27 Aug 2022 16:12:43 GMT</pubDate>
            <atom:updated>2022-08-27T16:12:43.220Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RYrdhYjT2Eol9gCu8Wp7mQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@harrisonbroadbent?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Harrison Broadbent</a> on <a href="https://unsplash.com/s/photos/raspberry-pi?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In this short post, we will learn how to fetch a list of configured Wifi networks on your Raspberry Pi.</p><p>If you are looking to configure Wifi on the Raspberry Pi then refer to this post.</p><p><a href="https://maskaravivek.medium.com/python-script-to-configure-wifi-on-raspberry-pi-without-reboot-3af07368b3c2">Python Script to Configure WiFi On Raspberry Pi Without Reboot</a></p><p>The Wifi config on a Raspberry Pi is stored in the wpa_supplicant.conf file.</p><pre>/etc/wpa_supplicant/wpa_supplicant.conf</pre><p>The wpa_supplicant.conf file contents should look something like this:</p><pre>ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev<br>update_config=1<br>country=US</pre><pre>network={<br>     ssid=&quot;&lt;YOUR_WIFI_NAME&gt;&quot;<br>     psk=&quot;&lt;YOUR_WIFI_PASSWORD&gt;&quot;<br>}</pre><pre>network={<br>     ssid=&quot;&lt;YOUR_WIFI_NAME_2&gt;&quot;<br>     psk=&quot;&lt;YOUR_WIFI_PASSWORD_2&gt;&quot;<br>}</pre><p>Let us get started and learn how to work with the wifi configs.</p><h3>Step 1: Install wpasupplicantconf</h3><p>Install the wpasupplicantconf lib for parsing the wpa_supplicant.conf file.</p><pre>pip install wpasupplicantconf</pre><h3>Step 2: Read the config file</h3><p>Next, read the plain text file contents from the wpa_supplicant.conf</p><pre>def get_wifi_config():<br>    file = open(&#39;/etc/wpa_supplicant/wpa_supplicant.conf&#39;, &#39;r&#39;)<br>    lines = file.readlines()<br>    return lines</pre><h3>Step 3: Get Configured Networks</h3><p>Finally, we can get a list of configured networks as follows</p><pre>from wpasupplicantconf import WpaSupplicantConf, ParseError</pre><pre>def get_wifi_networks():<br>    try:<br>        lines = get_wifi_config()<br>        wpa_conf = WpaSupplicantConf(lines)<br>        network_keys = list(wpa_conf.networks().keys())<br>        if len(network_keys) == 0:<br>            print(&#39;no wifi network configured&#39;)<br>            return None<br>        else:<br>            networks = wpa_conf.networks()<br>            return networks</pre><p>That’s it. It will return you an OrderedDict of networks as follows.</p><pre>OrderedDict([<br>    (&#39;Wifi1&#39;, OrderedDict([(&#39;psk&#39;, &#39;&quot;Password1&quot;&#39;)])),<br>    (&#39;Wifi2&#39;, OrderedDict([(&#39;psk&#39;, &#39;&quot;Password1&quot;&#39;)]))<br>])</pre><p>That’s it for this post. Please leave a clap if you found this article useful. Consider subscribing to Medium to read more of my stories.</p><p><a href="https://maskaravivek.medium.com/membership">Join Medium with my referral link - Vivek Maskara</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2b8cf72a9b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python Script to Configure WiFi On Raspberry Pi Without Reboot]]></title>
            <link>https://maskaravivek.medium.com/python-script-to-configure-wifi-on-raspberry-pi-without-reboot-3af07368b3c2?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3af07368b3c2</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[script]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[raspbian]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Sat, 13 Aug 2022 17:55:45 GMT</pubDate>
            <atom:updated>2022-08-13T17:55:45.808Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RYrdhYjT2Eol9gCu8Wp7mQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@harrisonbroadbent?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Harrison Broadbent</a> on <a href="https://unsplash.com/s/photos/raspberry-pi?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In this short post, I will walk you through the steps of configuring Wifi on a Raspberry Pi device using a Python script. Generally, a reboot is required after a new Wifi config is added to the config file. We will learn how to avoid this step so that the newly added wifi config can be applied without a reboot.</p><h3>Background</h3><p>The wifi configs on a Raspberry Pi are stored in the following file.</p><p><strong>/etc/wpa_supplicant/wpa_supplicant.conf</strong></p><p>The wpa_supplicant.conf file contents should look something like this:</p><pre>ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev<br>update_config=1<br>country=US</pre><pre>network={<br>     ssid=&quot;&lt;YOUR_WIFI_NAME&gt;&quot;<br>     psk=&quot;&lt;YOUR_WIFI_PASSWORD&gt;&quot;<br>}</pre><h3>Required Steps</h3><p>Here’s a list of steps that we need to perform</p><ul><li>Make the /etc/wpa_supplicant/wpa_supplicant.conf file editable by modifying its permissions</li><li>Update the wpa_supplicant.conf file with the desired wifi credentials.</li><li>Refresh the Wifi configs on the Raspberry Pi to apply the changes. Once we refresh the configs, the Raspberry Pi will connect to the newly added config.</li></ul><h3>Python Script</h3><p>Here’s the python script that will do all of the above steps for you. It contains the configure_wifi that takes in the wifi credentials and performs the required steps.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/42bcada0574e49113e733431ac2bc439/href">https://medium.com/media/42bcada0574e49113e733431ac2bc439/href</a></iframe><p>That’s it for this post. Please leave a clap if you found this article useful. Consider subscribing to Medium to read more of my stories.</p><p><a href="https://maskaravivek.medium.com/membership">Join Medium with my referral link - Vivek Maskara</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3af07368b3c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating and Shrinking Bootable for Rasberry Pi Image from SD Card]]></title>
            <link>https://maskaravivek.medium.com/creating-and-shrinking-bootable-for-rasberry-pi-image-from-sd-card-d9355cb29ee8?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9355cb29ee8</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Sat, 06 Aug 2022 01:41:16 GMT</pubDate>
            <atom:updated>2022-09-15T01:24:28.723Z</atom:updated>
            <content:encoded><![CDATA[<h3>Creating and Shrinking Raspberry Pi Image using SD Card</h3><h4>Learn how to create a copy of the Rasberry Pi from an SD card and shrink it</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RYrdhYjT2Eol9gCu8Wp7mQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@harrisonbroadbent?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Harrison Broadbent</a> on <a href="https://unsplash.com/s/photos/raspberry-pi?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Suppose you are working with Rasbian OS on Raspberry Pi and you make some changes to the OS by installing some packages, installing your services, and adding custom boot scripts. Once you are done with your changes, you might want to package everything and share/distribute your work as a img file. So that if anyone burns the img on their SD card, they will get the same environment as the one you created.</p><p>Initially, this problem seems quite simple, as you can simply put your SD card in a card reader and use some software to generate a img file. But the issue with this approach is that the generated img file’s size will be equal to the size of the SD card. We need to shrink the img to remove all the empty space so that the resulting img file is smaller.</p><p>Let us get started and see how we can do it.</p><h3>Step 1: Create a img using the SD card</h3><p>Pull out the SD card from your Raspberry Pi and put it in a card reader attached to your laptop.</p><h4>MacOS</h4><p>If you are using a Mac, use diskutility to check the attached SD card. Run the following command to list the attached devices.</p><pre>diskutil list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pu4RCHmMirOtlmMJpDkEng.png" /><figcaption>SD card</figcaption></figure><p>Based on the size, you might be able to identify the SD card. Take note of its mount path. For me it was /dev/disk7 .</p><p>Next, run the following command to create a img from the bootable SD card.</p><pre>sudo dd if=/dev/disk7 of=/Users/vivekmaskara/Downloads/Rpi.img</pre><blockquote>The above command doesn’t display any progress details and it might take 10–20 minutes to finish.</blockquote><p>Once the image is generated, you will see an output similar to the one shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ceBNuOoDu8WZIxSCGeToqQ.png" /></figure><h3>Other OS</h3><p>Refer to this tutorial for instructions on how to generate a img .</p><p><a href="https://raspberrytips.com/create-image-sd-card/">How to Create an Image of a Raspberry Pi SD Card? (Win/Linux/Mac) | Raspberry tips</a></p><h3>Step 2: Shrink Image</h3><p>Next, we will shrink the generated image. We will use <a href="https://github.com/Drewsif/PiShrink">PiShrink</a> to shrink the image.</p><h4>Prerequisite</h4><p>You might run into issues installing PiShrink on your system if you are not a Linux user. So I recommend using a dockerized version of PiShrink. So install Docker on your system if it is not already installed. Follow these instructions to install docker.</p><p><a href="https://docs.docker.com/engine/install/"></a></p><h4>Shrinking image using PiShrink</h4><p>Finally, we can shrink the generated img using a dockerized version of PiShrink. First, navigate to the directory containing the img file and then run the following command.</p><pre>docker run --privileged=true --rm \<br>    --volume $(pwd):/workdir \<br>    mgomesborges/pishrink \<br>    pishrink -pZv GramsRpi.img GramsRpiShrinked.img</pre><p>Once the shrinking process completes, you will see a output similar to this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*st-tsTzwblEFl7i0ni8_mw.png" /><figcaption>PiShrink output</figcaption></figure><h3>Step 3: Test your Shrunk image</h3><p>Finally, test your shrunk image by burning it to an SD card using any image-burning software you prefer. I used Etcher to burn the image back to the SD card.</p><p><a href="https://www.balena.io/etcher/">balenaEtcher - Flash OS images to SD cards &amp; USB drives</a></p><p>That&#39;s it for this post. Please leave a clap if you found this article useful. Consider subscribing to Medium to read more of my stories.</p><p><a href="https://maskaravivek.medium.com/membership">Join Medium with my referral link - Vivek Maskara</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9355cb29ee8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Record a Phone Call using Twilio?]]></title>
            <link>https://maskaravivek.medium.com/how-to-record-a-phone-call-using-twilio-ebee3c4a87c6?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebee3c4a87c6</guid>
            <category><![CDATA[phone-call-recorder]]></category>
            <category><![CDATA[java-servlet]]></category>
            <category><![CDATA[twilio-voice-api]]></category>
            <category><![CDATA[twilio]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Sat, 12 Mar 2022 10:49:15 GMT</pubDate>
            <atom:updated>2022-03-12T20:20:07.758Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to Record a Phone Call using Twilio Java SDK?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gegg0PEkrq_6gBtfF1KATw.jpeg" /></figure><p>Recording incoming and outbound phone conversations could be beneficial in multiple use cases for your company. The ability to record phone conversations with ease is critical for any company’s customer support operations. Analyzing the conversations could help in improving the customer support experience. In addition to it, you could record a customer’s query instead of relying on a voice mailbox when support executives are not available for live support.</p><p>In this tutorial, I will walk you through the process of recording a phone call using Twilio’s voice APIs as part of its Java SDK.</p><h3>Introduction</h3><p>Twilio provides powerful <a href="https://www.twilio.com/voice">voice APIs</a> that can be used to build an engaging voice experience that can be easily scaled to millions of users. The voice APIs provide a myriad of features including interactive voice response, speech recognition, and voice recording. In this tutorial, we</p><h3>Prerequisites</h3><p>You will require a Twilio account for this tutorial. You can sign up for a trial account <a href="https://www.twilio.com/try-twilio">here</a> if you don’t already have an account. Also, since we will be using Twilio’s Java SDK, you need to have a Java development environment set up on your device. You can <a href="https://java.com/en/download/help/download_options.html">download and install Java</a> from their official site. In addition to Java, you will also need <a href="https://maven.apache.org/install.html">Apache Maven</a> installed on your device to execute the Java code that we write.</p><p>We will be testing our Java servlet by using Ngrok, so you can optionally <a href="https://dashboard.ngrok.com/signup">sign up for Ngrok</a> and <a href="https://ngrok.com/download">install</a> it on your device. You can skip installing Ngrok and proceed to directly deploying your Java web app using a cloud provider if you are already familiar with the process.</p><h3>Setting up a Twilio Phone Number</h3><p>We need to buy a Twilio phone number using the <a href="https://www.twilio.com/console">Twilio console</a> before we can use the Twilio voice APIs. On the console, you can search and buy a phone number from around the world. Choose <strong>Phone Numbers &gt; Manage &gt; Buy a number </strong>from the left sidebar of the Twilio console to buy a new phone number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5mBnKIK2RqxA2gF-" /><figcaption>Choose Buy a number to start purchase</figcaption></figure><p>On the next screen that opens up, you can update the search criteria based on your preferences and choose a number that you would like to use. Click on the <strong>Buy </strong>button to confirm the purchase. Ensure that the phone number you selected supports voice capability since we would need it to record phone conversations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pRlP6NT1WyJlBbtU" /><figcaption>Filter and choose phone number</figcaption></figure><p>Note, that different phone numbers might have different monthly fees associated with them. Check the pricing structure before buying the number.</p><p>We will come back to the Twilio console later in the tutorial to configure the phone number with a webhook URL. First, let us build a Java servlet to record a part of an incoming phone call.</p><h3>Record a part of incoming phone call</h3><p>In this section, we will write a Java servlet that can serve as a webhook for our Twilio phone number and handle incoming HTTP requests. I will walk you through the entire process of developing and deploying a Java servlet since I struggled to find a good tutorial for the same and if you are a beginner, you might otherwise get stuck.</p><h3>Create a new Java project</h3><p>Let us first create a new Java project that uses Maven as its build system. Create a new directory for your java project.</p><pre>mkdir twilio-phone-recorder</pre><p>Next, let us add a pom.xml file to the Java project with a standard configuration with required dependencies and plugins for creating a Java servlet.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dd37e7c16ebc97d6fada2ba760d2fc1f/href">https://medium.com/media/dd37e7c16ebc97d6fada2ba760d2fc1f/href</a></iframe><p>Notice, that we are using the maven-war-plugin for collecting all artifacts and dependencies for the web application. Also, we are using the jetty-maven-plugin which facilitates rapid development and testing.</p><h3>Define a web app</h3><p>Next, let us define a simple web app by adding a index.html page in the src/main/webapp directory.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f6f9f175a21e77629598b6b6f5264b2/href">https://medium.com/media/9f6f9f175a21e77629598b6b6f5264b2/href</a></iframe><h3>Add Twilio dependency</h3><p>Next, let us add a dependency for <a href="https://www.twilio.com/docs/libraries/java">Twilio’s Java SDK</a> in the pom.xml file by adding the following code snippet in the dependencies block.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dde316ab7b09721a01a716154cccbb92/href">https://medium.com/media/dde316ab7b09721a01a716154cccbb92/href</a></iframe><h3>Define Java Servlet</h3><p>Next, let us finally define a Java servlet to handle incoming HTTP requests. Let us define RecordServlet.java class in the src/main/java/com/maskaravivek directory. In the servlet, we are using Twilio’s <a href="https://www.twilio.com/docs/voice/twiml">Twiml</a> which is a mark-up language that lets us use special tags that can be served as instructions while handling a phone call. Using the VoiceResponse object we set the welcome message and set the record property to record the voice call.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c457c00f60499245a91b94f762481895/href">https://medium.com/media/c457c00f60499245a91b94f762481895/href</a></iframe><p>Notice that the Record.Builder offers multiple options that can be used to customize how the recording is performed.</p><h3>Run the Maven project</h3><p>Finally, let us run the Maven project and see if it works. Open up the terminal and execute the following command in the root directory of your project.</p><pre>mvn jetty:run</pre><p>Executing the above command will make the servlet available at localhost. You can navigate to the following URL to see your servlet in action.</p><p><a href="http://localhost:8080/">http://localhost:8080/</a></p><p>Since our /recordIncoming servlet is of type POST, you can’t open it directly in the browser. Instead, you can use CURL or Postman to test it out.</p><pre>curl -X POST <a href="http://localhost:8080/recordIncoming">http://localhost:8080/recordIncoming</a></pre><p>Executing the above command should return an XML output similar to the one shown below.</p><pre>&lt;?xml version=”1.0&quot; encoding=”UTF-8&quot;?&gt;&lt;Response&gt;&lt;Say&gt;Hello. Please leave a message after the tone and our customer executives will get back to you.&lt;/Say&gt;&lt;Record/&gt;&lt;Hangup/&gt;&lt;/Response&gt;</pre><p>Notice, that the above response contains all the options that we set in the handler.</p><h3>Expose Servlet using Ngrok for testing</h3><p>Next, let us expose our Java servlet to a public IP using Ngrok. First, obtain the Ngrok token from the Ngrok dashboard and set it by executing the following command.</p><pre>ngrok authtoken &lt;token&gt;</pre><p>Next, simply execute the following command to forward HTTP port 8080 to a public IP.</p><pre>ngrok http 8080</pre><p>Running the above command should result in an output similar to the one shown below. Grab one of the Forwarding URLs and try opening it in the browser. It should show you the contents of your Java servlet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-KZ0NwaHFlqyxlG2" /></figure><h3>Set incoming call webhook using Twilio console</h3><p>Finally, let us use the Ngrok public URL and set it in the <strong>A CALL COMES IN </strong>section of your phone number and click <strong>Save</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7G0P_RYZxopQJD7I" /></figure><p>Once you set the webhook, whenever your Twilio phone number receives a phone call, it will trigger this webhook. Since the webhook returns a Twiml response, it will result in the welcome message being read out to the caller and the caller’s response being recorded.</p><h3>Record outbound phone calls</h3><p>In this section, we will see the steps for recording outbound phone calls using Twilio’s Java SDK. Let us jump right into it and see how it can be done.</p><h3>Define a servlet for outbound call response</h3><p>Similar to how we defined a servlet to handle incoming calls, let us define a GET servlet that returns a Twiml that we will use while making an outbound call. Let us define a simple servlet function that speaks out a preset message.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/070d6a3d267d4cac5f864c358274f5ec/href">https://medium.com/media/070d6a3d267d4cac5f864c358274f5ec/href</a></iframe><p>The servlet will be available at the following URL.</p><p><a href="http://localhost:8080/outbound">http://localhost:8080/outbound</a></p><h3>Fetch account SID and auth token</h3><p>First, let us fetch the account SID and auth token from the <a href="https://console.twilio.com/">Twilio console</a> and set them as environment variables.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TneI6YWnru7ZNnsw" /></figure><p>Refer to <a href="https://www.twilio.com/docs/usage/secure-credentials">Twilio’s documentation</a> for steps to set the environment variables on your device.</p><pre>echo “export TWILIO_ACCOUNT_SID=’ACXXXXXXXXXXXX’” &gt; twilio.env<br>echo “export TWILIO_AUTH_TOKEN=’your_auth_token’” &gt;&gt; twilio.env<br>source ./twilio.env</pre><h3>Define script to record outbound calls</h3><p>Next, let us write a script to record outbound calls using Twilio’s Java SDK. In the code snippet defined below, we first init the Twilio SDK using the account SID and auth token by calling the Twilio.init function. We will use the /outbound servlet that we just created to provide instructions on how the outbound call should be handled.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51f695b06b1325b846a69a4c41403ff7/href">https://medium.com/media/51f695b06b1325b846a69a4c41403ff7/href</a></iframe><p>Notice, that the first parameter in the Call.creator method is the to phone number and the second param is the from phone number.</p><p>As soon as you execute this code snippet, the to phone number will receive a phone call with a preset message as defined in the /outbound servlet.</p><p>Note, that it is not necessary to define a servlet for the outbound call instructions. If you already have the Twiml hosted somewhere, you could provide that URL instead.</p><h3>Conclusion</h3><p>In this tutorial, we saw how Twilio simplifies the process of recording incoming and outbound calls using Twiml and Twilio’s Java SDK. In this tutorial, we exposed the Java servlets using Ngrok but for a production app, you could use a cloud provider such as AWS to <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Java.html">deploy the web application</a>. Check out the complete source code used in this tutorial on Github.</p><p><a href="https://github.com/maskaravivek/twilio-call-recorder-java-servlet">GitHub - maskaravivek/twilio-call-recorder-java-servlet</a></p><p>You can access your <a href="https://console.twilio.com/us1/monitor/logs/call-recordings">call recordings</a> using the Twilio console. <a href="https://www.twilio.com/voice">Twilio Voice APIs</a> offer many other features that could help you automate other flows in your company.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebee3c4a87c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Stream Live Feed From DSLR on Raspberry Pi using FFServer]]></title>
            <link>https://maskaravivek.medium.com/how-to-stream-live-feed-from-dslr-on-raspberry-pi-using-ffserver-656df3b3ef87?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/656df3b3ef87</guid>
            <category><![CDATA[live-streaming]]></category>
            <category><![CDATA[ffmpeg]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[câmera]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Sat, 17 Oct 2020 07:45:06 GMT</pubDate>
            <atom:updated>2022-09-10T03:37:49.402Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*VsdJL1Lbzp6U9yjp" /></figure><p>In this short post, I will walk you through the steps for streaming a live camera feed from a DSLR connected to the Raspberry Pi. We will be using <a href="http://www.gphoto.org/">gphoto2</a> for interfacing with the camera, FFmpeg for encoding the video, and FFserver for hosting the feed on a local webserver.</p><h3>Prerequisites</h3><h4>Hardware</h4><p>For this tutorial, I am assuming that you have a Raspberry Pi with Raspbian or Noob OS installed on it. You can get a <a href="https://amzn.to/3jJoeLC">Raspberry Pi</a> from Amazon if you don’t already have one.</p><p>Also, I am assuming that you already have one of the supported cameras listed here:</p><p><a href="http://www.gphoto.org/proj/libgphoto2/support.php">Projects :: libgphoto2 :: supported cameras</a></p><p>I used the <a href="https://amzn.to/3jIBccL">Canon Rebel T7 camera</a> which I got from Amazon.</p><h4>Software</h4><p>Install libghoto2 and ghoto2. Check out the setup instructions in this post for installing these libraries on a Rasberry Pi.</p><p><a href="https://maskaravivek.medium.com/how-to-control-and-capture-images-from-dslr-using-raspberry-pi-cfc0cf2d5e85">How to Control and Capture Images from DSLR using Raspberry Pi</a></p><p>Install FFmpeg and FFserver. Check out this post for step-by-step instructions.</p><p><a href="https://maskaravivek.medium.com/how-to-install-ffmpeg-and-ffserver-on-raspberry-pi-f820ef914975">How to install FFMPEG and FFServer on Raspberry Pi</a></p><h3>Setup FFServer</h3><p>Create a file at /etc/ffserver.conf and the following contents in it.</p><pre>Port 8090<br>BindAddress 0.0.0.0<br>MaxHTTPConnections 2000<br>MaxClients 1000<br>MaxBandwidth 1000<br>CustomLog -<br>NoDaemon</pre><pre>&lt;Feed feed1.ffm&gt;<br>        File /tmp/feed1.ffm<br>        FileMaxSize 200M<br>        ACL allow 127.0.0.1<br>&lt;/Feed&gt;</pre><pre>&lt;Stream test1.swf&gt;<br>        Feed feed1.ffm<br>        Format mpeg</pre><pre>AudioBitRate 32<br>        AudioChannels 1<br>        AudioSampleRate 44100</pre><pre>VideoBitRate 64<br>        VideoBufferSize 40<br>        VideoFrameRate 20<br>        VideoSize 1056x704<br>        VideoGopSize 12</pre><pre>NoAudio<br>&lt;/Stream&gt;</pre><pre>&lt;Stream stat.html&gt;<br>        Format status<br>        ACL allow localhost<br>        ACL allow 192.168.0.0 192.168.255.255<br>&lt;/Stream&gt;</pre><pre>&lt;Redirect index.html&gt;<br>        URL <a href="http://www.ffmpeg.org/">http://www.ffmpeg.org/</a><br>&lt;/Redirect&gt;</pre><p>Note: I am using the configs as mentioned in this <a href="http://gphoto-software.10949.n7.nabble.com/liveview-in-EOS-cameras-td4238.html">thread</a>. Check out <a href="https://trac.ffmpeg.org/wiki/ffserver">FFserver docs</a> for more configuration options.</p><p>Start the server:</p><pre>ffserver -d -f /etc/ffserver.conf</pre><h3>Publish the Stream</h3><p>We would be using ghoto2 to capture a live camera preview from the DSLR and will then be encoding it to mjpg format using FFmpeg. Finally, we will be serving this file to feed1.ffm as defined in the ffserver.conf file. This command achieves all of the above:</p><pre>gphoto2 --capture-movie --stdout | ffmpeg -re -i pipe:0 -listen 1 -f swf <a href="http://localhost:8090/feed1.jpg">http://localhost:8090/feed1.jpg</a></pre><h3>View the Stream</h3><p>Create a simple HTML page and embed the stream URL in it.</p><p>Open the HTML file in the browser and you should be able to view the stream.</p><p>Note: You will need to enable Flash support in your browser. Also, keep in mind that Flash support might permanently be gone from the browsers by the end of the year.</p><p>That’s it for this post. I hope you will find this post useful. I found the above information in a comment on <a href="http://gphoto-software.10949.n7.nabble.com/liveview-in-EOS-cameras-td4238.html">this thread</a>. All credits to <a href="http://gphoto-software.10949.n7.nabble.com/template/NamlServlet.jtp?macro=user_nodes&amp;user=2089">vincent</a> for suggesting this solution.</p><p>That’s it for this post. Please leave a clap if you found this article useful. Consider subscribing to Medium to read more of my stories.</p><p><a href="https://maskaravivek.medium.com/membership">Join Medium with my referral link - Vivek Maskara</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=656df3b3ef87" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Control and Capture Images from DSLR using Raspberry Pi]]></title>
            <link>https://maskaravivek.medium.com/how-to-control-and-capture-images-from-dslr-using-raspberry-pi-cfc0cf2d5e85?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfc0cf2d5e85</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[dslr]]></category>
            <category><![CDATA[gphoto2]]></category>
            <category><![CDATA[câmera]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Sat, 17 Oct 2020 07:28:40 GMT</pubDate>
            <atom:updated>2022-09-10T03:37:21.996Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*reY_6OMCGYujp-iz" /></figure><p>In this short post, I will walk you through the steps for controlling and capturing pictures from a DSLR connected to the Raspberry Pi using a USB cable. There are numerous tutorials out there for this setup but I found them to be outdated to some extent. This post covers the installation of libgphoto2 and <a href="http://www.gphoto.org/">ghoto2</a> from the source and also covers the steps for capturing pictures using Python scripts.</p><h3>Prerequisite</h3><p>For this tutorial, I am assuming that you have a Raspberry Pi with Raspbian or Noob OS installed on it. You can get a <a href="https://amzn.to/3jJoeLC">Raspberry Pi</a> from Amazon if you don’t already have one.</p><p>Also, I am assuming that you already have one of the supported cameras listed here:</p><p><a href="http://www.gphoto.org/proj/libgphoto2/support.php">Projects :: libgphoto2 :: supported cameras</a></p><p>I used the <a href="https://amzn.to/3jIBccL">Canon Rebel T7 camera</a> which I got from Amazon.</p><h3>Install libgphoto2 and gphoto2</h3><p>libghoto2 library lets you interface with 100s of supported DSLR cameras and ghoto2 is a command-line utility for using libghoto2</p><p>Here are the steps for installing both these libraries.</p><h4>Prerequisites</h4><p>Install the following dependencies:</p><pre>sudo apt-get install git make autoconf libltdl-dev libusb-dev libexif-dev libpopt-dev libxml2-dev libjpeg-dev libgd-dev gettext autopoint</pre><h4>Install libghoto2</h4><p>Download the latest code for libgphoto2 from:</p><pre>git clone <a href="https://github.com/gphoto/libgphoto2.git">https://github.com/gphoto/libgphoto2.git</a></pre><p>Execute the following commands to install libgphoto2</p><pre>cd ~/libgphoto2<br>autoreconf --install --symlink<br>./configure<br>make<br>sudo make install</pre><h4>Install ghoto2</h4><p>Download code for gphoto2</p><pre>git clone <a href="https://github.com/gphoto/gphoto2.git">https://github.com/gphoto/gphoto2.git</a></pre><p>Build and install gphoto2</p><pre>cd ~/gphoto2<br>autoreconf --install --symlink<br>./configure<br>make<br>sudo make install</pre><p>Add the following line in /etc/ld.so.conf.d/libc.conf</p><pre>/usr/local/lib</pre><p>Refresh cache before proceeding further.</p><pre>sudo ldconfig</pre><p>Generate udev rules for the camera</p><pre>/usr/local/lib/libgphoto2/print-camera-list udev-rules version 201 group plugdev mode 0660 | sudo tee /etc/udev/rules.d/90-libgphoto2.rules</pre><p>Generate the hardware database file for udev</p><pre>/usr/local/lib/libgphoto2/print-camera-list hwdb | sudo tee /etc/udev/hwdb.d/20-gphoto.hwdb</pre><h3>Using ghoto2</h3><p>Now that we have both the libraries installed, now we can use ghoto2 for interfacing with the camera. Make sure that the camera is connected to the Raspberry Pi.</p><p>Execute the following command to see if ghoto2 can detect the camera.</p><pre>gphoto2 --auto-detect</pre><p>If your camera name shows up in the output, you can now go ahead and click a picture by executing the following command:</p><pre>gphoto2 --capture-image</pre><h3>Using Python Scripts</h3><p>Now that we have tested that the camera connection is working fine, we will go ahead and capture pictures using simple python scripts. Firstly, install the python wrapper for ghoto2</p><pre>sudo pip install -v gphoto2</pre><p>Next, create a script that will let you capture an image from the DSLR.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/68012bea0fdc6322ff585dcd73c61ab6/href">https://medium.com/media/68012bea0fdc6322ff585dcd73c61ab6/href</a></iframe><p>We first get an instance of the camera object using get_camera and then pass this instance to the capture_image function to click a picture.</p><p>That’s it for this post. Please leave a clap if you found this article useful. Consider subscribing to Medium to read more of my stories.</p><p><a href="https://maskaravivek.medium.com/membership">Join Medium with my referral link - Vivek Maskara</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfc0cf2d5e85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to install FFMPEG and FFServer on Raspberry Pi]]></title>
            <link>https://maskaravivek.medium.com/how-to-install-ffmpeg-and-ffserver-on-raspberry-pi-f820ef914975?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/f820ef914975</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ff-server]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ffmpeg]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Wed, 14 Oct 2020 08:06:01 GMT</pubDate>
            <atom:updated>2022-09-10T03:32:57.343Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*-rnDlVkXEYMVu4kS" /></figure><p>Recently while working on a project, I needed to install FFmpeg on a Raspberry Pi. I also required FFServer along with FFmpeg. There are two issues here, firstly a standard binary of FFMpeg is not available for Raspberry, and secondly, FFServer is no longer packaged along with FFmpeg. It was removed after version 3.4.</p><p>This post illustrates all the steps for installing FFmpeg and FFServer on Raspberry Pi. You can get a <a href="https://amzn.to/3jJoeLC">Raspberry Pi</a> from Amazon if you don’t already have one.</p><h3>Install prerequisites</h3><p>First, we will install the prerequisites for the FFmpeg library. Execute the commands below to install the required libraries.</p><pre>sudo apt updatesudo apt upgrade<br><br>sudo apt -y install autoconf automake build-essential cmake doxygen git graphviz imagemagick libasound2-dev libass-dev libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libfreetype6-dev libgmp-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libopus-dev librtmp-dev libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-net-dev libsdl2-ttf-dev libsnappy-dev libsoxr-dev libssh-dev libssl-dev libtool libv4l-dev libva-dev libvdpau-dev libvo-amrwbenc-dev libvorbis-dev libwebp-dev libx264-dev libx265-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-xfixes0-dev libxcb1-dev libxml2-dev lzma-dev meson nasm pkg-config python3-dev python3-pip texinfo wget yasm zlib1g-dev libdrm-dev</pre><h3>Install Add Ons</h3><p>Next, we will be installing some other add-on libraries that are required by FFmpeg. Some of these might not be required for your setup but for the sake of completeness, we will be installing all of them.</p><p>First, create a directory in which you can clone and build all these add-ons.</p><pre>mkdir ~/ffmpeg-libraries</pre><p>Next, let’s install fdk-aac</p><pre>git clone --depth 1 <a href="https://github.com/mstorsjo/fdk-aac.git">https://github.com/mstorsjo/fdk-aac.git</a> ~/ffmpeg-libraries/fdk-aac \<br>  &amp;&amp; cd ~/ffmpeg-libraries/fdk-aac \<br>  &amp;&amp; autoreconf -fiv \<br>  &amp;&amp; ./configure \<br>  &amp;&amp; make -j$(nproc) \<br>  &amp;&amp; sudo make install</pre><p>Next, let’s install dav1d</p><pre>git clone --depth 1 <a href="https://code.videolan.org/videolan/dav1d.git">https://code.videolan.org/videolan/dav1d.git</a> ~/ffmpeg-libraries/dav1d \<br>  &amp;&amp; mkdir ~/ffmpeg-libraries/dav1d/build \<br>  &amp;&amp; cd ~/ffmpeg-libraries/dav1d/build \<br>  &amp;&amp; meson .. \<br>  &amp;&amp; ninja \<br>  &amp;&amp; sudo ninja install</pre><p>Next, let’s install kvazaar</p><pre>git clone --depth 1 <a href="https://github.com/ultravideo/kvazaar.git">https://github.com/ultravideo/kvazaar.git</a> ~/ffmpeg-libraries/kvazaar \<br>  &amp;&amp; cd ~/ffmpeg-libraries/kvazaar \<br>  &amp;&amp; ./autogen.sh \<br>  &amp;&amp; ./configure \<br>  &amp;&amp; make -j$(nproc) \<br>  &amp;&amp; sudo make install</pre><p>Next, let’s install aom:</p><pre>git clone --depth 1 <a href="https://aomedia.googlesource.com/aom">https://aomedia.googlesource.com/aom</a> ~/ffmpeg-libraries/aom \<br>  &amp;&amp; mkdir ~/ffmpeg-libraries/aom/aom_build \<br>  &amp;&amp; cd ~/ffmpeg-libraries/aom/aom_build \<br>  &amp;&amp; cmake -G &quot;Unix Makefiles&quot; AOM_SRC -DENABLE_NASM=on -DPYTHON_EXECUTABLE=&quot;$(which python3)&quot; -DCMAKE_C_FLAGS=&quot;-mfpu=vfp -mfloat-abi=hard&quot; .. \<br>  &amp;&amp; sed -i &#39;s/ENABLE_NEON:BOOL=ON/ENABLE_NEON:BOOL=OFF/&#39; CMakeCache.txt \<br>  &amp;&amp; make -j$(nproc) \<br>  &amp;&amp; sudo make install</pre><p>Finally, let’s install zimg</p><pre>git clone <a href="https://github.com/sekrit-twc/zimg.git">https://github.com/sekrit-twc/zimg.git</a> ~/ffmpeg-libraries/zimg \<br>  &amp;&amp; cd ~/ffmpeg-libraries/zimg \<br>  &amp;&amp; sh autogen.sh \<br>  &amp;&amp; ./configure \<br>  &amp;&amp; make \<br>  &amp;&amp; sudo make install</pre><p>Note: I have taken all these commands from <a href="https://pimylifeup.com/compiling-ffmpeg-raspberry-pi/">this</a> blog post. The reason for writing a separate post is to have the latest post with all commands needed for both FFmpeg and FFserver.</p><p>Finally, let’s update the link cache:</p><pre>sudo ldconfig</pre><h3>Install FFmpeg</h3><p>As mentioned earlier, FFmpeg no longer bundles FFserver. As stated in <a href="https://superuser.com/questions/1296377/why-am-i-getting-an-unable-to-find-a-suitable-output-format-for-http-localho/1297419#1297419">this</a> thread, we need to check out an older version of FFmpeg to access FFserver.</p><p>Execute the following commands to clone and build ffmpeg from source.</p><pre>git clone <a href="https://git.ffmpeg.org/ffmpeg.git">https://git.ffmpeg.org/ffmpeg.git</a> ffmpeg<br>cd ffmpeg<br>git checkout 2ca65fc7b74444edd51d5803a2c1e05a801a6023<br>./configure</pre><p>Note:</p><ul><li>A pre-build library doesn’t exist for Raspberry Pi so the library needs to be built from source.</li><li>It might take <strong>2–3 hours for</strong> FFmpeg to install. So be patient.</li><li>If you are still getting command not found errors, try restarting your Pi.</li></ul><p>That’s it. Now you should have both FFmpeg and FFserver installed on your Raspberry Pi.</p><p>In my next post, I will show you how to use FFserver for streaming a live feed from a DSLR connected to the Raspberry Pi. Check out <a href="http://gphoto-software.10949.n7.nabble.com/liveview-in-EOS-cameras-tp4238p13500.html">this thread</a> if you are trying to do something similar and need help with it.</p><p>That’s it for this post. Please leave a clap if you found this article useful. Consider subscribing to Medium to read more of my stories.</p><p><a href="https://maskaravivek.medium.com/membership">Join Medium with my referral link - Vivek Maskara</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f820ef914975" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Year in Review 2019]]></title>
            <link>https://maskaravivek.medium.com/my-year-in-review-2019-add380fd793a?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/add380fd793a</guid>
            <category><![CDATA[bangalore]]></category>
            <category><![CDATA[memories]]></category>
            <category><![CDATA[year-in-review]]></category>
            <category><![CDATA[2019]]></category>
            <category><![CDATA[looking-back]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Mon, 23 Dec 2019 07:38:59 GMT</pubDate>
            <atom:updated>2019-12-23T07:38:59.880Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nYxVGMoP3MhJkWLXd6hgUA.jpeg" /><figcaption>With Zeta Folks</figcaption></figure><p>This year was quite an exciting year for me, and a lot of things kept me busy throughout the year. I traveled to several places(including six countries), quit my ~4-year-old job, got admit for Masters, and started mentoring young kids. As the year began, my primary focus was to get accepted for Masters in a university of my choice, and more or less, I managed to achieve that goal. Also, I think I have been taking better care of my health.</p><h3>Highs and Lows</h3><h4>January — March</h4><ul><li>I decided to live by myself and moved to a 2BHK apartment.</li><li>At the beginning of January, I finally recovered from my four months of prolonged, persistent low-grade fever. It felt good to be lively again.</li><li>I visited a lot of temples with my parents. We covered all the major temples in Tirupati, Rameshwaram, Kanyakumari, and Madurai.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3JiOFLbMT7-qFNUHQ-iGvQ.jpeg" /><figcaption>Trip with parents</figcaption></figure><ul><li>One after the other, I got ten straight rejections from the universities that I had applied for pursuing Masters.</li></ul><h4>April — June</h4><ul><li>Participated in the annual <a href="https://medium.com/u/6abe4b8ebcd8">Wikimedia</a> Hackathon, Prague, and worked with folks from the Wikipedia app team to hack our way through Commons app redesign.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jzPtZDN0EthLG0Vq2MUyPg.jpeg" /><figcaption><a href="https://medium.com/u/51d8599bc27e">Robin Schoenbaechler</a> presenting at the Wikimedia Hackathon, Prague (2019)</figcaption></figure><ul><li>Traveled to 5 countries, ie. The Czech Republic, Austria, Italy, Croatia, and Turkey.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HwSjuekaQmXLIBu_uvwyZg.jpeg" /><figcaption>Euro trip with friends</figcaption></figure><h4>July — September</h4><ul><li>Traveled to Coorg, Mukteshwar, and Meghalaya with office friends.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5XzroSM0piK7AzSkYG5IBQ.jpeg" /><figcaption>Mukteshwar trip</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MdLiOB_oiyXPWS0wQzK4Rg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qmGkeZdXcfHiFDLu1o6VvA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PAk4iOfGK_3Vew6XmKSfow.jpeg" /><figcaption>Meghalaya Trip</figcaption></figure><ul><li>Mentored a student for a project in <a href="https://medium.com/u/c329b6eef5c6">Wikimedia Commons</a> Android app as part of Outreachy’s summer round.</li><li>Restarted my focus on outdoor activities by beginning running and cycling regularly.</li><li>I helped in building an AR-based <a href="https://play.google.com/store/apps/details?id=com.maskaravivek.spaced">Android</a> and <a href="https://apps.apple.com/in/app/spaced/id1479808477">iOS</a> app for <a href="https://medium.com/u/ef370e3941f4">Zeta</a>’s <a href="https://design.zeta.in/bangalore-design-meetup-2019-an-expedition-into-the-fourth-dimension-61752bb31de9">design meetup</a>. We created both the apps in less than two weeks. It was my first time making an iOS app. Also, it was my first time working on Unity and React Native.</li></ul><h4>October — December</h4><ul><li>I got admit from 6 universities and finally zeroed down on Arizona State University to pursue a Masters in Computer Science.</li><li>I started mentoring a batch of 20 underprivileged kids for <a href="https://feaindia.org/">FEA India</a>.</li><li>In November, I traveled to Atlanta to attend <a href="https://medium.com/u/6abe4b8ebcd8">Wikimedia</a> Technical Conference 2019. It was my first trip to the USA.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xgGoviFhB5uNVavH9m3aAw.jpeg" /><figcaption><a href="https://medium.com/u/6abe4b8ebcd8">Wikimedia</a> Technical Conference 2019</figcaption></figure><ul><li>I quit my job at <a href="https://medium.com/u/ef370e3941f4">Zeta</a> at the end of November to get myself ready for studies.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YDiIfkBcmcJCWfAm8nxBcA.jpeg" /><figcaption>Zeta memories</figcaption></figure><ul><li>On 27th December, I got the handover of the first flat that I ever bought. It is a 3BHK apartment in <a href="https://www.sobhasiliconoasis.org.in/">Sobha Silicon Oasis</a>, Bangalore.</li></ul><h3>Takeaway</h3><p>All in all, this year was a fruitful year for me both professionally and personally. I achieved a lot of targets that I had set for myself at the beginning of the year.</p><p>Next year would be a new beginning for me in a new country with a completely new environment. I would be back to being a student, and it would be interesting to see how I tackle new challenges. Also, I am committing to understanding how the body works and will make changes to my diet and daily routine to take care of it. :)</p><p>Happy New Year 2020 ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=add380fd793a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Attempt at Making Pesto Pasta!!]]></title>
            <link>https://medium.com/bachelors-kitchen/my-first-attempt-at-making-pesto-pasta-800c150f09ab?source=rss-5862a1b8ebd5------2</link>
            <guid isPermaLink="false">https://medium.com/p/800c150f09ab</guid>
            <category><![CDATA[recipe]]></category>
            <category><![CDATA[cooking-recipes]]></category>
            <category><![CDATA[pasta-recipe]]></category>
            <category><![CDATA[cooking]]></category>
            <category><![CDATA[pasta]]></category>
            <dc:creator><![CDATA[Vivek Maskara]]></dc:creator>
            <pubDate>Tue, 17 Dec 2019 07:33:19 GMT</pubDate>
            <atom:updated>2019-12-17T07:34:12.157Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MvlcGIVt5z6xvzeX4Yyfsw.jpeg" /><figcaption>Pesto Pasta!</figcaption></figure><p>I recently tried cooking up Pesto Pasta for lunch. I have never made pasta earlier, but I wanted to try something new. Surprisingly the end product turned out to be quite satisfying thanks to <a href="https://medium.com/u/ad722731eedd">Utkarsha Bakshi</a> for her recipe.</p><p>I will walk you through the four simple steps for making a simple yet delicious pesto pasta.</p><h3>Step 1: Chop chop chop!!</h3><p>First things first, chop the veggies and keep them ready. For my recipe, I am using the following vegetables:</p><ul><li>a handful of spinach</li><li>7–8 button mushrooms</li><li>8–10 cloves of garlic</li><li>3–4 cherry tomatoes for garnishing</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UPM9b2o8V2h0WmNBSmnG3w.jpeg" /><figcaption>Spinach, Garlic, Mushroom, and Cherry tomatoes</figcaption></figure><h3>Step 2: Boil the Spaghetti</h3><p>Take a handful of spaghetti and boil it for 10–15 minutes. Check a couple of times to see it has become soft and turn the gas off once it feels soft.</p><p><strong>Note:</strong> You do not need to break the spaghetti for boiling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GS4AALDVIHsTVfxm-Z3h8g.jpeg" /></figure><h3>Step 3: Saute the veggies</h3><p>Take 2–3 spoon fulls of olive oil and heat it in a non-stick pan. Once the olive oil is heated up, add mushrooms, garlic, and spinach to it. After sauteing it for 3–4 minutes, add <strong>pesto sauce</strong> to it and saute it for another 1 minute.</p><p><strong>Note:</strong> For my recipe, I used readymade <a href="https://www.naturesbasket.co.in/Products/Basil-Pesto---Wingreens-Farms/6494_0_0_0">pesto sauce from Godrej’s Nature basket</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sm7ZIBvb-Ch_R8nNQVmimg.jpeg" /></figure><h3>Step 4: Do some Magic</h3><p>Once you have the veggies sauteed, add boiled spaghetti to it and mix the vegetables well. Stir it for a 2–3 minutes so that everything mixes well. And voila, your pasta is ready to be served.</p><p><strong>Note:</strong> If you wish, you can also add some parmesan cheese to your pasta, but I wanted to make a lighter pasta, so I didn’t use cheese or butter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HES7JLZNIcw0Xz0VPpQriA.jpeg" /></figure><h3>Step 5: Devour it</h3><p>I added some cherry tomatoes for garnishing, but it is totally up to you. Now is the time to enjoy the hard work you just did in the kitchen. So tuck it and devour every morsel.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MvlcGIVt5z6xvzeX4Yyfsw.jpeg" /></figure><p>Make sure you give this post <strong>50 claps </strong>and <strong>follow </strong>me<strong> </strong>if you enjoyed this post and want to see more!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=800c150f09ab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bachelors-kitchen/my-first-attempt-at-making-pesto-pasta-800c150f09ab">My First Attempt at Making Pesto Pasta!!</a> was originally published in <a href="https://medium.com/bachelors-kitchen">Bachelor’s Kitchen</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>