Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

121 Excellent


About Mr.RC-Cam

  • Rank
    RC-Cam Mentor

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Location
  • Interests
    R/C, FPV, Embedded Programming, Electronic Design.

Recent Profile Visitors

6,982 profile views
  1. Mr.RC-Cam

    FCC Fines Some Spectrum Abusers

    Attention FPV retailers that advertise/sell to the USA, the FCC would like to remind you: https://docs.fcc.gov/public/attachments/DA-18-581A1.pdf A key passage in their advisory explains that RF compliance of our hobby is possible with a ham license: If a device is only capable of operating on frequencies that the FCC has allocated for use by amateur licensees, it does not require FCC equipment authorization, and an amateur licensee may use his or her license to operate model craft. However, many AV transmitters that purport to operate on amateur frequencies also operate on frequencies that extend beyond the designated amateur frequency bands. If an AV transmitter is capable of operating outside of the amateur frequency bands, it cannot be advertised, sold, or operated within the United States without an FCC equipment certification. Even if an AV transmitter operates solely within the amateur frequencies, the operator is required to have an amateur license to operate the device and must otherwise comply with all applicable rules. None of this is new information. Their Drone Transmitter Equipment advisory is just a reminder about the existing regulations. I think it's safe to assume that the recent HobbyKing mess has put a spotlight on our drone's RF related gear.
  2. Mr.RC-Cam

    FCC Fines Some Spectrum Abusers

    Ouch. This is going to sting: https://www.fcc.gov/document/fcc-proposes-28-million-fine-against-hobbyking-0
  3. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    And one last thing. I'm happy to report that PollyCam can be easily adapted for use on systems that use ffmpeg. Here's the details to the validation: A Raspberry PI 3 model B+ was loaded with the latest Raspian Debian 9 (Stretch) image. This OS version has ffmpeg instead of avconv. So I installed ffmpeg on it too. But before installing the PollyCam bash files I changed EVERY instance of the word avconv to ffmpeg in them. The modified files were saved in a new user directory named /home/pi/ffmpeg That's all it took and it works great. It's good to know that PollyCam is avconv and ffmpeg compatible. Enjoy!
  4. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    That's all the important details to building and running the PollyCam live stream system. Hopefully the information has been helpful. But as a bonus I have a few more comments / tips to share: Avoid Excessive Data Usage Besides sending the live stream to YouTube, I had three computers continuously showing the YouTube feed. It was fun watching our turtle and live chatting with visitors. After a few days of using the PollyCam I checked my broadband provider's site to see how much internet data our account was using. I discovered that data usage had wildly increased and was about to cost me a fortune if I didn't do something ASAP. My solution? To reduce the daily data usage I changed the RTMP bit rate and cut hours of operation. I also stopped continuously showing the live stream on the three computers. These things combined made a dramatic reduction to data usage and avoided expensive data overage penalty fees. Reduce Bit Rate Reducing the RTMP bit rate will affect image quality. But many viewers are watching a small screen (smart phone or tablet) so they will rarely notice the lower resolution. This is an easy adjustment. I ran pollycam_stop and terminated the stream. Then I edited the pollycam_start file and changed maxrate to 1000k (was 2000k). I also changed bufsize to 2000k (was 4000k). Then I ran pollycam_launch to restart the stream. No changes were made to the Foscam camera settings. Schedule Hours of Operation Instead of streaming 24 hrs a day I setup cron jobs to start and stop the stream so it only ran from 6AM to 8PM (daylight hours). As follows: Begin by copying a new bash file to the RPI's /home/pi/avconv directory: pollycam_reboot Next, edit the system's cron file by entering this command: sudo crontab -e In the file find this line at the bottom: # m h dom mon dow command And append / change as follows: # m h dom mon dow command 0 20 * * * /bin/bash /home/pi/avconv/pollycam_stop >> /home/pi/avconv/cron.log 2>&1 0 06 * * * /bin/bash /home/pi/avconv/pollycam_launch >> /home/pi/avconv/cron.log 2>&1 @reboot /bin/bash /home/pi/avconv/pollycam_reboot >> /home/pi/avconv/cron.log 2>&1 Save the cron file. It is a special "temporary" cached file that will be automatically applied to the system cron job scheduler. Two of the jobs will be run at the specified time of day. The third cron job is handled by pollycam_reboot and it is run during system reboot; Please view the file to understand what it does. BTW, each executed cron job will add a timestamp to the text based cron.log file. The log is useful for troubleshooting cron problems.
  5. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    The two main Live Stream scripts to use are: pollycam_stop: Terminates ALL PollyCam Youtube Live Stream processes that may be running. Run this script to turn off live streaming whenever you are done broadcasting. Also, always run this script BEFORE making any changes to the other PollyCam scripts. pollycam_launch: This is the main script that launches PollyCam streaming for unattended operation. It runs as a background process. You may exit the terminal command shell window (live streaming processes will continue to run without the terminal window). The sub-scripts used by the main pollycam_launch processes are: pollycam_run: This is a sub-script that is called by pollycam_launch. Its purpose is to restart the avconv process whenever the RTSP connection is lost due to random broadband data throttling, camera WiFi signal loss, or just about anything else that interferes with the YouTube video stream connection. For useful debugging messages this script can be executed on its own. Note: run pollycam_stop BEFORE using pollycam_run. pollycam_start: This is a sub-script that is called by pollycam_run. It starts the PollyCam Youtube Live Service using avconv. Runs as background process. BE SURE TO EDIT THE FILE AND ENTER YOUR FOSCAM CAMERA AND YOUTUBE LIVESTREAM PARAMETERS. The utility scripts are: cpu_status: Displays CPU temperature and CPU throttle state that is reported by raspian's vcgencmd function. Useful for determining if the RPI3's power supply has intermittent voltage sag problems or if the CPU cooling is adequate. This is especially critical when streaming due to the video encoder's high process loading. I suggest that you periodically run the cpu_status script while pollycam_launch is running to monitor your CPU's health. Note: CPU Throttle status data should always be 0x0, otherwise you have under-voltage or over-heating problem (and video streaming will not be reliable). Details to the vcgencmd throttle value is found here: https://goo.gl/Dg1U2V cpu_temp: Displays CPU temperature only.
  6. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    Several bash script files have been created to assist PollyCam's video stream process. They will be stored in the default pi user home directory. The full path we will use is /home/pi/avconv. Note: If you operate under a different user ID then please revise the home directory path (to suit your user name) and edit the bash files so that the paths referenced in them are accurate. Please be aware that the bash files are unix text formatted (linefeeds only, without carriage returns). Any future edits to them MUST use Unix style formatting. The Raspian "nano" editor is a typical choice for this. I use notepad++ with Edit->EOL Conversion set to Unix(LF). Begin by creating the avconv directory: mkdir /home/pi/avconv Using your preferred method, copy the following bash script files to the /home/avconv directory: cpu_status: cpu_status cpu_temp: cpu_temp pollycam_launch: pollycam_launch pollycam_run: pollycam_run pollycam_start: pollycam_start pollycam_stop: pollycam_stop Use the chmod command to allow command execution of the bash files: chmod 755 /home/pi/avconv/* The bash files are now ready for use. As a test, run the cpu_temp program (display CPU temperature) and confirm it works. You must include the full path when you run it, as follows: /home/pi/avconv/cpu_temp After you see it working you can end the program with CTRL-Z.
  7. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    All the necessary pieces to creating your YouTube Live Stream are now in place. It's time to stream! Here's the avconv command for running the live stream video encoder on your Raspberry Pi3 (RPI3): avconv -rtsp_transport tcp -y -i rtsp://FOSCAM_USERNAME:FOSCAM_PASSWORD@FOSCAM_IP:FOSCAM_PORT/videoMain -vcodec libx264 -preset veryfast -maxrate 2000k -bufsize 4000k -vf "format=yuv420p" -g 10 -acodec libmp3lame -b:a 128k -ar 44100 -f flv -s 1280x720 YOUTUBE_SERVER_URL/YOUTUBE_STREAM_NAMEKEY But before you use the avconv command you must substitute the values for the following parameters: FOSCAM_USERNAME: The admin login name for your Foscam camera. FOSCAM_PASSWORD: The admin password. FOSCAM_IP: The local IP to your camera. FOSCAM_PORT: The port number to your camera (default is 88). YOUTUBE_SERVER_URL: The server URL value provided by your Live Stream account. YOUTUBE_STREAM_NAMEKEY: The stream name/key value provided by your Live Stream account. Type the avconv command (with your specific camera and YouTube parameters) into your RPI3 and press Enter. Within 30 seconds the camera's real-time video should appear on your YouTube Live Stream web page. Congratulations, you're now broadcasting live video on your YouTube channel! Since your live stream system is now up & running this could be the place where we go our separate ways. However, I encountered some unexpected streaming problems that will probably haunt you too. For example, broadband slowdowns (data throttling) may cause YouTube to terminate the current live stream connection and require you to restart it. Or maybe your broadband internet account has limited data usage allocations and live streaming is quickly eating it up. Or perhaps you're running your RPI3 in headless mode and you don't want a full time ftp connection to the RPI3. These situations can be solved with some custom bash script files. I'll share the scripts I wrote in case they help you too.
  8. Mr.RC-Cam

    Analog HD FPV Video. Why Not?

    Yes, one of the challenges is to find a low cost AHD1.0 to HDMI scaler with minimal added latency and friendly behavior with weak or missing FPV signals (no "blue" screen, shows snow, fast video re-sync recovery).
  9. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    It's time to setup your YouTube live streaming channel. If you're not currently a registered YouTube user then don't worry. All you need is a Google or Gmail account to access YouTube's free video hosting. Instructions for setting up your YouTube Live Stream are posted here: https://support.google.com/youtube/answer/2474026?hl=en In case it helps, here's a random video I found on YouTube that explains how to set it up. Keep in mind that I don't use the Live Stream Events feature that is discussed in the video. For PollyCam the Stream Now section is all that needs to be configured. When you have completed setting it up you'll be provided a Server URL and Stream Name/Key (found in the Encoder Setup area of your Stream Now page). These are private text strings (do NOT share them). They are used to configure the RPI3's avcon program, so feel free to copy them into a text file for easy retrieval.
  10. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    Before we can finish up the RPI3 installation the WiFi camera has to be configured. As mentioned, I am using a Foscam FI9900P. So all my camera setup instructions will be specific to it. Because the camera will be connected by WiFi I installed its smart phone app (free download from Foscam/Google Play). The nice thing about this app is that it uses a P2P function so that you can scan the QR code (on the camera's printed label) to setup the WiFi connection. You will be prompted to assign a user name and password. The built-in WiFi scanner function will find your router so your can enter its SSID password. Complete the camera's WiFi setup before proceeding. At this point your camera is connected to your local network via a WiFi router. Using your PC's browser (Windows or MAC), go to the Foscam site and download the Equipment Search Tool program. Run the tool and record the camera's IP address:port and 12-digit MAC ID. As an alternative to the Foscam tool you can also find the IP/MAC by accessing your router's DHCP Client table. Or use your favorite method to determine the IP and MAC of a new WiFi device. BTW, the Foscam camera's default port number is 88. The camera supports direct access from a web browser. Internet Explorer is best, but you can use others. So launch your favorite browser and enter the camera's IP address and port number (IP:port) as the URL. The URL will look something like this (but revise it to match your values): Install the Web Component add-on when prompted by your browser; Your browser needs it to access the camera. At this point your browser should be able to access your camera's live view and its settings page. Click the Settings Page tab and choose the Video->Video Settings configuration screen. Use the Stream Type pulldown and choose the User-Defined entry. Change it to 720P resolution, 2M bit rate, 10 Frames, 30 Key Frames, VBR rate control. Click Save. See screenshot below: Now click the Live Video tab and choose Outdoor Mode, User-defined Stream, WDR On, NAA Off. The live video image is now configured for 720P video that will be used by your YouTube Live channel. See Screenshot below: Now is a good time to access your router's administration function and reserve the DHCP IP address (create static IP) for the camera. Why do this? Configuring your router so that the camera uses a static local IP will ensure that the IP assignment does not change if the router is rebooted. It's not mandatory, but no doubt will reduce future frustrations. There's a bit more to do, so don't relax yet.
  11. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    Now that the RPI3 has an operating system it's time to install the video encoder software. As mentioned earlier, my RPI3 OS is Debian 8 (Jessie). It directly supports the encoder called "avconv" that is distributed in the apt-get package called libav-tools (libav is a fork of FFmpeg). The avconv (libav-tools) encoder must be downloaded and installed. My RPI3 is headless (without keyboard & monitor) so I use the PuTTY program on my WIN10 desktop PC to do this. But if you're not interested in trying out PuTTY then attach a keyboard and HDMI monitor and use them to access the RPI's command line (built-in console terminal). To install libav-tools, enter the following text on the RPI3's command line: apt-get install libav-tools Then hit Enter and wait a few minutes for the entire file package to download, unpack, and install. All the hard stuff is out of the way. We're not done yet, but congratulations on getting this far.
  12. Sounds like a keypad issue. I suggest you read all the prior posts concerning Keypad problems.
  13. It's not a built-in attenuator; That value is the coupling coefficient. The spec indicates how much of the sampled power is applied to the directional coupler's "coupling" port. Seems suspicious to me; I suspect you have the coupler incorrectly installed. If the labels on it are accurate, during VSWR measurements the -16dB port would be connected to the power meter. In case it helps, see my VSWR photos posted here: https://www.rc-cam.com/forum/index.php?/topic/4139-diy-rf-power-vswr-meter-low-cost/&do=findComment&comment=29015
  14. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    A micro SD memory card is needed for the RPI3's operating system. My experience with running RPI (Raspberry Pi) based systems has taught me to avoid regular SD cards. For reliability I've switched to "high endurance" rated cards. My go-to choice at the moment is the Transcend 16GB TS16GUSDHC10V. The SD Card needs the Raspian operating system. As I mentioned earlier, I am using an existing RPI3 that has been running my home automation system. It was built a couple years ago and has a Raspian OS that is based on Debian 8 ("Jessie"). There are newer OS versions available for download (all at no cost) that are slightly different. For example, the latest version is Debian 9 ("Stretch"). The Raspian OS version will make a difference. For example, RTSP to RTMP encoding is usually done with a program called ffmpeg. It's available on some Raspian releases. But my Debian 8 OS was released with an alternate encoder called avconv, so that is what I used in this project. The two programs (ffmpeg & avconv) are said to be identical but I found that there are some nuances that can get in the way. If you are attempting to duplicate this project, and want to avoid unexpected frustrations, then install Raspbian Debian 8 (because it supports the avconv encoder that is used by PollyCam). There's no need for me to explain how to install Raspian on the SD card. It's well documented online, plus YouTube is full of helpful videos. After you have installed the OS, and setup the wired Ethernet connection, you can go "headless" by removing the keyboard and monitor. In their place I use two programs (to remotely access the RPI3) called WinSCP and PuTTY on a Windows PC. It's a very clever way to reduce the hardware clutter.
  15. Mr.RC-Cam

    YouTube Live Stream :: Turtle Camera

    There's a number of ways to connect your personal camera to YouTube Live. A typical installation uses a USB webcam attached to a computer running some encoding software. But my camera is installed outdoors in a weather exposed area near the pond. So I needed a weatherproof WiFi IP security camera that would communicate to a remotely mounted computer installed inside my house. There are plenty of outdoor security cameras to choose from which can make selecting one a daunting task. I took a chance on a low cost ($80 US) Chinese brand. The camera is a Foscam FI9900P that is rated for 1080P resolution. I'm using its 720p resolution mode and the image quality is nice; The 720p bandwidth requirements are an acceptable match for my encoding hardware and broadband connection. The Foscam camera supports RTSP (Real Time Streaming Protocol) over its WiFi connection. But YouTube Live needs RTMP encoding (Real-Time Messaging Protocol). So this created a square peg and round hole conundrum. Fortunately a $40 US computer module and some free software provides the necessary transcoding that converts RTSP to RTMP. The computer I'm using is a RaspBerry PI 3 (RPI3) Model B. I already have two of these handing my VoIP phone system (freepbx) and home automation (openhabian). Rather than add another RPI3 dedicated for the video encoding task, I installed the encoding software on my home automation RPI3. It was a risky decision because the video encoding task consumes a lot of CPU resources. With video encoding and home automation running the CPU loading can vary (depending on amount of motion in the video image) from 50% to 90% utilization. Because of the demands on CPU processing the RPI3's temperature can get quite hot, so a heatsink/fan kit is necessary. Plus operating current is greater than a typical RPI3 installation, so a high current power supply is necessary. I purchased a $17 case / accessory kit that had all these items in it. I should mention that a dedicated RPI3 for YouTube streaming is perhaps a better way to go. I have plans to do that when time permits. But so far running the video encoder and home automation on the same RPI3 is working OK, so I'm in no hurry to upgrade it. I appreciate the RPI3's low cost and tiny size. I use them in headless mode, which means I don't install a keyboard or monitor. So the overall footprint is not much larger than a deck of cards. It has built-in Wi-Fi too, but to ensure reliable connectivity it is wired with a CAT5 cable to a Ethernet hub that is plugged into a 2.4GHz WiFi router. The router, hub, and RPI3 are shelf mounted in a coat closet inside the house. It's about 150 feet to the wireless IP camera that is hiding in a "birdhouse" above our backyard pond.