Audio/video stream recording forums
|
Attention Visitor: |
You may have to register or log in before you can post:
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Renaming rtmpdump downloads automatically based on date and time (Windows, Linux)This is very simple in any scripting language. if you are using simple batch file in Windows then use:
Code:
for /f "tokens=1-6 delims=/:." %%a in ("%date%.%time%") do set FileName="MyShow - %%a-%%b-%%c - %%d-%%e-%%f.flv" rtmpdump.exe -r "rtmp://live1.seeon.tv/edge/nvcrd4lz4zs0w34" -p "http://www.seeon.tv/view/11073" -W "http://www.seeon.tv/jwplayer/player.swf" --stop 3600 --live -o %FileName% |
#2
|
|||
|
|||
Re: Renaming rtmpdump downloads automatically based on date and time (Windows, Linux)Quote:
Could you please explain how it works? Specifically: 1. Where do the variables %%b, %%c, %%d, %%e, %%f come from? 2. What is "tokens=1-6 delims=/:."? |
#3
|
|||
|
|||
Re: Renaming rtmpdump downloads automatically based on date and time (Windows, Linux)Quote:
PS: when using outside the batch file use single % eg: %a instead of %%a |
#4
|
|||
|
|||
Re: Renaming rtmpdump downloads automatically based on date and time (Windows, Linux)Any chance I could get you to write that same script but for a linux machine instead of a windows one? Thanks.
|
#5
|
|||
|
|||
Re: Renaming rtmpdump downloads automatically based on date and time (Windows, Linux)Quote:
Code:
C:\Documents and Settings\Администратор\Мои документы\rtmpdump-2.3>for /F "token s=1-6 delims=/:." %a in ("07.05.2011.14:54:23,64") do set FileName="MyShow - %a- %b-%c - %d-%e-%f.flv" C:\Documents and Settings\Администратор\Мои документы\rtmpdump-2.3>set FileName= "MyShow - 07-05-2011 - 14-54-23,64.flv" C:\Documents and Settings\Администратор\Мои документы\rtmpdump-2.3>rtmpdump.exe -r "rtmp://live1.seeon.tv/edge/nvcrd4lz4zs0w34" -p "http://www.seeon.tv/view/110 73" -W "http://www.seeon.tv/jwplayer/player.swf" --stop 3600 --live -o "MyShow - 07-05-2011 - 14-54-23,64.flv" RTMPDump v2.3 r568 (Compiled by KSV) (c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL Connecting ... INFO: Connected... Starting Live Stream For duration: 3600.000 sec INFO: Metadata: INFO: author INFO: copyright INFO: description INFO: keywords INFO: rating INFO: title INFO: presetname Custom INFO: creationdate Wed Apr 13 18:22:26 2011 INFO: videodevice MagicCamera Capture(User Mode) INFO: framerate 25.00 INFO: width 320.00 INFO: height 240.00 INFO: videocodecid avc1 INFO: videodatarate 400.00 INFO: avclevel 31.00 INFO: avcprofile 66.00 INFO: videokeyframe_frequency5.00 INFO: audiodevice Digital Audio Interface (WinTV INFO: audiosamplerate 22050.00 INFO: audiochannels 2.00 INFO: audioinputvolume 75.00 INFO: audiocodecid .mp3 INFO: audiodatarate 56.00 2049.631 kB / 36.43 sec |
#6
|
|||
|
|||
Re: Renaming rtmpdump downloads automatically based on date and time (Windows, Linux)Quote:
Code:
#! /bin/bash FileName=`date +"MyShow - %0d-%0m-%0y - %0k-%0M-%0S.flv"` rtmpdump.exe -r rtmp://live1.seeon.tv/edge/nvcrd4lz4zs0w34 -p http://www.seeon.tv/view/11073 -W http://www.seeon.tv/jwplayer/player.swf --stop 3600 --live -o \"$FileName\" |
#7
|
|||
|
|||
Re: Renaming rtmpdump downloads automatically based on date and time (Windows, Linux)Quote:
Hi i have a problem with this script. the output flv file is always MyShow with no date and when restart the script the previous flv file is overwritten. |
#8
|
|||
|
|||
Re: Renaming rtmpdump downloads automatically based on date and time (Windows, Linux)Quote:
This should work: Code:
#! /bin/bash FileName=`date +"MyShow - %0d-%0m-%0y - %0k-%0M-%0S.flv"` rtmpdump -r rtmp://live1.seeon.tv/edge/nvcrd4lz4zs0w34 -p http://www.seeon.tv/view/11073 -W http://www.seeon.tv/jwplayer/player.swf --stop 3600 --live -o "$FileName" |
#9
|
|||
|
|||
Re: Renaming rtmpdump downloads automatically based on date and time (Windows, Linux)Quote:
|