Installing pure-ftpd on Mac os x El- Capitan

As i would like to turn an Macbook OS El-Capitain as a ftp server for media exchange on my network with pure-ftpd

Replacing the build in ftp Server from OSX 10.11 with a more powerful pure-ftpd
There are many how-to for Linux user but rarely none for Mac user. The build in ftp use the System users to login in there respective home place . We want independent ftp user on a other drive for ftp use.  These is more a Log-blog on a long path of fails.

Since El Captain have his own Ftp Server we must disable it to not get in conflict with pure-ftpd

Deactivate Standard FTP-Server
sudo launchctl unload -w /System/Library/LaunchDaemons/ftp.plist


brew install pure-ftpd
brew services start pure-ftpd
sudo /usr/local/sbin/pure-ftpd

Setup ftp client to connect to ftp server on local:

brew install tnftp

Configure

/usr/local/etc/pure-ftpd.conf

After installing the Server and setting up the pure-ftpd.config i was on a hunt for some GUI Admin interface to manage the ftp user. A Solution not to old that run on these system .
Very good looks the webadmin Interface , with that you can

Make Folders for our FTP Server

mkdir   /Volumes/www/FTPshare

chmod 777   /Volumes/www/FTPshare

How to setup virtual user for ftp and group

We create a new User ftpuser and a new group ftpgroup where we add our user ftpuser

sudo dscl . -create /Users/ftpuser
sudo dscl . -create /Users/ftpuser UserShell /bin/bash
sudo dscl . -create /Users/ftpuser RealName "FTP User"
sudo dscl . -create /Users/ftpuser UniqueID "1001"
sudo dscl . -create /Users/ftpuser PrimaryGroupID 20
sudo dscl . -create /Users/ftpuser NFSHomeDirectory /Users/ftpuser
sudo dscl . -passwd /Users/ftpuser mypassword

dscl . -append /Groups/ftpgroup GroupMembership ftpuser

Dont forget to reboot to see the user in your OSx user setting to take effect

We user pure-DB for the first user Managment

