Skip to content

nrmmota/kwik-udp-send

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 

Repository files navigation

Kwikflix UDP send

kwik-udp-send

Features

  • Sending ts file(s) as a ts udp stream

  • If there is no files to send, it sends null packets

  • Works with real-time process/threads priorities to provide stability of the stream

  • Works with FIFO files

  • Reading files to a cache buffer with an accumulation part to provide stability of the stream

Tested environments

  • Debian Jessy

  • Ubuntu 14.04 LTS with lowlatency kernel (sudo apt-get install linux-lowlatency and restart system). It provides really stable TS stream.

Build

Just run make in the project directory

Command-line options

  • -i <address> - ip address to send packets

  • -p <port> - port to send packets

  • -b <bitrate> - bitrate of stream

  • -d <path to directory> - send all files from a directory, sorted my modified time, the directory is scanned in real-time, you can add files on fly

  • -f <path to file> - send one file, you have to select either a file or a directory

  • --ts_in_cache <number>, -s <number> - common cache size, you can use K to set the size in kilobytes and M in megabytes

  • --accumul_ts <number>, -a <number> - size of filled cache part, you can use K to set the size in kilobytes and M in megabytes

  • --ttl <number>, -t <number> - set ttl

  • --pri <number>, -P <number> - set the process/thread priority

  • --ts_in_udp <number>, -u <number> - the number of ts packets in one udp packet

  • -c - don't stop file reading if it read zero bytes, use it for FIFO files

  • -m - print debugging messages on the screen

  • -l <file name> - save debugging messages to a file

  • -D <seconds> - print the state of buffer in some delays (in seconds)

  • -F <file size> - set a minimal file size that we're waiting for, you can use K for kilobytes and M for megabytes

  • -M - set a minimal file size, based on accumulation buffer size (accumuluation size + 25% of it)

###Examples

####Reading directory sudo ./kwik_udp_send -d /ts -i 239.0.0.10 -p 1234 -l ./log --ts_in_cache 40000 --accumul_ts 20000 -b 2000320

####Reading FIFO file, generated by ffmpeg sudo ./kwik_udp_send -f /ts/channel1.ts -i 239.0.0.10 -p 1234 -l ./log --ts_in_cache 40000 --accumul_ts 20000 -b 2000320 -c

####Generating proper mpegts stream with ffmpeg v2.8 ffmpeg -nostdin -i rtmp://XXX.XXX.XXX.XXX/pool/channel1 -xerror -err_detect explode -copytb 0 -vsync 0 -c copy -mpegts_original_network_id 0x1122 -mpegts_transport_stream_id 0x3344 -mpegts_service_id 0x5569 -mpegts_pmt_start_pid 0x1500 -mpegts_start_pid 0x150 -metadata service_provider="My Company" -metadata service_name="Channel1" -muxrate 2000320 -bsf:v h264_mp4toannexb -f mpegts -y /ts/channel1.ts

/ts/channel1.ts can be fifo or ordinary file

Feedback and tickets

We will appreciate you feedback or any contribution to our app. So, create tickets and let's discuss.

About

Kwikflix UDP send

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.0%
  • Makefile 1.0%