Created
December 26, 2018 03:21
-
-
Save yoonbae81/48b3e5451701e43b8d9f657d8778f7be to your computer and use it in GitHub Desktop.
EBS 녹음
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL="rtmp://ebsandroid.ebs.co.kr:1935/fmradiofamilypc/familypc1m" | |
PROGRAM=$1 | |
RECORD_MINS=$(($2 * 60)) | |
DATE=`date +%Y%m%d` | |
FLV_FILE=`mktemp -u` | |
M4A_FILE=$DATE"_"$PROGRAM.m4a | |
rtmpdump -r $URL -B $RECORD_MINS -o $FLV_FILE | |
ffmpeg -i $FLV_FILE -vn -acodec copy $M4A_FILE | |
rm $FLV_FILE | |
mkdir -p /var/www/html/ebs/$PROGRAM | |
mv $M4A_FILE /var/www/html/ebs/$PROGRAM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment