Aug 292013
 

Debian unfortunately has pv in an older version, the newest one includes a very practical “-S” option, which will stop at a certain size (which is specified by –s in bytes).

I use it to calculate checksums of SD cards (Raspberry Pi images!). Now some SD cards are larger than others, but still the same image size is written.

Fortunately, we can combine several Linux tools to still get a predictable MD5 sum of a fixed size of the input file / SD card:

pv -tprebc -B 512K -s 7742685184 /dev/sdn | head -qc 7742685184 | md5sum

pv: Pipe Viewer, will show a progress bar

  • t – turn the timer on – will show the total time pv has been running
  • p – show progress bar
  • r – turn the rate counter on – will show the data transfer rate
  • e – show estimated time of arrival
  • b – turn total byte counter on
  • c – cursor mode (do not use carriage returns). May be handy when displaying multiple pv’s on the screen?
  • B – Buffer size
  • s <bytes> – assume file is <bytes> big, when calculating the percentages and ETAs
  • S – stop after s <bytes> have been read (NOT available in the Debian version currently)

head: show only the first bytes of a file

  • q – quiet: don’t show the file name
  • c <bytes> – read <bytes> from the beginning of the file (otherwise head will assume you mean lines)

md5sum: calculate the md5sum of a file

Bonus:

du –b <filename> 

will show the size of a file in bytes

blockdev --getsize64 /dev/sdb

will show the size of /dev/sdb (for instance a USB card reader with a SD card inserted) in bytes.

Aug 272013
 

CUPS_printer

Prerequisites

ALL of the following commands will be run as root. If you are not root already, you can become root by entering “sudo su” as user pi.

Install packages

aptitude update
aptitude install avahi-daemon cups cups-pdf python-cups
  • This will update your package list, and install the packages we need
  • avahi-daemon is a free zeroconf implementation (open source Bonjour replacement)
  • CUPS = Common Unix Printing System – manages the printers for you

This command will take a while, especially after [ ok ] Starting Common Unix Printing System: cupsd. Please be patient here.

Edit /etc/cups/cupsd.conf

nano /etc/cups/cupsd.conf

Comment out the line just below “# Only listen for connections from the local machine.” with an #, and add some new lines, like this:

# Only listen for connections from the local machine.
#Listen localhost:631
#CHANGED TO LISTEN TO LOCAL LAN
Port 631
# Restrict access to the server...
<Location />
  Order allow,deny
  Allow @Local
</Location>
 
# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow @Local
</Location>
 
# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow @Local
</Location>

Leave the other lines as they are.

  • This will allow access to the CUPS web interface from other machines than your Raspberry Pi itself (on the local network)
  • We advise you to change the default “raspberry” password for the user “pi” just in case …
  • You can change the port from 631 to something else, but be sure to replace it in the instructions below!

Restart the CUPS service

service cups restart
  • This will restart the CUPS service and reload it’s configuration files

Add the user pi to the lpadmin group

This is necessary to allow you to administrate the printers through the web interface as user pi, later on:

adduser pi lpadmin

AirPrint will have to be enabled after you have added the printers.

 

Add printer(s)

CUPS actually has a very nice web-interface. It apparently has been purchased by Apple in 2007, and is being supported by that huge company and the original developer, Michael Sweet. Maybe that is one reason why it really works quite effortlessly. But, let’s begin:

Open your favorite browser, and enter “https://” + your Raspberry Pi’s IP address + “:” + the port (631 as default).

For example: https://192.168.1.11:631/

CUPS Admin interface

Your browser will most definitely warn you about a security certificate problem. Please ignore it, and continue (or do you sign certificates for your local machines?)

CUPS-interface-raspberry-pi

Hint: CUPS will show up to you in the language your browser indicates to it. Even the directive “DefaultLanguage en” in the configuration file will NOT change that. In other words, to change the language of the CUPS web interface, change your browser default language setting.

Modify CUPS Settings

Click on the Administration Tab, and check “Share printers connected to this system”. Click on “Change Settings”.

cups-administration-tab

At this point you will probably be asked to enter your credentials. If you have added the user pi to the printer management group lpadmin, as per instructions above, you can enter it’s credentials now:

credentials-required

The CUPS server is being restarted.

Connect Printer to CUPS

You can add network printers, or USB printers to CUPS.

Before continuing with the instructions, please ensure that your printer is connected to the network or via USB to the Raspberry Pi , and powered on. You do not need to restart your Raspberry – you can simply plug in your printer right now.

Add a new printer to CUPS

If you have a USB printer, click on “Find New Printers” on the Administration tab (this is called “Verfügbare Drucker auflisten” in German)

cups-find-new-printers

CUPS will take a while – and it should list all printers which it has recognized.

add-kyocera-fs3900dn-cups

Simply add the printer, in this example my trusty Kyocera FS-3900DN (I will only buy Kyocera Laser printers from now on Winking smile). My DYMO LabelWriter 450 was also recognized “out-of-the-box”.

Now simply follow the dialogues and enter sensible values:

add-printer-step-2-example

 

cups-add-printer-iii

(Note: the connection line in the screenshot will say something like “usb://…” for USB printers).

Select your Make and your Model here. A lot of printers are listed. If you don’t find yours, try to find a PPD file for it on the web: A PPD File is a “PostScript Printer Description”” File – it describes fonts, paper sizes, resolutions and other capabilites that are standard for a particular Postscript printer.

Now you will be presented with a dialogue which will have different default options to set up, according to your printer.

Here’s the one for the Kyocera FS-3900DN, for example:

kyocera-fs-3900dn-cups-default-options

Please note: these are default options. If, for instance, the paper sizes your printer supports are not listed here (as is the case for my DYMO LabelWriter 450), simply select the next “matching” one, and set it up under Windows / your Mac correctly.

Now your printer is set up, and you can continue:

Print test page

The CUPS menu “Printers” will list the available printers. By clicking on a particular printer, you can administrate it. For instance, you can print a test page from the Maintenance drop down menu:

cups-test-job

CUPS will show you the progress of the print job.

Adding network printers to CUPS

If you have a network printer, we recommend to use the “Add Printer” button instead, and setting up the printer manually.

appsocket

The CUPS manual recommends to use “HP JetDirect” as it is the most reliable protocol. This works with my Kyocera FS-3900DN.

cups-socket

In the next screen, enter your printer’s IP address, followed by the port (i.e. socket://192.168.1.21:9100 ). There are options to set up secure (encrypted) printing, but this is beyond the scope of this article.

Now you can continue as described above.

Set up AirPrint

In GitHub, there is a script which creates the AirPrint service. In the German article this one translates and elaborates, it is recommended to put it into /opt/AirPrint.

As user root (sudo su):

mkdir /opt/AirPrint
cd /opt/AirPrint
wget -O airprint-generate.py --no-check-certificate https://raw.github.com/tjfontaine/airprint-generate/master/airprint-generate.py
chmod +x airprint-generate.py
./airprint-generate.py -d /etc/avahi/services
service cups restart
service avahi-daemon restart

This will:

  • Create a new directory “/opt/AirPrint”, change into it
  • Download the airprint-generate.py script
  • make it executable
  • execute it, and modify the configuration files in the directory /etc/avahi/services (add an XML description of the new printer service)
  • restart the CUPS and avahi services

If the ./airprint-generate.py command yields an error, like “image/urf is not in mime types, [PRINTER_NAME] may not be available on ios6 (see https://github.com/tjfontaine/airprint-generate/issues/5)”, please refer to the solution in the German article (there is always Google Translate)

The printers should be available now.

 

Install printer on Windows

Open “Devices and Printers”. Click “Add a printer”. Select “Add a network, wireless or Bluetooth printer”.

image

Select “The printer that I want isn’t listed”

image 

image

Select “Select a shared printer by name”, and enter http:// + Raspberry Pi IP + :631 + /printers/ + your printer’s name (called “Queue Name” in CUPS).

For example: http://192.168.1.11:631/printers/kyo-3900

Again, this could probably be changed for encryption – but is outside the scope of this beginner’s article.

Click “Next”, and continue to install the driver. If you can’t select it from the list, try Windows Update (be patient). If that does not work, try to locate the driver on the vendor’s homepage. I had to do the latter for the DYMO LabelWriter 450.

Remember to set up sensible default settings for your new network printer. These settings will override the settings you set on CUPS – thus you CAN actually print to page formats CUPS does not know yet.

 

Add printer to Apple Mac

This Apple KB article should help you to set up your printer on your Mac. Unfortunately there’s no Mac here, when we have access to one, we will test it.

 

 

Problem solving

Can’t find a network printer

Try to add it manually, by using it’s IP address and the information we have given you in this article. If it still does not work, try changing your printer LAN server settings.

Well, what about SAMBA?

CUPS printers can be shared through SAMBA. This is additional configuration overhead, but may add the possibility for Windows machines to automatically download drivers from the Raspberry Pi. This is beyond the scope of this article.

References

Aug 212013
 

Aka how to view YouTube videos on your Raspberry Pi from Midori or Chromium!

youtube-on-the-raspberry-pi

We have pulled together some software magic and are proud to announce an easy installation procedure for PiVid, the YouTube / HTML5 Video / VeeHD Raspberry Pi video enabler:

Installation

Open a shell – for instance LXTerminal, if you are working on the Raspberry Pi desktop, it can be opened by double-clicking the LXTerminal icon – and enter the following commands:

Step I: Please add our Repository

sudo wget -O /etc/apt/sources.list.d/repository.pi3g.com.list http://repository.pi3g.com/sources.list
sudo wget -O - http://repository.pi3g.com/pubkey | sudo apt-key add -
sudo aptitude update

This will:

  • set up our repository as an additional package source on your Raspberry Pi (your main sources.list will not be modified in any way)
  • get our public key
  • fetch the available packages from our repository server

Step II: Install PiVid

sudo aptitude install pivid

This will:

  • install PiVid and dependencies (other packages which PiVid requires to work)

Please press “Enter” when asked whether you want to continue, and once again “Enter” during the installation process of the youtube-dl package, when asked to.

Step III: Activate PiVid

service pivid start

This will:

  • start the pivid service (it talks to your browser and to omxplayer to play your video)

If you want to stop the pivid service, simply use “service pivid stop” – this will save a small amount of computing resources.

Step IV: Install PiVid in your browser

Install PiVid in Midori:

To use the userscript in Midori (Raspbians default browser), you have to activate the “User addons” extension. Start Midori. Open the preferences dialog (Menu>Preferences), select the Extensions tab and tick “User addons”. (“User addons” is the very last entry, use the scroll bar to find it). Click “Close”.

Then simply open the script ( file:///usr/share/pivid/replace.user.js ) in your browser (copy & paste the link into your URL bar, and press enter) and click “Install user script” when asked.

pivid-userscript-midori

 

Install PiVid in Chromium:

To install pivid in Chromium, please open a shell in the X desktop environment (e.g. LXTerminal), and start Chromium like this:

# chromium --enable-easy-off-store-extension-install /usr/share/pivid/replace.user.js

pivid-userscript-chromium

Please click “Continue”, and then click “Add” on the “Confirm New Extension” dialogue:

click-add

Chrome will confirm, that the extension has been added.

Usage

Please note: after every reboot, you need to start the pivid service, as described above. Open LXTerminal, and (as user pi), enter:

service pivid start

You can close LXTerminal after starting the service, if you want. If the service pivid is already running, it will tell you so – you don’t need to worry about entering it twice by accident.

Starting PiVid will open a web server on your Raspberry Pi’s port 3000. This will be accessible on your local network – and can be used to control video playback (of external URLs) on the Raspberry. This is by design, and we plan to release more documentation about this soon.

YouTube

youtube-raspberry-chromium

Navigate to a YouTube video (for example: Xcylin, shooting with a frickin’ laser). First, the browsers will display “Flash Player missing”, but after some seconds, the web site should reload, and display the PiVid play button, as seen above for Chromium.

Simply click this button, and the video should launch in a short while. This will be indicated by a “pause” button:

youtube-raspberry-c-pause

If you want to see the video again, please reload the page – PiVid currently can’t identify when the video has stopped playing.  The pause button currently has no function, but you can use omxplayer keyboard control (see below).

VeeHD

VeeHD is an alternative video hosting platform / community, sporting an interesting selection of movies, documentaries, etc.

PiVid supports playback on VeeHD. You may need to log in as a VeeHD user for some videos to work, and some videos are hosted on very slow servers – where streaming is impossible with PiVid. Please download the video and play it with omxplayer instead.

Usage: Search with the VeeHD search, and click on the video you would like to see. PiVid will show you the play button after a short while:

veehd-raspberry-pi

Omxplayer keyboard control

Space or p = Pause / Resume
– / + = Decrease / Increase Volume
q = Quit

 

Problem handling

YouTube play button not showing

If the PiVid play button does not show up on a YouTube video, instead of the warning about an incompatible browser, please try to simply reload the page – it should show up now.

Restarting the service

If you run into any unexpected problems using the software, try restarting the pivid service:

service pivid restart

If this does not help, try restarting your Raspberry, and starting the service after that. If still stuck, comment below. (Use “pivid” instead of “service pivid start” to see some advanced debugging output).

update-rc.d

Please note, that update-rc.d can’t be used right now to install the service as autostart on boot – we are investigating the cause and will release an update soon. (pivid service will start, but without video playback.) Please use the manual starting method ( service pivid start ) in the meantime – thank you!

Background

PiVid works as a server (written in the uber-cool Node.JS), which will display an IFRAME in your browser. Through a user script, the browser can submit the URL needed to retrieve and play the video. Once you click on the “play” button, PiVid will invoke some software incantations (sprinkle the equivalent of magic fairy dust – we’re building on the shoulders of giants – you guys know who you are :-) – and voilà – the video location will be passed to omxplayer, the trusty workhorse of Raspberry Pi video playback!

You can, of course, fork us on GitHUB.

By the way – we have also packaged a newer version of Node.JS to go along with PiVid on our repository – package name is “nodejs”. Stay tuned for more about this.

The idea for PiVid was taken from a very similar client-server approach, which was coded in Python, but seems to be abandoned now. Thank you for the inspiration!

Reference

Aug 202013
 

Die von uns in unseren Raspberry Pi Kits gebündelten Logilink WL0084B v2.0 sind für Raspbian und Raspbmc getestet, und funktionieren “out of the box”. Wir stellen in diesem Blog-Eintrag vor, wie dieser nano WiFi Adapter und andere kompatible Adapter unter Raspbmc für das Funknetzwerk eingestellt werden können.

(Anmerkung: für den TP-Link Wireless N Nano USB Adapter TL-WN725N entwickeln wir aktuell ein Paket, mit dem dieser WLAN Stick ebenfalls unproblematisch einzusetzen sein sollte. In unserem letzten Test funktionierte dieser Stick leider nicht out-of-the box.)

Einrichten

Wir gehen hier von einer “virgin Raspbmc” Installation mit Stand 20. August 2013 aus, an der noch keine Einstellungen für das Funknetzwerk getroffen wurden.

Rufen Sie die Raspbmc Settings (unter dem Menüpunkt Programme) per Klick auf:

screenshot000

Achtung: die Raspbmc Settings benötigen zum Starten in älteren Versionen eine verbundene LAN-Netzwerkverbindung! In unserem aktuellen Test lassen sich die Settings auch ohne LAN Verbindung öffnen.

Öffnen Sie den Reiter “Network Configuration”

screenshot001

Klicken Sie mit der Maus auf die Pfeile neben Network Mode nach oben oder nach unten, um “Wireless (WiFi) Network einzustellen”

screenshot003

Scrollen Sie mit Hilfe der Leiste rechts nach unten, und stellen Sie die SSID Ihres Netzwerkes durch Klick auf die entsprechende Zeile ein:

screenshot004

Es öffnet sich ein Dialog, in dem Sie die SSID einstellen können.

Stellen Sie jetzt Ihren WiFi KEY ein durch Klick auf die entsprechende Zeile.

Bitte beachten Sie: bei einer “normalen” Raspbmc Installation ist eine englische Tastaturbelegung trotz der Sprachauswahl “Deutsch” am Anfang weiter vorhanden. Das führt dazu, dass beispielsweise “z” und “y” vertauscht sind. Falls Ihr WiFI Key solche Zeichen enthält, könnte ein Verbindungsproblem daran liegen.

Wir haben in diesem Artikel beschrieben wie Sie die Sprache für die Tastatur umstellen (Konsolenkentnisse Voraussetzung). Alternativ können Sie auch unser Movie Kit kaufen, in dem diese Voreinstellung bereits für Sie getroffen worden ist. Im Movie Kit sind neben vielen praktischen Komponenten auch MPEG-2 und VC-1 Schlüssel mit enthalten.

Passen Sie ggf. auch den WiFi Security Modus an. WPA/WPA2 sollte in modernen Netzwerken der Standard sein, und kann daher meistens unverändert bleiben.

Sobald Sie fertig sind, aktivieren Sie bitte den Radio Button “Update Now”, und drücken auf OK:

screenshot005

Das System zeigt Ihnen an, dass die Einstellungen übernommen und angewendet wurden.

Jetzt können Sie Ihr LAN Kabel abziehen (falls es noch angeschlossen ist), und die Verbindung sollte über den WiFi Adapter funktionieren. Es ist kein Neustart nötig.

IP Adresse & Fehlersuche

Im eingebauten Systeminfo Menü können Sie sich eine Übersicht über den Status von Raspbmc geben lassen, unter anderem auch die IP Adresse:

screenshot006

screenshot007

Durch Klick auf “Netzwerk” erhalten Sie weiterführende Informationen, z.B. zum aktuell verwendeten DNS Server, und ob das System eine Verbindung zum Internet hat:

screenshot008

Aug 032013
 

LibreOffice ist mittlerweile frei als Paket für Raspbian verfügbar. Die Installation geht wie bei jedem anderen Paket auch, ganz einfach so:

sudo aptitude update
sudo aptitude upgrade
sudo aptitude dist-upgrade
sudo aptitude install libreoffice

unter der Konsole (bspw. unter LXTerminal).

Man sollte sich einiges an Zeit mitnehmen, da der Prozess länger dauert (> 100 MB download, > 300 MB im installierten Zustand).

Anschließend kann man unter X-Windows die LibreOffice Suite aus dem Start-Menü unter dem Punkt “Office” ganz einfach starten. LibreOffice Writer, LibreOffice Calc, und die anderen Programme sind wie gewohnt bedienbar.

Raspberry Pi LibreOffice Edition

Wir haben eine besondere LibreOffice Edition für den Raspberry Pi entwickelt: auf dem Gehäuse des Raspberries befindet sich das LibreOffice Logo. Für jedes verkaufte LibreOffice Edition Kit spenden wir für Dich 5 € an die Document Foundation, die gemeinnützige Organisation hinter LibreOffice.

In unseren LibreOffice Edition Raspberry Pis ist LibreOffice bereits vorinstalliert – so kannst Du gleich loslegen.

Klicke bitte auf das Bild um in den Shop zu gelangen:

libreoffice-essentials-kit

Aug 022013
 

This is a work still in progress with unsatisfactory results (image quality, delay, very low frame rate), but here’s for the brave-hearted and those who are researching into the same direction:

Set up Windows streaming host

This can be a multi-monitor machine. Your left-most monitor will be streamed.

I generally use FullHD resolution for testing.

  • Install a Direct Show Screen Capture Filter for Windows. We used the direct show filter provided with “Screen Capturer Recorder” by Roger D Pack. Roger also includes an audio direct show capturer. And all free of charge – a real bargain 😉
  • Maybe a reboot is necessary here
  • Install latest version of ffmpeg from Zeranoe. Opt for the static builds (probably 64 bit if you are running a modern Windows 64 bit OS on a modern computer)
  • extract the download to a safe location
  • Open PowerShell, and navigate to the location

List the available screen filter devices:

This and all following shell commands are to be issued in the PowerShell. 

.\ffmpeg -list_devices true -f dshow -i dummy

This will show you the available input devices to capture from. My list looks like this, for instance:

 DirectShow video devices
  "Integrated Webcam"
  "screen-capture-recorder"
 DirectShow audio devices
  "Microphone (2- High Definition Audio Device)"
  "virtual-audio-capturer"

Start the stream:

.\ffmpeg -f dshow -i video="screen-capture-recorder" -vcodec libx264 -vprofile baseline -preset ultrafast -tune zerolatency  -pix_fmt yuv420p -b:v 400k -r 30  -threads 4  -fflags nobuffer -f rtp rtp://192.168.1.14:1234

I used PowerShell to start this, thus the .\ is needed in front of an application in the current folder.

  • libx264 is used as video codec, rather than mpeg4 (for superior quality – the Raspi is capable of H264 hardware decoding)
  • baseline profile needs to be used together with –pix_fmt yuv420p – this basically reduces the encoding to a simple subset of the full standard. Leaving out these two options led to the streaming not working, but you may be able to figure out something – please comment!
  • -preset ultrafast and –tune zerolatency both accelerate the video output. I have a latency of about 1 – 2 sec. in our lab here
  • -b:v 400k sets the target bitrate (as variable)
  • -r 30 this sets the framerate to 30
  • -threads 4 – give more threads to ffmpeg
  • -fflags nobuffer – should decrease latency even further. Not sure if it does, though.
  • -f rtp – specifies the output format. Here we use rtp, and stream it directly to the raspberry – which has the IP 192.168.1.14 on our network. You can choose whatever you like for the port, by an odd coincidence we chose 1234. Aliens?!?

Hit “Enter” and ffmpeg will start streaming. It will show you handy statistics – current frame number, framerate, quality, total size, total time, current bitrate, duplicated capture-frames, dropped capture-frames (i.e. the capturing rate does not align with the streaming rate). Do not worry too much about those for now.

Please note that you need some horsepower for capturing, encoding and streaming in real-time.

Set up Raspberry Pi

omxplayer can’t handle RTP streams directly – thus, we resort to GStreamer.

GStreamer 1.0 includes special support for the Raspberry Pi’s Broadcom SoC’s VideoCore IV hardware video functions (also known as OpenMax). Unfortunately, the Raspbian maintainers do not want to include it (yet), in order not to diverge too far from the official Debian repositories.

Luckily for you, though, someone has precompiled the binaries and set up a repository. See this thread for more background information, or simply follow my instructions:

sudo nano /etc/apt/sources.list

This will open nano to edit your package repository list. Please add the following line into this file:

deb http://vontaene.de/raspbian-updates/ . main

After saving the file (Ctrl + O, Ctrl + X), run the following commands:

sudo aptitude update
sudo aptitude install libgstreamer1.0-0-dbg gstreamer1.0-tools libgstreamer-plugins-base1.0-0 gstreamer1.0-plugins-good gstreamer1.0-plugins-bad-dbg gstreamer1.0-omx gstreamer1.0-alsa

This will install the necessary gstreamer1.0 & components.

Start the stream receiver & decoder chain:

gst-launch-1.0 -v udpsrc port=1234 caps='application/x-rtp,payload=(int)96,encoding-name=(string)H264' ! queue ! rtph264depay ! h264parse ! omxh264dec ! autovideosink sync=True

This can be done as user pi. Please note, that this may not be the perfect command to achieve playback, but it is a good starting point – as it works!

Gstreamer sets up “pipelines”, in which data is passed on in transformed state from step to step. While it seems to be quite a bit at the first look, it is very logical in itself, once you have figured it out.

  • we specify a UDP source (udpsrc), the port, and “caps”
  • Without the RTP caps, playback is not possible. Apparently they are not provided along with the stream? Thus, we have to specify the caps manually.
  • In the caps we specify some information for the pipeline
  • queue may be omitted, I am not sure what it does
  • rtph264depay – depayload h264 data from rtp stream
  • h264parse – parse h264 data
  • omxh264dec – decode the data with BroadCom OpenMAX hardware acceleration
  • autovideosink – put the result on the display
  • sync=True – I am not sure whether this does anything, or whether it is in the right place and form. It was an attempt to fix the gst_base_sink_is_too_late problems (but it did NOT fix them).

Issues

slow screen updates

These are very likely caused by a slow screen capture refresh rate, this may be better with a different screen capturer.

On Windows 8, with a pretty powerful Core i7 machine, I get possible fps 15.41 (negotiated for 30 fps). This is using Roger’s / betterlogic’s screen-capture-recorder. Roger claims this is due to Aero.

See more about it here  and here (also provides a list of available other directshow screen capture filters).

artifacts

Gstreamer shows massive H.264 artifacts – Matthias Bock has opened an issue for this, and some further hints.

This seems to be related to the bitrate set in FFMPEG – if I lower it to ~ 400 k, the artifacts become less distorted, and image quality is quite OK. Also, use a variable bitrate instead of a constant one.

gst_base_sink_is_too_late()

This may be related to the Pi’s fake hardware clock (?). It also appears when running gstreamer with a simple test image setup:

gst-launch-1.0 videotestsrc ! autovideosink

gstbasesink.c(2683): gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstEglGlesSink:autovideosink0-actual-sink-eglgles:
There may be a timestamping problem, or this computer is too slow.

 

The command above will display a test video image.

Sound

I have not tried sound yet. Sound shoud be input into ffmpeg using the following arguments:

-i audio="virtual-audio-capturer":video="screen-capture-recorder"

This directly from Roger’s GitHUB documentation.

Ideas

  • try to use gstreamer on Windows for streaming?
  • Adjust Parameters for betterlogic/Roger’s direct show capturer
    • apparently it hits the ceiling at 15 fps with Aero on
  • Use a different direct show capturer
  • Tune quality for ffmpeg stream

Background info

  • H.264 is MPEG-4 Part 10 or = MPEG-4 AVC – and is the more modern and data-efficient codec format (“advanced video coding”);
  • whereas MPEG-4 Part 2 = MPEG-4 Visual is based on the older image compression standards used in MPEG-2, and also implemented in DivX, Xvid, etc.
  • you can also use .\ffplay –i udp://:1234 to test the streaming output on the local machine. The video quality IS NOT TO BE USED AS A REFERENCE. It just shows, that it “works”. Change the target IP accordingly (“localhost” instead of the Raspi’s IP will do, I believe.)

References

Optimization WordPress Plugins & Solutions by W3 EDGE