madhawa

Sample "/usr/sbin/segmenter_128k" for Apple HLS

May 30th, 2012
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.34 KB | None | 0 0
  1. #!/bin/sh
  2. # (C) Copyright 2012 by Madhawa Jayanath ([email protected])
  3. #
  4. #
  5. # This program is free software; you can redistribute it and/or modify it under
  6. # the terms of the GNU General Public License as published by the Free Software
  7. # Foundation; either version 3 of the License, or (at your option) any later
  8. # version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but WITHOUT
  11. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU General Public License along with
  16. # this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
  17. # Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. while [ 1 ]
  19. do
  20. /usr/local/bin/ffmpeg -d -i 'rtmp://123.123.117.16:1935/live/abcdpc2 live=1' -re -g 250 -keyint_min 25 -bf 0 -me_range 16 -sc_threshold 40 -cmp 256 -coder 0 -trellis 0 -subq 6 -refs 5 -r 25 -c:a libfaac -ab:a 48k -async 1 -ac:a 2 -c:v libx264 -profile baseline -s:v 320x180 -b:v 96k -aspect:v 16:9 -map 0 -ar 22050 -vbsf h264_mp4toannexb -flags -global_header -f segment -segment_time 10 -segment_format mpegts /dev/shm/stream128ios%09d.ts 2>/dev/null
  21. /bin/rm -f /dev/shm/stream128ios*.ts
  22. /bin/rm -f /dev/shm/abcd_live_128k.m3u8
  23. sleep 2
  24. done
Advertisement
Add Comment
Please, Sign In to add comment