PureDB user database (see README.Virtual-Users

# uncomment in pure-ftp.cpnfig following line

PureDB             /etc/pureftpd.pdb

Make db: sudo pure-pw mkdb

Restart ftp server sudo brew services restart pure-ftpd

How to change pure-ftpd user directory path?

pure-pw usermod ftpuser -d /home/ftpuser
pure-pw mkdb
Pure-PW : Manual

Get User info sudo pure-pw show ftpuser

To find a user’s UID or GID in OSX, use the id command. To find a specific user’s UID, at the terminal prompt, enter:

id -u username

Replace username with the appropriate user’s username. To find a user’s GID, at the Unix prompt, enter:

id -g username

If you wish to find out all the groups a user belongs to, instead enter:

id -G username

If you wish to see the UID and all groups associated with a user, enter id without any options, as follows:

id username

User manager for PureFTPd

A Nice Gui Web Interface for PureFTPd  from 2017 you can find here  Github 

 

Typical Problems that can occur

Permission Errors

550 Could not delete test.jpg: Permission denied

FTP  Connection Errors

550

553

Sharing & Permissions always “fetching…”?

That generally means there is an Access Control List (ACL) or POSIX permission set for a user that doesn’t exist on that system. The UID doesn’t match any of the users. Custom permissions means you have ACLs set for that item.

How to Fix Content Wider Than Screen Issue

Sometimes a singel page ends up to be bigger than the Screen. Google will penalty that kind of pages as not mobile friendly and from the user site its a glitsch to that result in a bad experience.
These kind of page bigger than screen can happen if you change content or a client extend an existing site-on longer pages it can be a hasle to find the ement that hang over the page boarder.
Here a little neet CSS that helps to identify the block or element in seconds. Just add one of the lines in the developer console on the page

body { margin: 30px; }
/* Optional: Add some margin to the body to add space and
see where your offending elements cross the line */

body * { border: 1px solid red; }
/* add a border to all other elements on the page */

body * { outline: 1px solid red; }
/* Alternate: add an outline to all elements on the page. Won’t effect box model */

Github Cheat List -Git CheatSheets – Help with gitignore

Some useful commands for newbie and pro  GitHub User , below a collection i will update regularly .

Using the Github Desktop is fine but many tasks can only be done with the Terminal , as a infrequent user you can easily forget the command Strings you need.

Find big files and add them to the .gitignore file

Find files local that are bigger than 100 MB and ads them to the git ignore
find . -size +100MB | cat >> .gitignore

Remove .DS_Store from your repo  and add a global .gitignore so never need to add this rule again

Find all .DS_Store locally in any subfolder and delete it

find . -name ".DS_Store" -delete

 

For new projects Add following to gitignore
**/.DS_Store

Remove from git only .DS_Store in root only !

 git rm --cached .DS_Store

But probably there are more in subfolders. First find all .DS_Store in your local project and delete them

find . -name .DS_Store -print0 | xargs -0 git rm --ignore-unmatch

Then create a .gitignore_global file with filters .DS_Store and _.DS_Store config git


echo ".DS_Store" >> ~/.gitignore_global
echo "._.DS_Store" >> ~/.gitignore_global
echo "**/.DS_Store" >> ~/.gitignore_global
echo "**/._.DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global

Änderungen überprüfen und eine Commit-Transaktion

git status

#Entferne Files und Folder vom Repro


#Entferne ein Files
git rm --cached meinpasswort.txt

# Entferne einen Ordner

git rm --cached -rf meinOrdner 

Wegen einer großen Datei, die bereits gelöscht ist, kann ich nicht mehr auf GitHub pushen
Um die History wieder zu bereinigen geht man wie folgt vor
git status 

Danach sollte das Terminal so eine aehnliche Nachricht zurueckgeben

On branch master
Your branch is ahead of 'origin/master' by 21 commits.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean

Der Wichtige Teil sind die "21 commits" Von hier an fuehren wir das Naechste Commando aus

git reset HEAD~

An unserem Beispiel haben wir 21

git reset HEAD~21

Nach dem Ausfuehren sollte GIT Antworten mit

On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean

Von hier an ist es einfach die zu Grossen Files loeschen oder in gitignore hinzufuegen mit dem Oben erwaehnten Commando. Nun koennen wir wieder frisch Commiten ohne arbeit zu verlieren.

 

How to batch convert all Video files to webm with ffmpeg

The task was quite easy to convert a bunch of video files in a Folder to webm format .

There are several free so called free software who announce to do that but most are bumpy and even my so loved miro convertor produce a webm files that don’t play in google chrome . the ffmpeg package inside was outdated.

First check if you have ffmpeg installed on your mac , open the terminal and enter

 

ffmpeg -v 

to  get the version or

wich ffmpeg  

to get the path where its installed

SINGEL WEBM CONVERT WITH FFMPEG

To Convert a single mp4 video file we start with this ffmpeg command


ffmpeg -i myvideofile.mp4 -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 myvideofile.webm

Markup : ffmpeg  -i INPUT File  Use acodec Libvorbis AC QMAX : qmax and qmin are the ‘quality-ranges’ in which you define to encode.  Expect  that higher the values the lower the quality.

qmin 50 an qmax 51 gives the lowest quality

qmin 0 -qmax 1 gives the highest quality

If we need aditional mp4 files from our quiteime mov file we can use this ffmpeg command. The command line can alos replaced in our batch file below .

ffmpeg -i myvideofile.mov -qscale 0 myvideofile.mp4

WEBM BATCH SCRIPT

Since we have several quicktime mov video files we write a little bash script to to automate this .


#!/bin/bash
for i in *.mov;
do name=`echo $i | cut -d'.' -f1`;
echo $name;
ffmpeg -i "$i" -acodec libvorbis -aq 5 -ac 2 -qmax 25 -threads 2 "${name}.webm";
done

Edit this file with any text editor or code editor like sublime Text . Save it in the folder where your videos are in my case saved as

webmconvert 

Now we need to chmod the file to make it executable

CHMOD 700  webmconvert 

Thats it the basch script takes every video from the folder and convert it to a webml video that plays nice in your HTML5 video player .

Now start the bash script with

./webmconvert 

The first line #!/bin/bash tells the terminal that we are using bash shell,  we loop all files with ending mov output echo the name and save it with the same name as webm.

Install Node on OSX El Capitan for beginner

Problems when installing Node on OSX with brews, the default node path on OSX. For some reason my node modules where all installed in /Users//.npm_packages and Node Modules end up here 

 /Users//.npm_packages/lib/.node_modules

This result in a lot of errors when i try to install JS-Minify for Sublime Text. special if i install modules Globally. 

This is a BlogLog post to reproduce the path if sometime a similar Error occurs in my node environment. At the end you find the stackoverflow links who helped to solve most problems

Installing node through Homebrew can cause problems with npm for globally installed packages. .
$ rm -rf /usr/local/lib/node_modules $ brew uninstall node $ brew install node --without-npm $ echo prefix=~/.npm-packages >> ~/.npmrc $ curl -L https://www.npmjs.com/install.sh | sh </code></p> <p>to the new npm to  PATH environment variable <code class="prettyprint">$ export PATH="$HOME/.npm-packages/bin:$PATH"</code></p> <p>To make the new Path permanent we add it to our .bash_profile add following line <code> #NODE GLOBAL PATH PATH=$HOME/.npm-packages/bin:$PATH </code></p> <p>Reload the bash in Terminal</p> <p><code>source ~/.bash_profile</code></p> <p>Check PATH <code>$ echo $PATH</code></p> <p>Edit $PATH</p> <p><span>vi $HOME/.bash_profile</span></p> <h2>NODE Commands:</h2> <p><code>$ npm config get prefix</code></p> <p><strong><em>Show Version</em></strong></p> <p>$ npm -v</p> <p><strong><em>Show node Version</em></strong></p> <p><span>$ node –version </span></p> <p><em><strong>Get Path where NPM is installed</strong></em></p> <pre class="lang-js prettyprint prettyprinted"><code><span class="pln">$ npm config </span><span class="kwd">get</span><span class="pln"> prefix</span></code>

Set the nvm default Dir DONT use Sudo

$ npm config set prefix /usr/local

List Global NPM Packages
$ npm list -g

Will show the global installation root regardless of current working directory.

npm root -g</code><span> </span></p> <h4 class="gh-header-title instapaper_title">Complete Remove NODE.JS</h4> <pre class="lang-bash prettyprint prettyprinted"><code><span class="pln">brew uninstall node</span><span class="pun">;</span><span class="pln"> </span><span class="com"># or `brew uninstall --force node` which removes all versions</span><span class="pln"> brew prune</span><span class="pun">;</span><span class="pln"> rm </span><span class="pun">-</span><span class="pln">f </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/</span><span class="pln">npm </span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="kwd">local</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">dtrace</span><span class="pun">/</span><span class="pln">node</span><span class="pun">.</span><span class="pln">d</span><span class="pun">;</span><span class="pln"> rm </span><span class="pun">-</span><span class="pln">rf </span><span class="pun">~/.</span><span class="pln">npm</span><span class="pun">;</span></code>

Reinstall  NODE.JS

brew install node;
which node # => /usr/local/bin/node
export NODE_PATH='/usr/local/lib/node_modules' # <--- add this ~/.bashrc

Get Node info regarding your node installs

brew info node

Temporary show hidden Files

defaults write com.apple.finder AppleShowAllFiles TRUE

killall Finder

and at the end set back to hide the files again

defaults write com.apple.finder AppleShowAllFiles FALSE

killall Finder

Installing global node modules

Installing Node MAC Linux Nodeschool 

Complete Unistall & reinstall Node  

Install Minify for Sublime Text 

 

Source : DAnHerbert GIST

Trello to WordPress Plugin

Try to debug the Trello 2 WordPress Plugin , a wonderful idea but sadly the Plugin is not updated or supported by the developer now for quite a time .

Why is the concept of using a Trello board to edit & rearrange content on your website sweet ? Trello offers a very intuitive drag and drop style card system with a json api . This way we can reorganise content by simply dragging it from one place to a other we can assign multiple user to the board as editor , no WordPress skills or admin Editor rights are needed.

What the Plugin supports : Trello List and  Cards

Shortcut Parameter : ID , type , link

 

How to find the Trello Board ID

To get temporary get the plugin work on the front end
If your Board have a link like

https://trello.com/b/mOu3B0ce/web-developer
just add “.json” at the end it will show a json file with a section for the id
the url will now look like
https://trello.com/b/mOu3B0ce/web-developer.json

What works : The authentication with your Trello account. REndering of your trello content with minimal styles – here is some work to do to make it realy sweet

What don’t works : The Selection of a Trello Card or Board ID in the admin section .

Trello API : Reffernce https://developers.trello.com/advanced-reference/board

Solution : Was to simple to believe , after a lot of code change and Trello APi Responds later . You need a Organization in your trello Board. as my Board was Private only the Plug don’t work in this mode and fail to update the Trello Ids in the admin screen .

Now its time to make something beautiful out of the simple links .

 

  • Saved Facebook Posts from Treallo
  • Recommended Twitter Follower from Trello
  •  Team Post Planing from Trello with WP Front end
  • Google Material Cards from trello
  • Dynamic Member User List Sortable from Trello
  • Idea Board
  • ect

 

Test Cards from Trello embedded with the shortlink

BOARDS

Thu, Jan 01. 12:00 AM

To Do

By Code Cowboy Thu, Jan 01. 12:00 AM

Thu, Jan 01. 12:00 AM

MARKETING-BIZZ

By Code Cowboy Thu, Jan 01. 12:00 AM

Thu, Jan 01. 12:00 AM

Doing

By Code Cowboy Thu, Jan 01. 12:00 AM

Thu, Jan 01. 12:00 AM

Done

By Code Cowboy Thu, Jan 01. 12:00 AM

Thu, Jan 01. 12:00 AM

DESCRIPTION TXT

By Code Cowboy Thu, Jan 01. 12:00 AM

Thu, Jan 01. 12:00 AM

RESOURCES

By Code Cowboy Thu, Jan 01. 12:00 AM

Thu, Jan 01. 12:00 AM

IDEAS PLUS

By Code Cowboy Thu, Jan 01. 12:00 AM

Thu, Jan 01. 12:00 AM

InstaApps

By Code Cowboy Thu, Jan 01. 12:00 AM

MLT Shotcust Video Stream to Facebook and Youtube

Just a shoot note about video streaming with a Video Editor and MLT Framework. Why a Video Editor for

Why a Video Editor for streaming ?

On the fly dynamic re-editing or adding content to the Video based on the interaction of the user with a simple user interface of a Video Editor.

The Editor  Shotcuts backend is based on MLT a highly aktive edeveloped Video Framework . Shotcut can be easy intergrated into  a CasparCG workflow. Supported stream format

  • Network stream playback (HTTP, HLS, RTMP, RTSP, MMS, UDP)

 

 

There is a command line for streaming to Youtube :

melt -verbose -profile square_ntsc_wide ~/Videos/tears_of_steel_1080p.mov -repeat 999 -filter crop center=1 -consumer avformat:rtmp://a.rtmp.youtube.com/live2/secret properties=x264-medium-main f=flv r=24 g=48 bf=0 refs=1 frequency=44100 real_time=1 vb=1000k ab=128k

Result: https://www.youtube.com/watch?v=nadu0EcA2dE

 

Ref: https://plus.google.com/+MltframeworkOrg/posts/iBu4DKNT6J4

 

Posted in

VLC Screen Capture and Streaming with ffmpeg to Facebook

Work path for Mac Screen recording with VLC  screen recording per command line to a Social Platform via FFmpeg. The task: I’m looking for is to capture the screen with VLC Command line and stream the result with FFmpeg as video RTSP live stream to Facebook youtube or any other Platform without the need of additional expensive or complicated software. Some Examples can be found for Linux but not so much for MAC, it should work for El Capitan. This is mostly a work log . Here I will document what worked for me and what problems occur. Later on allow those snippets to create a bash script to auto stream on an interval to facebook for example a Birdsnest, Weather camera, or any IPTV Camera . Even some simple  Video Effect Switcher like CAmTwist can be used to stream and manage video sources for the Facebook Lifestream.

The idea behind is that sometimes you need to stream some short piece of video where a full Stream software like Wirecast or OBS is an Overkill . One core reason Live stream is very CPU process intensive the less additional software you run the more you have to process and stream your Video.It makes streaming with the desktop so simple once the procedure is ready.

Video Screen Recording on mac

Full-Screen Recording as Mp4

vlc screen:// -I rc --screen-fps 25 ":sout=#transcode{vcodec=h264}:std{access=file,dst=metaoutput.mp4"}

With Cropped Mac Screen Video Capture

We use a minimum screen-top of 50 to hide the chromee browserr navigation and some mac offset
vlc screen:// -I rc --screen-fps 25 --screen-index 1 --screen-width 500 --screen-height 500 --screen-top 50 --screen-left 0  ":sout=#transcode{vcodec=h264}:std{access=file,dst=metaCropout3.mp4"}

This will add the Recording into the virtual playlist Que of our VLC CLI , to start capturing we need the command play  and quit to stop the stream .

VLC CLI Parameter

To limit the area being captured we add parameter to the screen
Video crop (right,left,top,bottom) Number of pixels to crop at the right of the video.

--screen-index 1 --screen-width 500 --screen-height 500 --screen-top 95 --screen-left 0
One example we will capture a screen at 25 fps – cropping 500 x 500 the top, left ZERO , a window at the top left of our screen where we can place what we whant to show without the Chrome & mac window boarders.
The output video is encoded into mp4 video as file “metaout.mp4” into the same dir you CD in the Terminal .

vlc screen:// -I rc --screen-fps 25 --screen-index 1 --screen-width 500 --screen-height 500 --screen-top 95 --screen-left 0 ":sout=#transcode{vcodec=h264}:std{access=file,dst=metaout.mp4"}

FFMpeg live Stream to Facebook Live with Terminal

Here are some snippets to live stream your previous screen recording to Facebook .

FFmpeg Stream to Facebook Live


ffmpeg -re -i metaout.mp4 -acodec libmp3lame -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 426x240 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/XXXXXXXXXX?ds=1&s_l=1&a=XXXXXXXXXXXX"

Lets change the Input source we would like to stream the desktop instead for that we use the little Free Tool called Camtwist
Avfoundation show us all available input sources
OSX ffmpeg -f avfoundation -list_devices true -i ""
WIN ffmpeg -y -f vfwcap -i list

This example will produce framerate not supported
ffmpeg -f avfoundation -i "CamTwist" ffmpegout.mpg

Facebook Life Stream from Camtwist (experimental )
ffmpeg -f avfoundation -r 30 -i "CamTwist" -pix_fmt yuv420p -profile:v baseline -s 320x240 -bufsize 2048k -vb 400k -maxrate 800k -deinterlace -vcodec libx264 -x264opts "keyint=48:min-keyint=48:no-scenecut" -preset ultrafast -r 30 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/11111111111111111=1&a=2222222222222222"
-f avfoundation -r 30 -i “CamTwist”     Input source the CamTwist Virtual Camera must fit . 

-pix_fmt yuv420p            Pixel Format of the input source this will fall back if not suported

-profile:v baseline -s 320×240 -bufsize 2048k -vb 400k -maxrate 800k -deinterlace     We chose a Low Profile and smal size for testing 320×240 Set this in ther Camtwist settings 

-vcodec libx264      Video Codec 

-x264opts “keyint=48:min-keyint=48:no-scenecut”     Producer Keyframes every 2 second  g- ist not related for RTMP

 

Looping FFmpeg Stream for Facebook Live
for streams like the endless stream option we would like to use this case
ffmpeg -re -stream_loop -1 -i metaout.mp4 -acodec libmp3lame -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 426x240 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace -vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "rtmp://rtmp-api.facebook.com:80/rtmp/XXXXXXXX?ds=1&s_l=1&a=XXXXXXXXXXXX"

Optional Loop many Videos Files to Facebook like a Set of Timeline VideosVLC Mixing Audio and Silent Video
Now we add a Audio source in this case a test.mp3 to our silent metaout.mp4 video , outputing the result to the GUI Player with macosx important is the -noaudio parameter it will abort if not present ,defining Audio codec acodec=mp3 with the audio specs we like.

vlc -vvv -I macosx metaout.mp4 --noaudio --input-slave=test.mp3 --audio-track=1 --sout="#transcode{vcodec=mp4v,vb=800,acodec=mp3,ab=128,channels=2,samplerate=44100}:duplicate{dst=display}"

Same just save the final new mixed File we use h264 codec

vlc -vvv -I macosx test2.mp4 --noaudio --input-slave=test.mp3 --audio-track=1 --sout="#transcode{vcodec=h264,vb=1024,acodec=mp3,ab=128,channels=2,samplerate=44100}:duplicate{dst=std{access=file,mux=mp4,dst="test1outsound.mp4"},dst=display}"

Useful VLC CLI commands:

Build Alias for VLC Command to bash

echo "alias vlc='/Applications/VLC.app/Contents/MacOS/VLC -I rc'" >> ~/.bash_profile

Restart Terminal after execution

Enable Logging

Log in same Folder the log file vlc-META.log

vlc --extraintf=logger --verbose=2 --logfile=vlc-META.log --logmode=text --file-logging
or
vlc -I http --extraintf logger --log-verbose=2 --verbose-objects=+all -vvv --fullscreen

Where is the log file ? Mac will name the file vlc-log.txt and place your logfile in USERS/YOURMAC/Library/logs/vlc-log.txt

VLC Stream Audio Input on Mac list the devices

Usage: qtsound://"Built-In Input" or qtsound://"iMic USB audio system"
vlc -vvv qtsound:// 

vlc -vvv qtsound://”AppleHDAEngineInput:8,0,1,0:1″

For windows


vlc dshow:// :dshow-vdev="None" :dshow-adev="Your Audio-Device"  
 Open a VLC telnet connection :

vlc -I telnet -vvv --telnet-password password --telnet-host 198.168.0.x:4212

Play a Youtube Video
vlc --preferred-resolution 720 https://www.youtube.com/watch?v=m2Oo4kBHBNU
Qualitys preferred-resolution :
-1 : default,best available
1080 :Full HD: 1080p
720 :HD: 720p
576 :SD 576 or 480 lines
360 :Low: 360 lines)
240 :Very Low: 240 lines

