Sunday, December 04, 2016

VR/360 Live record

I testing VR/360 Livestreaming. some of my rigs.
  • 6xGopro
  • 6xHDMI capture card
  • freedom360's mounts
  • High performance laptop
  • Vahana VR
read more

If you interested the VR/360 solutions, i.e. live concert, sports, auto racing, online commercial AD. Please contact #Thailivestream

Sunday, November 27, 2016

open source Video transcoder project

Chat bot platform lists

Chat bot platform lists
I have try few bot. Seem chatfuel is very simple.




and more

Saturday, November 19, 2016

Make bootable usb on Linux (dell bios/firmware upgrade)

1. use lsusb, lsblk to check USB device

2. use gparted to prepare thumbdrive as FAT32 and FORMAT

3. use unetbootin to write .iso (May you need to mount /dev/sdbX)

If you see below warning dialor. You need to mount .i.e.  mount /dev/sdb1 /mnt/sdb1

Friday, November 18, 2016

make bootable usb on ubuntu

just note how to make bootable usb on ubuntu

First - unmount usb devices
  • use umount /mnt/sdb1
  • can't unmount?  try fuser -km /mnt/sdb1
Check - Linux should see usb device
  • use command  fdisk -l. shoud see /dev/sdbX
  • lsblk

Write image
  • sudo dd bs=4M if=/mnt/ubuntu-14.04.5-server-i386.iso of=/dev/sdb1

Write image and monitor progress
  • install pv by apt-get install pv
  • dd if=/mnt/ubuntu-14.04.5-server-i386.iso | pv -s 2G | dd of=/dev/sdb1 bs=4096
Dont forget sync!

  • sudo sync


dd if=/root/bootusb/ubuntu-14.04.5-server-i386.iso | pv -s 700M | dd of=/dev/sdb1 bs=4096

Easiest way is use

  • gparted
  • unetbootin

3G Bandwidth bonding solutions

I looking for 3G bonding solutions like liveu, teradek bond, peplink speedfusion, mobile viewpoint.

Tuesday, November 08, 2016

Haproxy DDoS Protection config

frontend public
bind *:80

# table used to store behaviour of source IPsstick-table type ip size 200k expire 5m store gpc0,conn_rate(10s)

# IPs that have gpc0 > 0 are blocked until the go away for at least 5 minutesacl source_is_abuser src_get_gpc0 gt 0tcp-request connection reject if source_is_abuser

# connection rate abuses get blockedacl conn_rate_abuse sc1_conn_rate gt 30acl mark_as_abuser   sc1_inc_gpc0  gt 0tcp-request connection track-sc1 srctcp-request connection reject if conn_rate_abuse mark_as_abuser


Sunday, October 23, 2016

Convert videos to m3u8 (HLS)

I looking for simple tools to convert mp4 files to m3u8 format (HLS). Seem not much software that support m3u8. May be it not mass format for end users? :/

Pavtube Video Converter


Brorsoft Video Converter

Both Pavtube Video Converter & Brorsoft Video Converter is very similar software. I think these software may develop by same company.


This way not for end users. I just note it. 

ffmpeg -i input.mp4 -profile:v baseline -level 3.0 -s 1290x720 -start_number 0 -hls_time 10 -hls_list_size 0 -f hls index.m3u8

read more:

I just wonder if no GUI software that support m3u8 as I expect. Also the software can't convert m3u8 as segment too.

If you have another software. Please let's me know. Thanks!

Monday, August 08, 2016

How to change/modify container options (after docker run)

Follow these step
  1. stop docker service (service docker stop)
  2. cd to /var/lib/docker/containers/{container id}/
    You can use command docker inspect {container name} to see the container id
  3. modify config.v2.json or hostconfig.json
  4. start docker (service docker start)

Thursday, July 07, 2016

WebRTC for Real-Time Communications

