#!/bin/bash

# Stream Sscn_Movie

export STREAM_NAME="Sscn_Movie"
export STREAM_PID_PATH="/home/user/RIDSYSPACKAGE/pid/$STREAM_NAME-pid"
export INPUT_INTERFACE="192.168.44.5"
export OUTPUT_INTERFACE=""
export INPUT_URL="236.103.103.22:2000"
export OUTPUT_URL="/riptv/live/Sscn_Movie/index.m3u8"
export OUTPUT_PATH="/home/user/RIDSYSPACKAGE/riptv/live/Sscn_Movie"
export CH_NAME="325"
export OUT_CH_NAME="Sscn Movie"

#export FUNCTION_TO_CALL="preset_hls"
#source /home/user/RIDSYSPACKAGE/riptv/live/Sscn_Movie/Streaming_file


ffmpeg \
-hide_banner \
-loglevel info \
-nostdin \
-fflags +discardcorrupt \
-err_detect ignore_err \
-thread_queue_size 8192 \
-i "udp://236.103.103.22:2000?fifo_size=5000000&overrun_nonfatal=1" \
-map 0:v \
-map 0:a? \
-c:v copy \
-c:a copy \
-f hls \
-hls_time 8 \
-hls_list_size 5 \
-hls_delete_threshold 1 \
-hls_flags delete_segments+append_list \
-hls_segment_filename "movie_%05d.ts" \
"movie.m3u8"