VLC Streaming How To Final to Facebook

We Learned how to Capture with VLC , we tested how to Stream with FFmpeg to Facebook . Now lets make the final step the super easy just one tool fast stream my desktop version .

VLC Streams a File to our Fanpage

vlc metaout.mp4 --sout '#transcode{vcodec=h264,vb=300,fps=25,scale=1,acodec=mp4a,ab=64,channels=2}:std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://rtmp-api.facebook.com:80/rtmp/XXXXXXXXXXXX=1&s_l=XXXXXXXXXXX}'

Now Streaming our Desctop like described above this example is full Desctop
vlc -I rc screen:// --sout '#transcode{vcodec=h264,vb=300,fps=25,scale=1,acodec=mp4a,ab=64,channels=2}:std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://rtmp-api.facebook.com:80/rtmp/XXXXXXXXXXXXXXX?ds=1&s_l=1&XXXXXXXXXXXXXXXXX}'

 

Still need Sound added to the VLC Recording here Some Experimental Snippet

vlc -vvv -I rc screen:// --input-slave qtsound://AppleHDAEngineInput:1B,0,1,0:1 --sout '#transcode{vcodec=h264,vb=1024,fps=25,scale=2,acodec=mp4a,ab=44,channels=1}:std{access=rtmp,mux=ffmpeg{mux=flv},dst=rtmp://rtmp-api.facebook.com:80/rtmp/XXXXXXXXXXXXX&s_l=1&a=XXXXXXXXXXXXXX}'

