Livestreamer error and file name

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
JulienLapointe3219
Posts: 4
Joined: 22 Jun 2015 16:44

Livestreamer error and file name

#1 Post by JulienLapointe3219 » 22 Jun 2015 17:00

Hi,

I made a batch file allowing the program livestreamer and VLC to automatically record the stream when a streamer is online. If he is not online the batch file repeat itself until the streamer is online.

My Code is:

Code: Select all

:start
livestreamer http://www.twitch.tv/mrllamasc best -o "streams/mrllamasc.flv" -O --retry-streams 1 --retry-open 86400
goto start


If the streamer is or go online everything work well but if he doesn't go online after a while I have this error:
Image

Also, If in my folder (streams in this exemple) I already have a file named mrllamasc.flv it doesn't record and ask me if I want to overwrite the file. I would want to tell to the program to change the file name if there is already a file with this name. Like putting a number after the name or the date.

Can someone help me please :mrgreen:.
Last edited by JulienLapointe3219 on 24 Jun 2015 13:32, edited 1 time in total.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Liverstreamer error and file name

#2 Post by foxidrive » 23 Jun 2015 02:19

JulienLapointe3219 wrote:If the streamer is or go online everything work well but if he doesn't go online after a while I have this error:

Can someone help me please :mrgreen:.


You haven't told us what error you are concerned about, and because there is no screenshot of a successful attempt we can't be sure of what is wrong.

JulienLapointe3219
Posts: 4
Joined: 22 Jun 2015 16:44

Re: Livestreamer error and file name

#3 Post by JulienLapointe3219 » 23 Jun 2015 06:39

When everything work there is 2 thing that can append:

1st: When the streamer is online and the program record the stream(When the program record I don't have any error).
Image

2nd: The program wait for the streamer. This is when I have the problem but I dont have the error all the time.
Image

When I have the error messages the program stop looking if there is a streamer so if the streamer go online the program will not record the stream. Maybe I can't do anything about those errors but I would at least want the program to restart and wait for the streamer again.


Now I have other kind of error:
Image
Image

About the name of the file problem that I have this is what I get.
Image
Last edited by JulienLapointe3219 on 24 Jun 2015 13:33, edited 1 time in total.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Liverstreamer error and file name

#4 Post by foxidrive » 24 Jun 2015 03:36

One comment I would make is that retrying every one second is a load on the remote server that the admin will probably not appreciate.

You could add a 10 second delay and have the program try just once and exit - so your batch file can control the connection.

You will have to test this and see what the syntax for livestreamer is, to try once and exit.

Code: Select all

:start
livestreamer http://www.twitch.tv/mrllamasc best -o "streams/mrllamasc.flv" -O
timeout 10
goto start

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Liverstreamer error and file name

#5 Post by Squashman » 24 Jun 2015 06:50

JulienLapointe3219 wrote:Hi,

I made a batch file allowing the program livestreamer and VLC to automatically record the stream when a streamer is online. If he is not online the batch file repeat itself until the streamer is online.

My Code is:

Code: Select all

:start
livestreamer http://www.twitch.tv/mrllamasc best -o "streams/mrllamasc.flv" -O --retry-streams 1 --retry-open 86400
goto start

You are retrying every second, 86,400 times. I am sure the site loves that!!! :evil:
How about you change that around. Retry the stream every 60 seconds and maybe only 60 times.

JulienLapointe3219
Posts: 4
Joined: 22 Jun 2015 16:44

Re: Livestreamer error and file name

#6 Post by JulienLapointe3219 » 24 Jun 2015 09:47

I'm trying what foxidrive said and I didn't have any problem in 3 hours. If it is continue to work I will just need to find how to change the filename.


Ty for your help.
Last edited by JulienLapointe3219 on 24 Jun 2015 13:33, edited 1 time in total.

Squashman
Expert
Posts: 4486
Joined: 23 Dec 2011 13:59

Re: Liverstreamer error and file name

#7 Post by Squashman » 24 Jun 2015 11:18

Create a variable with the date and time in it and use that in your file name.

JulienLapointe3219
Posts: 4
Joined: 22 Jun 2015 16:44

Re: Livestreamer error and file name

#8 Post by JulienLapointe3219 » 24 Jun 2015 12:50

I just found something for the filename. Right now everything work.

:start
livestreamer http://www.twitch.tv/MrLlamaSC best -o "streams/MrLlamaSC--%date:~-4,4%.%date:~-10,2%.%date:~-7,2%--%time:~0,2%.%time:~3,2%.%time:~6,2%.flv" -O
timeout 10
goto start

Give a filename like this: MrLlamaSC--2015.24.06--14.44.36.flv

Ty for your help
Julien

Post Reply