Log in

View Full Version : Using Avisynth with ffmpeg streaming, framecount problem.


dsn79
10th January 2014, 16:27
Hi,
I´m stuck in a problem with a test doing multicast streaming from a Viewcast Osprey 700e HD using ffmpeg.
The thing is that I´ve to use avisynth(with graphedit) for ffmpeg recognize the card. The streaming has no ending time,
is a live channel for IPTV.
The script is working well, but the problem is the avisynth config, because I have to specify the countframe option,
i think this is for the duration of the clip, but I need an infinity streaming.

The is script is:

ffmpeg -i espnhd.avs -rtbufsize 100000k -r 30 -c:v mpeg2video -b:v 5120k -s 1280x720 -g 100 -q:v 2 -c:a ac3 -b:a 256k -f mpegts udp://239.192.42.61:1234

The espnhd.avs file is:

v=directshowsource("espnhdv.GRF", pixel_type="YUV", framecount=1000000, fps=30, audio=False, convertfps=false)
A=directshowsource("espnhda.GRF", fps=30, framecount=1000000, video=False, convertfps=false)
AudioDub(V, A)
loop()

When i run the application, work fine but the streaming ends when 1000000 frames it´s encoded...
If i dont specify framecount, ffmpeg doesn´t start with the following error, can´t determine the duration of the clip.

Is there any way to specify an inifinity duration on avisynth?

Best regards, Diego.

turbojet
13th January 2014, 08:56
Try adding Loop() at the end. It's not infinite but a long time.

Gavino
13th January 2014, 10:34
Loop() by default will multiply the frame count by 10 million, which will cause the count to overflow on a 1 million frame source.

Apart from that, it will also start requesting frames from zero again at the start of each loop period, which may not work here.

Since the framecount is a 32-bit integer, there's no need to limit it to 1000000 in the call to DirectShowSource(). You can use 2000000000 (2 billion) which is equivalent to about 80 days.

dsn79
27th January 2014, 19:49
Thanks for the quickly response.
I tried with a 18144000 framecount, works for 3 hours but then the ffmpeg show´s "There is not enough space"...

Another thing is the memory process grows up very fast.

When ffmpeg starts, the usage memory is 92.356k, but two hours later is 1,352,144k.

Any suggest will be appreciate.
Diego