Facebook Stream FAQ

Can we have multiple live streams on one page ?  yes, its possible if you don’t terminate them you can even continue with the same key on the stream.

Can we interrupt a Livestream and continue later on ? Yes that’s possible as the last test show in the Video overview the Videos stay Live even if there is no more stream (probably a bug or concept for future functions)

Should we stream over Wifi or Lan ?  It’s all time better to stream over Lan as on wifi you will generate more packet errors in your stream

What is the lowest Frame rate we can stream to Facebook ?  FB recommend 30 Frames (for US NTSC ) 25 Frames is standard in Europe PAL Norm . For lower Frame Rates we need some more experiments. It reduce your bandwidth usage and left space for quality. Facebook Live Event log will complain if Framerate drops below 16 frames , but still stream

How to find coordinates of screen in Mac OS X and crop position to Capture ? Press CTR SHIFT 4 to pixel exact position and Screen capture size for the VLC crop settings. It’s the same shortcut you use for a single screen capture to disk. The Crosshair shows the pixel position and window size

How long is the delay to the Livestream ?

How long is the live stream Key Valid ? ? ?

Record Periscope Livestream with FFMpeg

ffmpeg -i HLS_URL out.mp4

Control the VLC from the Command Line.

After we executed the command line we can start and stop the recording from the CLI with play and quit . The command stop would not work as expected as the stream can’t be continued . To see the Playlist Elements you can use playlist there shoud be your cli command visible .