What is WebRTC


  • Twilio ( - Free for STUN, Paid for TURN
  • ooVoo SDK ( - Free, but Paid for commercial products.
  • XirSys SDK ( - Free for STUN, Paid for TURN
  • - just embedded, only backgrand customize

WebRTC Libs/Framework

  • adapter.js - AdapterJS provides polyfills and cross-browser helpers for WebRTC
  • EasyRTC - Javascript API hides the differences between Chrome and Firefox browsers and simplifies coding needed for working WebRTC apps.

WebRTC Test Tool

WebRTC Server

Conference - need MCU!

  • licode - Open Source WebRTC Communications Platform.
  • janus - Janus is a WebRTC Gateway developed by Meetecho


  • p2pPeerConnection broker for WebRTC
  • js-motion-detection This project tries to provide as a basis for other motion-detection apps

Wednesday, June 29, 2016

Wowza Streaming Engine 4.5 released

Wowza Streaming Engine 4.5.0, build 18676, released on June 23, 2016. These highlights
  • Facebook Live, SHOUTcast, and Icecast stream target integration 
  • Apple HLS delivery to generic targets
  • Integration of Panasonic® AW-series PTZ cameras and AJ-series cameras
  • Passthrough and transcoded stream SCTE-35 and KLV marker preservation
  • Simple Network Management Protocol (SNMP) support

Detailed list of changes in Wowza Streaming Engine 4.5.0

  • Install/Update/Uninstall

  • Fixed a logic bug in update tool post-uninstall actions, that caused the update tool to log an error when there wasn't one and to not log an error when there was (in this latter case, the "Restoration complete" message wouldn't be shown)
  • Fixed update tool issue where permissions and execute settings were lost when uninstalling an update on OS X and Linux

Wowza Streaming Engine Manager

  • Fixed multicast in/out interface address assignments in the VHost configuration section of the manager
  • Fixed application creation in the manager so advanced options are immediately available
  • Removed httpRandomizedMediaName property from VOD HTTP Origin application in the manager
  • Improved stream recording crontab validation in the manager
  • Fixed disabling nDVR configuration in the manager
  • Fixed null pointer when playing content in the manager's MPEG-DASH test player

Stream Targets (Push Publishing)

  • Fixed Stream Targets page to eliminate unintended page refreshes
  • Fixed Stream Targets bug where all enabled stream targets show an Active status when any stream target is active
  • Fixed Wowza Streaming Cloud Stream Target so that audio-only streams can be pushed successfully
  • Added support in Stream Targets to push Apple HLS (cupertino) streams to Akamai over SSL/HTTPS (only controllable through application properties)
  • Added push publishing map file (PushPublishMap.txt) property "sendSSL" to control use of SSL when POSTing Apple HLS (cupertino) streams to Akamai (valid values are "true" and "false", default is false). Use of this option requires Java 1.7 or newer
  • Added push publishing map file (PushPublishMap.txt) property "playbackSSL" to control use of SSL (HTTP vs. HTTPS) in the playlist and chunklist for Apple HLS (cupertino) streams pushed to Akamai (valid values are "true" and "false", default is false (HTTP)). Use of this option requires Java 1.7 or newer
  • Fixed push publishing Akamai HLS ABR rendition ordering to maintain order from map file
  • Fixed problem with RTMP push publishing that caused an exception when connection was refused and result object included "application" item with description of the reason for failure
  • Removed incorrect display of application-level buttons when editing a specific stream target in Wowza Streaming Engine Manager
  • Added Shoutcast1, Shoutcast2, and Icecast2 Stream Targets for audio-only push publishing
  • Added support to enable users to develop custom Apple HLS stream target destinations using a generic stream target base class
  • Added support for Facebook stream target destination


  • Fixed HEVC decoder crash on Linux by setting LD_PRELOAD variable in startup script
  • Fixed Quick Sync accelerated H.264 decoder to filter out filler NAL units that caused decoding artifacts
  • Added GPUID selection to transcoding decode options
  • Fixed Transcoder crash when SkipFrameCount is set higher than the source stream framerate. Destination framerate now set to 1 when this happens
  • Fixed Transcoder log statement formatting so the comment data has proper JSON format (field names double-quoted)
  • Improved MP3 decoder so that it properly decodes packets with more than one MP3 frame

Live Stream Recording

  • Added IP whitelisting/blacklisting for LiveStreamRecord HTTP Provider
  • Fixed Live-to-VOD clip extraction code that caused the conversion start time to be overwritten with the default value. This caused all conversions to start at the beginning of the DVR store
  • Added dvrConverterDebugConversions query parameter to nDVR converter REST API to allow debug to be enabled per conversion request
  • Fixed issue with some live-record recordings being out of lip sync (adjusted codec config timecodes to match first packet in list and fixed timecode of first data packet to match trimmed audio/video)
  • Improved nDVR conversion performance when selecting segments from large stores
  • Fixed LiveStreamRecord HTTP whitelist/blacklist logic when both are empty
  • Added splitOnTcDiscontinuity parameter to the streamrecorders REST API endpoint
  • Fixed LiveStreamRecord when configured for "append" and two streams with different codecs are published sequentially. This caused a cast exception to be thrown when closing the MP4 file and resulted in a corrupt file. When the file was subsequently reopened for append, an infinite loop prevented all future requests to start/stop recording and any application failed to be processed. Now if the incoming stream doesn't have the same codecs as the MP4 file being appended to, appending is disabled and the default version scheme (date/time stamp) is used such that recorded content isn't lost


  • Fixed nDVR packetizers to shut down correctly when an application instance stops
  • Fixed nDVR AES manifest to include the URI prefix in the X-KEY-METHOD header
  • Improved DVR ABR alignment algorithm to better handle resumption of alignment calculation after large gaps when feeds come in at different times
  • Improved DVR ABR alignment algorithm to ignore small gaps that don't align with alternative chunks
  • Fixed DVR manifest reader to use property "dvrTextReaderClass" to dynamically load class to read DVR manifest files
  • Enhanced IDvrFileWriter init() to include the IDvrStreamStore to provide more context to custom writers
  • Added option to use SAX parser for DVR manifest parsing, controlled by DVR property "dvrUseSAXParser" (Boolean, default is false), which should improve performance

Closed Captions

  • Added closed-caption options for VOD/Live HTTP Origin applications in Wowza Streaming Engine Manager

Media Cache

  • Added support for Google Cloud Storage to Media Cache
  • Added debug for MediaCacheItemFileImpl to see file operations in progress. Property MediaCacheSource/debugLog or MediaCache/debugLog enables this output

HTTP Streaming (Apple HLS - Cupertino)

  • Turned off Apple HLS cupertinoAutoAdjustDurationIfOutOfBounds system by default (also improved logging when feature is on)
  • Disabled EXT-X-ALLOW-CACHE header by default for Apple HLS streams; mediastreamvalidator warns this is a deprecated playlist header item
  • Fixed Apple HLS repeater so that custom chunk IDs are migrated from origin to edge correctly
  • Added API getChunkMap() to LiveStreamPacketizerCupertinoChunk. Returns the chunk's byte layout to help identify the media data that makes up the chunk:
  • CupertinoChunkMap LiveStreamPacketizerCupertinoChunk.getChunkMap()
  • Added API getDataPackets() to LiveStreamPacketizerCupertinoChunk. Returns a list of all the data AMFPackets that occurred during the chunk duration (can be used to get onTextData, onCUE (SCTE-35), or onKLV event data):
  • List LiveStreamPacketizerCupertinoChunk.getDataPackets()
  • Enhanced Apple HLS DVR playlists to insert discontinuity marker when alternate chunks are used during stream gaps:
  • Added HTTPStreamer/Properties Boolean property "dvrCupertinoPlaylistDiscontinuityAtAlternates" to control the behavior (default is true)
  • Added HTTPStreamer/Properties Boolean property "cupertinoAppendQueryParamsToEncUrl" to control if query parameters are appended to encryption URL for Apple HLS streaming (default is true, set to false for Fairplay)
  • Added key file Boolean item "cupertinostreaming-aes128-iv-include-in-chunklist" and encryption API to control if IV value is included in chunklist when doing Apple HLS encryption (default is true, set to false for Fairplay):
  • boolean CupertinoEncInfo.isEncIVBytesInChunklist()
  • CupertinoEncInfo.setEncIVBytesInChunklist(boolean encIVBytesInChunklist)

HTTP Streaming (MPEG-DASH)

  • Fixed MPEG-DASH playback issue on Chrome/OS X by adding sample flags to MP4 fragment data to make key frames (trun box)
  • Fixed MPEG-DASH on-demand streaming with CENC issue that caused an exception and failure on segment requests
  • Fixed MPEG-DASH streaming issue related to incorrect identification of all video frames as sync/i-frames in trun boxes
  • Fixed MPEG DASH SMIL/AMLST request handling for non-repeater-edge server requests. When all streams are unavailable, Wowza Streaming Engine doesn't attempt internal retries, since they create a lot of DASH HTTP sessions that can cause heap issues when many clients try to connect
  • Fixed MPEG DASH SMIL/AMLST request handling for repeater-edge server requests so that internal retries re-use the DASH HTTP session created on the initial try for all ensuing tries, avoiding creation of numerous sessions
  • Added support for tag in on-demand and live MPEG-DASH manifests
  • Added HTTPStreamer String property "mpegdashChunkHostDomain", which modifies the domain name indicated in the MPD tag. Allows content files to be located on a different server than the MPD manifest file
  • Changed MPEG-DASH RepresentationId values to include an indication of the rendition bitrate (for example: "p0va0r3500000", which is a 3500000 bps video rendition)
  • Added HTTPStreamer String property "mpegdashMinBufferTime", which can be used to modify the minBufferTime attribute in DASH MPDs
  • Fixed MPEG-DASH null pointer for some audio segment indexing
  • Added support for the repeat count attribute (@r) within the SegmentTimeline.S elements in MPEG-DASH on-demand streaming MPDs. This greatly reduces the size of MPDs for large assets with many contiguous segments of the same duration
  • Fixed MPEG-DASH null pointer when in HTTP Origin mode
  • Added API to support custom fragment ID and time offset for MPEG-DASH live streaming packetizer:
  • New interface IHTTPStreamerMPEGDashLiveStreamPacketizerChunkIdHandler that must be implemented to provide chunkId and timecode for the stream. For it to work with many players, chunkId must be set as follows: chunkId = 1 + (timecode/liveStreamPacketizer.getChunkDurationTarget())
  • To set custom chunkId handler, add mpegdashChunkIdHandlerClass property to LiveStreamPacketizer/Properties container in Application.xml and set it to full path to your IHTTPStreamerMPEGDashLiveStreamPacketizerChunkIdHandler implementation
  • Fixed a potential synchronization issue with live stream repeater for MPEG-DASH
  • Added HTTPStreamer/Properties Boolean property "mpegdashAdjustCTTSForFirstKeyFrameToZero" to adjust CTTS values to zero (default is false). Some browsers can't play on-demand MPEG-DASH assets where CTTS of first frame isn't zero
  • Fixed serialization and deserialization of AMFPacket used for MPEG-DASH live-repeater, which caused some repeated streams to fail
  • Updated HTTPProviderMediaList so that it formats the videoCodecId string for AVC streams per RFC6381 Section 3.2 to meet MPEG-DASH requirements

HTTP Streaming (Smooth)

  • Fixed Smooth Manifest so that MaxWidth,MaxHeight,DisplayWidth,DisplayHeight show the highest values when multiple renditions are available
  • Fixed Smooth Streaming adapter for live streams so that 404 HTTP status is returned for fragment requests that aren't in current readahead list rather than waiting for several seconds to return 404
  • Added HTTPStreamers/Properties Boolean property "smoothOnlyWaitIfReadAheadFragment". If true, 404 is returned for fragment requests that aren't in the readahead list; if false, 404 is returned if request is for previously deleted fragment (maintain a list of 2000 fragments, default is true)
  • Added HTTPStreamers/Properties integer property "smoothFragmentNotFoundStatus" to control HTTP status returned if fragment isn't found (default is 404)

HTTP Streaming (General)

  • Fixed OPTIONS request to provide CORS headers when an invalid application/instance is requested

RTSP/RTP Streaming

  • Updated VP9 RTP depacketizer and packetizer to latest specification version (draft-ietf-payload-vp9-01)
  • Fixed UDP port allocation/deallocation issue with RTSP/RTP streaming
  • Removed errant RTSP/RTP warning message: "RTCPHandler.handleMessage : socket address is null or not RTCP packet"
  • Added .stream file property for MediaCaster multicast RTSP re-streaming to specify the audio and video port to use when the server returns zero for the port number in the DESCRIBE response (rtspMulticastServerPortAudio and rtspMulticastServerPortVideo, both the specified port number and the next port number are used for each track [RTP and RTCP], default is zero)

On-Demand Streaming (VOD)

  • Fixed the bitrate calculation for MP3 files that have ID3 tags in them (off by a factor 5--too large)
  • Increased default VOD readahead cache size from 64K to 256K for better performance on higher bitrate files

MPEG-TS Ingestion

  • Added support for LATM AAC audio ingestion over MPEG-TS
  • Added listener interface IRTPDePacketizerMPEGTSNotify to MPEG-TS depacketizer to enable callbacks during live TS processing:
  • Added RTP/Properties String property "rtpDePacketizerMPEGTSListenerClass", set to full path of class that implements IRTPDePacketizerMPEGTSNotify to enabled (pipe | delimited for multiple class definitions)
  • IRTPDePacketizerMPEGTSNotify definition, best to extend RTPDePacketizerMPEGTSNotifyBase and override needed callbacks:
  • public void onInit(RTPDePacketizerMPEGTS rtDePacketizerMPEGTS, RTPContext rtpContext, RTPDePacketizerItem rtpDePacketizerItem);
  • public void onStartup(RTPDePacketizerMPEGTS rtDePacketizerMPEGTS, RTPTrack rtpTrack);
  • public void onShutdown(RTPDePacketizerMPEGTS rtDePacketizerMPEGTS, RTPTrack rtpTrack);
  • public void onPAT(RTPDePacketizerMPEGTS rtDePacketizerMPEGTS, ProgramAssociationTable newPAT);
  • public void onPMT(RTPDePacketizerMPEGTS rtDePacketizerMPEGTS, ProgramMapTable newPMT);
  • public void onVideoStart(RTPDePacketizerMPEGTS rtDePacketizerMPEGTS);
  • public void onAudioStart(RTPDePacketizerMPEGTS rtDePacketizerMPEGTS);
  • public void onTimecodeReady(RTPDePacketizerMPEGTS rtDePacketizerMPEGTS);
  • Added RTPDePacketizerMPEGTS API to add and remove listeners:
  • public void addListener(IRTPDePacketizerMPEGTSNotify listener)
  • public boolean removeListener(IRTPDePacketizerMPEGTSNotify listener)
  • Added MPEG-TS depacketizer API for monitoring incoming data for a particular PID. This might be used to monitor SCTE-35 ad markers, KLV metadata, closed captioning data, ID3 metadata tags, and so on:
  • Three different callback interfaces based on the PID data format:
  • IMPEG2UserMonitorRawNotify: Get called back for each individual 188 TS packet for a given PID
  • IMPEG2UserMonitorPESNotify: Get called back with assembled Packetized Elementary Stream (PES) data
  • IMPEG2UserMonitorSectionNotify: Get called back with assembled section table data (SCTE-35 and SCTE-104 table data...)
  • RTPDePacketizerMPEGTS API for adding and removing monitors:
  • public void clearPIDMonitorMap()
  • public Map getPIDMonitorMap()
  • public boolean pidMonitorEmpty()
  • public PIDMonitorHolder getPIDMonitor(int PID)
  • public void putPIDMonitorMap(int PID, IMPEG2UserMonitorPESNotify monitor)
  • public void putPIDMonitorMap(int PID, IMPEG2UserMonitorSectionNotify monitor)
  • public void putPIDMonitorMap(int PID, IMPEG2UserMonitorRawNotify monitor)
  • public PIDMonitorHolder removePIDMonitorMap(int PID)
  • public boolean containsPIDMonitorMap(int PID)
  • A given PID can only be monitored once. Any internal monitoring such as a video or audio PID for ingestion trumps any user-added PID monitors
  • Added additional RTPDePacketizerMPEGTS API:
  • public int getVideoPID()
  • public int getAudioPID()
  • public RTPTrack getAudioRTPTrack()
  • public RTPTrack getVideoRTPTrack()
  • public int getAudioCodec()
  • public RolloverLong getAudioTC()
  • public int getAudioCodecStreamRate()
  • public int getAudioCodecChannels()
  • public int getVideoCodec()
  • public RolloverLong getVideoTC()
  • public RolloverLong getVideoPTS()
  • public RolloverLong getVideoDTS()
  • public RolloverLong getDataTC()
  • Added default MPEG-TS PID monitor implementation for ad marker (SCTE-35) ingestion (com.wowza.wms.rtp.depacketizer.RTPDePacketizerMPEGTSMonitorCUE)
  • Added default MPEG-TS KLV monitor implementation for key length value (KLV) data ingestion (com.wowza.wms.rtp.depacketizer.RTPDePacketizerMPEGTSMonitorKLV)


  • Added support for multiple SSL certificates (Java KeyStores) per HostPort (TLS Server Name Identification (SNI) is required)
  • Fixed IP whitelisting/blacklisting for RTSP/RTMP authentication
  • Added HTTPProvider/Properties property "passwordFile" to allow alternative username/password file to be used


  • Added support for SNMP. Supported objects are: Server, VHost, Application, ApplicationInstance, Stream, and Client
  • Added support for WebSockets as part of an HTTPProvider
  • Improved live stream receiver to block against null packets
  • Improved H.264 PPS decoding to properly calculate display frame size based on aspect ratio (if calculation leads to width that's within round-off error, we use the original frame width)


  • Fixed incorrect logging for OutgoingStreamConfig REST API call
  • Added REST API endpoints to list and purge items from MediaCache
  • Fixed REST API JSON error content type to be consistent with non-error response
  • Updated applications/live/instances/_definst_/streamrecorders REST API endpoint so the option parameter can also be the single keywords "append", "overwrite", or "version"

Sunday, January 31, 2016

Get message from Youtube live chat

My quick note - How to retrieve Youtube live chat. (You need to use Youtube API)

Use WebServcie LiveBroadcasts: list. The method will show current live event. Find out LiveChatId (aka chat room id)

Next - use LiveChatMessages: list to get chat messages (Notice textMessageDetails)

Friday, December 11, 2015

How to join (merge or concatenate) video files

join files by avconv

avconv  -i concat:file1.mp4\|file2.mp4\|file3.mp4\|file4.mp4

avconv -i concat:file1.mp4\|file2.mp4 -c copy output.mp4

join files by mencoder

mencoder -oac copy -ovc copy video1.mp4 video2.mp4 -o output.mp4
mencoder -oac pcm -ovc copy video.mp4 video.mp4 video.mp4 -o output.mp4

Sunday, December 06, 2015

Let's watch SoupedUP 2015

Do you imagine 0-300 km/h (0-186 mph) in 7 seconds?

To seek for the Top Ten modified cars with the best timing in the ¼ mile distance. The 2015 statistic figures will be recorded for further development of race car, mechanic team, driver as well as Thailand’s DRAG society. The event Live Streaming by ThaiLivestream

Check out News, Scoop, Live score, Schedule, Photo Gallery, Multimedia, Social Feed and more on website

Below is live Bird eye view by Drone and Live Onboard camera


(or click here for re-live)

Highlight of Day 1 (5 Dec 2015)


 Watch all highlight here

Qualifying round will be held at BANGKOK DRAG AVENUE (Pathumthani Province) on Saturday 5th December 2015 and Sunday 6th December 2015. Time Record Ranking will be held at BURIRAM UNITED DRAGSTER TRACK (Buriram Province) on Saturday 12th December 2015.

For more information please visit



Wednesday, December 02, 2015

Wowza: How to specify start time and duration

use  wowzaplaystart  and wowzaplayduration
Adobe HDS

Apple HLS


Smooth Streaming


use wowzadvrplayliststart and wowzadvrplaylistduration
Adobe HDS

Apple HLS

Smooth Streaming

<video begin="30.0" dur="40.0" src="mp4:sample.mp4" system-bitrate="450000">

Monday, November 30, 2015

Tweaked sysctl.conf for ubuntu

Tweak nginx performance is not enough. High performance web server also need tune sysctl.conf file.

edit file /etc/sysctl.conf

 # /etc/sysctl.conf - Configuration file for setting system variables  
 # See /etc/sysctl.d/ for additional system variables.  
 # See sysctl.conf (5) for information.  
 #kernel.domainname =  
 # Uncomment the following to stop low-level messages on console  
 #kernel.printk = 3 4 1 3  
 # Functions previously found in netbase  
 # Uncomment the next two lines to enable Spoof protection (reverse-path filter)  
 # Turn on Source Address Verification in all interfaces to  
 # prevent some spoofing attacks  
 # Uncomment the next line to enable TCP/IP SYN cookies  
 # See  
 # Note: This may impact IPv6 TCP sessions too  
 # Uncomment the next line to enable packet forwarding for IPv4  
 # Uncomment the next line to enable packet forwarding for IPv6  
 # Enabling this option disables Stateless Address Autoconfiguration  
 # based on Router Advertisements for this host  
 # Additional settings - these settings can improve the network  
 # security of the host and prevent against some network attacks  
 # including spoofing attacks and man in the middle attacks through  
 # redirection. Some network environments, however, require that these  
 # settings are disabled so review and enable them as needed.  
 # Do not accept ICMP redirects (prevent MITM attacks)  
 #net.ipv4.conf.all.accept_redirects = 0  
 #net.ipv6.conf.all.accept_redirects = 0  
 # _or_  
 # Accept ICMP redirects only for gateways listed in our default  
 # gateway list (enabled by default)  
 # net.ipv4.conf.all.secure_redirects = 1  
 # Do not send ICMP redirects (we are not a router)  
 #net.ipv4.conf.all.send_redirects = 0  
 # Do not accept IP source route packets (we are not a router)  
 #net.ipv4.conf.all.accept_source_route = 0  
 #net.ipv6.conf.all.accept_source_route = 0  
 # Log Martian Packets  
 #net.ipv4.conf.all.log_martians = 1  
 # Increase size of file handles and inode cache  
 fs.file-max = 2097152  
 # Do less swapping  
 vm.swappiness = 10  
 vm.dirty_ratio = 60  
 vm.dirty_background_ratio = 2  
 # Number of times SYNACKs for passive TCP connection.  
 net.ipv4.tcp_synack_retries = 2  
 # Allowed local port range  
 net.ipv4.ip_local_port_range = 2000 65535  
 # Protect Against TCP Time-Wait  
 net.ipv4.tcp_rfc1337 = 1  
 # Decrease the time default value for tcp_fin_timeout connection  
 net.ipv4.tcp_fin_timeout = 15  
 # Decrease the time default value for connections to keep alive  
 net.ipv4.tcp_keepalive_time = 300  
 net.ipv4.tcp_keepalive_probes = 5  
 net.ipv4.tcp_keepalive_intvl = 15  
 # Default Socket Receive Buffer  
 net.core.rmem_default = 31457280  
 # Maximum Socket Receive Buffer  
 net.core.rmem_max = 12582912  
 # Default Socket Send Buffer  
 net.core.wmem_default = 31457280  
 # Maximum Socket Send Buffer  
 net.core.wmem_max = 12582912  
 # Increase number of incoming connections  
 net.core.somaxconn = 4096  
 # Increase number of incoming connections backlog  
 net.core.netdev_max_backlog = 65536  
 # Increase the maximum amount of option memory buffers  
 net.core.optmem_max = 25165824  
 # Increase the maximum total buffer-space allocatable  
 # This is measured in units of pages (4096 bytes)  
 net.ipv4.tcp_mem = 65536 131072 262144  
 net.ipv4.udp_mem = 65536 131072 262144  
 # Increase the read-buffer space allocatable  
 net.ipv4.tcp_rmem = 8192 87380 16777216  
 net.ipv4.udp_rmem_min = 16384  
 # Increase the write-buffer-space allocatable  
 net.ipv4.tcp_wmem = 8192 65536 16777216  
 net.ipv4.udp_wmem_min = 16384  
 # Increase the tcp-time-wait buckets pool size to prevent simple DOS attacks  
 net.ipv4.tcp_max_tw_buckets = 1440000  
 net.ipv4.tcp_tw_recycle = 1  
 net.ipv4.tcp_tw_reuse = 1  

Reload changed by command sysctl -pnote: wrong config may kernel panic


Saturday, November 28, 2015

Setup sputnik server for teradek bond

The Teradek Bond is cellular bonding solutions allows you to transmit 1080p HD video over aggregated bandwidth from several network interfaces, including 3G/4G/LTE, WiFi, BGAN, and Ethernet*

Sputnik Server using to combine the data packets from Bond’s modems into a cohesive video stream, your live broadcast must first be transmitted to a Sputnik server hosted on Amazon’s EC2 cloud or on your own Linux computer with a publicly addressable TCP port. Sputnik is Teradek’s free software application between Bond and your streaming destination, whether its a content delivery network or an IPTV decoder. (see below diagram)

If you are not favour on Linux, You can buy Base server. Base is an integrated link aggregation and H.264 decoding solution for video broadcasts transmitted over the Teradek Link or Bond. Inside Base is Cent-OS Linux + Sputnik + Cube 305 Decoder (1 SDI output). 

But if you  no need any SDI output.  May you interested Preconfigured Sputnik Server. It is cheap dell computer OptiPlex 390 or Dell R210 (1u rack server) with only Sputnik server installed. Don't worry to feed video, you can use RTP/RTSP to feed video out.

below is sample of Sputnik web base interface.

Well, That's enough for Teradek Bond info It not my point here. I just wanna note that  how to setup sputnik server. I use docker which very very easy. I fork the docker image from texastribune/sputnik (sputnik 2.2.1) to patrickz/sputnik, but I use latest version (Sputnik 2.4.3, released on 2015-11-11)

After install docker then use command

docker run -p 5111:5111 -p 1957:1957 -p 554:554 --detach --name sputnik patrickz/sputnik

then docker ps -a. You should see as below image

go to URL with default access - user: admin, password: admin (Don't forget to change password).