Audio/video stream recording forums

Attention Visitor:
You may have to register or log in before you can post:
  • Click the register link to sign up.
  • Registered members please fill in the form below and click the "Log in" button.
To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Audio/video stream recording forums > Streaming media recording forum > rtmpdump
Register FAQ Members List Calendar Mark Forums Read

Reply Post New Thread
 
Thread Tools Display Modes
  #1  
Old 06-12-2012, 08:07 AM
rossifeder rossifeder is offline
Junior Member
 
Join Date: Jun 2012
Posts: 8
rossifeder is on a distinguished road
Unhappy

rtmpdump using .bat file


hello

I did a script to stream some channels and it work, I used :
Code:
rtmpdump -v -r rtmp://xxx -a xxx -y xxx -W wwww -p ZZZZ -f xxx | vlc -
so first start rtmpdump (with all his log like connecting etc etc ) + start vlc and i wait 5 sec then the stream work

ok good

but i want to do this differently, I want to start rtmpdump and wait
if there is a connection then start vlc to watch the stream
if there is no conecction (server error , no internet, wrong url , etc etc) then write (echo) there is no stream & exit

i am searching this on internet in last 3 days and i cant find a solutin

if there is a value the rtmpdump can return o there is an external programm.exe that i can use in my .bat file
i would accept any suggestion to do this

i cant figure out how to do this
plz help me
Reply With Quote
  #2  
Old 06-12-2012, 09:02 AM
KSV KSV is offline
Senior Member
 
Join Date: Apr 2011
Posts: 853
KSV is on a distinguished road
Cool

Re: rtmpdump using .bat file


you can use --stop 1 switch to download 1 second of stream and then check that file's duration using MediaInfo command line tool. if media duration is 1 second then stream is live and working else some error occurred during download.
Reply With Quote
  #3  
Old 06-12-2012, 09:11 AM
rossifeder rossifeder is offline
Junior Member
 
Join Date: Jun 2012
Posts: 8
rossifeder is on a distinguished road
Default

Re: rtmpdump using .bat file


Quote:
Originally Posted by KSV View Post
you can use --stop 1 switch to download 1 second of stream and then check that file's duration using MediaInfo command line tool. if media duration is 1 second then stream is live and working else some error occurred during download.
ok i am going to try this and am going to tell you the results after that

thank you very much
Reply With Quote
  #4  
Old 06-12-2012, 09:38 AM
rossifeder rossifeder is offline
Junior Member
 
Join Date: Jun 2012
Posts: 8
rossifeder is on a distinguished road
Default

Re: rtmpdump using .bat file


^^^^^^

its more complicated than what i thought
i downloaded MediaInfo but I cant find the right command line
can you give me an example of a command line
thanks
Reply With Quote
  #5  
Old 06-12-2012, 10:13 AM
KSV KSV is offline
Senior Member
 
Join Date: Apr 2011
Posts: 853
KSV is on a distinguished road
Cool

Re: rtmpdump using .bat file


Code:
MediaInfo --Inform=Video;%Duration% your_file
This command will tell you the duration in milliseconds. replace % with %% when using in batch file.
Reply With Quote
  #6  
Old 06-12-2012, 10:31 AM
rossifeder rossifeder is offline
Junior Member
 
Join Date: Jun 2012
Posts: 8
rossifeder is on a distinguished road
Default

Re: rtmpdump using .bat file


thank you KSV for your time

Last edited by rossifeder : 06-12-2012 at 11:10 AM.
Reply With Quote
  #7  
Old 06-12-2012, 03:23 PM
rossifeder rossifeder is offline
Junior Member
 
Join Date: Jun 2012
Posts: 8
rossifeder is on a distinguished road
Default

Re: rtmpdump using .bat file


I have discovered the timeout command
rtmpdump −−timeout
which i never noticed before
it will risolve the problem
thanks
Reply With Quote
  #8  
Old 06-12-2012, 04:18 PM
chap chap is offline
Senior Member
 
Join Date: Feb 2011
Location: Ukraine
Posts: 1,165
chap is on a distinguished road
Default

Re: rtmpdump using .bat file


Quote:
Originally Posted by rossifeder View Post
hello
but i want to do this differently, I want to start rtmpdump and wait
if there is a connection then start vlc to watch the stream
if there is no conecction (server error , no internet, wrong url , etc etc) then write (echo) there is no stream & exit
try use
Quote:
rtmpdump -v -r rtmp://xxx -a xxx -y xxx -W wwww -p ZZZZ -f xxx | "C:\Program Files\VideoLAN\VLC\vlc.exe --play-and-exit" -
Reply With Quote
  #9  
Old 06-12-2012, 04:54 PM
rossifeder rossifeder is offline
Junior Member
 
Join Date: Jun 2012
Posts: 8
rossifeder is on a distinguished road
Default

Re: rtmpdump using .bat file


Quote:
Originally Posted by chap View Post
try use
thanks
Reply With Quote
Reply Post New Thread
Tags:



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 02:18 AM.


Powered by All-streaming-media.com; 2006-2011
vB forum hacked with Zoints add-ons