playlist  : to get the playlist position

start

help

vlc -l  Use --list or --list-verbose to list available modules.
vlc -p  --advanced  display help for each module

Mac Terminal Commands

Show which processes are listening to which ports Sockets
lsof -i | grep LISTEN

VLC Terminal Errors to clear out

the Lua interface gave us some errors when we start Screen capturing and when we quite the process but it don’t affect our recording , probably the CLI and HTTP interface don’t work together as they should , so we don’t see our CLI executed commands on the web interface . We can live with that for now.

core interface error: socket bind error: Permission denied  

vlc is trying to use is always 8080, if you have something other running it will result in a error .Dosent matter what port you define for VLC

lua interface error: Error loading script /Applications/VLC.app/Contents/MacOS/share/lua/intf/http.luac

intf/http.lua:336: Failed to create HTTP host

MODUL Error

Main Error Es_out_set_ Group Pcr Is Called Too Late  

Facebook Event Log Error

Some events logged  , so we need to add keyframes and a stable frame rate .

Too low video key frame rate 0.038965

Too low video frame rate 5.844763

VLC CLI Parameter 

-I macosx  Output Preview in the GUI Player
--http-password <your password here

-vvv  "Verbose verbose verbose". Verbose output

VLC CLI Parameter for FFMepg

--input-slave qtsound    add sound to the stream 
--input-slave timecode:// --timecode-fps 30/1001

vb  option  to set  transcoded video stream, in kbit/s

ab  option  to set  transcoded Audio stream, in kbit/s

scale   ratio from which the video should be rescaled while being transcoded ,to reduce stream Bandwith

keyint=<number of frames>

mux encapsulation method used to send the stream

hurry-up  allow the encoder to decrease the quality if processor can’t handle 

dst    location where the video streams should be sent

VBR Mode x264 Does a better job at keeping the media around the desired bitrate takes longer encoding time x264 –pass 1 –bitrate 1500 -o <output> <input>  # ABR Mode   x264 –pass 2 –bitrate 1500 -o <output> <input>  # VBR Mode This is called 2-pass mode, not VBR mode. ABR is a form of VBR.
VLC Streaming to Chromecast Only for Windows Version VLC 3.0References and additional resources & Developer 

VLC CLI command wiki 
Joergens Blog Livecasting 

GoPro Live streaming Hero3 Hero4 with VLC

Wowza Ffmpeg  Examples

VLC Forum 

VLC RTSP Streaming

Streaming How To 

VLM How To

Advanced Streaming Parameter VLC FFmpeg

VLC GIT Important changes New CLI commands and more OSXMAc related

Additional Extras 

CefWithSyphon  Chrome Browser with Syphon Interface , capturing web content GIT

Screengif GIT
CTstreamOutput  XCode Projekt for Camtwist to stream directly with FFmpeg (not tested compiled)

VLC Streaming Windows related

As an Input source we can use on Windows vlc dshow://    what is equivalent Direct Show input

Detect all recording sources Cameras with ffmpeg

To discover all potential camera sources for our live stream we can list them in the Terminal with following commands

avfoundation lib is used for MAC
ffmpeg -f avfoundation -list_devices true -i ""
DirectX  the command directshow  equivalent for windows
ffmpeg -y -f dshow -i list

Additional Input Sources for VLC Capture & Stream

Version 3.0

Support DVB-T2    !

Version 2.2

QTKit  Quicktime API  Audio & Video

Linear Systems (HD-)SDI cards input support  

Blackmagic DeckLink SDI cards input support

DVB-S scanning support

DVB-C scanning

VLC & Versions Info installed

VLC 2.1.2 (working Screen Capture)
VLC 2.2.4 Weatherwax (newest Public Build) Web Interface outdated broken – Rewriting new Flowplayer v.6
VLC 3.o.o (nighty testing Chromecast)
FFmpeg : ffmpeg version 3.1.5
Web Interface : http://localhost:8080/
Video Player MPEG Streamclip SQUARED  still the best video player and converter

Facebook Live Broadcasting Parameter

  • Video Resolution: max 720p (1280 x 720), PAL 25 frames, NTSC  30 frames per second
  • Key-Frame Interval of 1 every 2 seconds ,every 50   PAL , 60 Frames NTSC
  • Max bit rate 4000Kbps
  • Rate control: CBR (see above desc.)
  • 240 minute or 4 hour max on a default stream
  • Audio Sample Rate: 22KHz | 44.1 kHz
  • Audio Bitrate: 64-128 Kbps

Unzip all Files in Folder MAC OSX

To automatically Prozess a lot of Zip Files in a Folder this Terminal command is quite useful

Open Terminal

CD to the Directory you need to prozess

# Change Directory you need to prozess
cd /Users/meta/Downloads/myfolderzips

# extract all Zip on request to overwrite .txt conform aith  all 
unzip \*.zip

# if we need to remove cleanup the extracted zips
rm -f *.zip

Find all ZIP in a Folder and Subfolder

find ./ -name ‘*zip’

Un Zip all files in subfolder of the Folder

find ./ -name \*.zip -exec unzip {} \

 

Same prozess can be done with bz2 or rar files