Hi there.
I've used liquidsoap in the past with audio streams, and it was amazing.
I loved it. So I now want to use it again, but this time with video streams.
Things don't go well so far on that front, so I'm writting with a few
questions regarding liquidsoap functionalities.
TL;DR version:
1) Does "input.udp" support video streams?
2) Where can I see the full list of supported MIME types by
"input.udp"?
3) Can I handle h264/aac input video streams with liquidsoap?
4) Can liquidsoap act solely as
packetizer/muxer/whatever-its-called, or even just as proxy, instead of
fully transcode the output video?
5) Can I read rawvideo without echoing the input on the console?
(please note I DO want to see debug output)
6) Can I use input.ffmpeg with custom commands?
Full version:
My plan is to use LS as live video stream orchestrator (not generator),
with simple use cases such as "output a blank video when the input is
offline" or "switch to this other stream when I say so, without fades or
any other fancy stuff".
This way, I pretend to use LS as an intermediary, between my input
streams (that I may or may not generate myself), and the actual final
encoders (which may not be in the same computer).
I would then receive streams on my server, pass them through liquidsoap,
and then output them to another network endpoint.
This should have low CPU usage, as most of the time liquidsoap should
just be copying the input to another output without touching the video
frames, and the only truly generated video is a blank one.
So, my first test was with the "fallback" function for an UDP input
stream, like this:
input1 = input.udp(
host="127.0.0.1",
port=10001
)
input2 = blank()
source1 = fallback( [ input1, input2 ] )
output.dummy( source1 );
That should read a test mpegts stream sent with ffmpeg, like this:
ffmpeg -re -f lavfi -i testsrc=s=640x480 -cbr 1 -r 25 -c:v
mpeg2video -f mpegts udp://127.0.0.1:10001
This is a typical setup where I receive a video stream via UDP. However,
"fallback" and "dummy" give me type errors regarding "source" type and
the one "input.udp" returns, which in the docs says it's
"active_source", but in the output shows some dynamic type I don't fully
understand ("(?id:_,?buffer:_,_)->_"). I know nothing about ocaml, and
didn't used liquidsoap since about 2012, so I'm kinda slow on this.
Checking online, I've saw some syntax regarding type casting in
liquidsoap (in this case, would be "(input1 : source)"), but didn't
worked either.
In order to change that behaviour, I've also tested the other
"input.udp" parameters, and eventually saw the last unnamed string
param. There I can put a MIME type for my input video. But not a single
MIME type for mpeg2 video worked: they all returned error saying the
MIME type is not recognized. This gave me another doubt. I can see the
docs mentioning "avi" for video input type everywhere. I could change
the liquidsoap's input video type in my example (that is, change mpeg2
to something else, like avi), but I don't want liquidsoap as video
encoder, and forcing avi means that the output must be transcoded to
whatever I need. So, ideally, liquidsoap would be able to handle
different video types (avi, raw, mpeg, h264, and so on).
With this in mind, playing around a while with the options I've found,
I've also tried this:
input1 = input.external.rawvideo(
restart=false,
restart_on_error=false,
"ffmpeg -i udp://127.0.0.1:10001 -f rawvideo pipe:0"
)
But this floods my console with raw video (absolutelly undesirable), and
other external inputs didn't worked either (I can see in the docs almost
all input methods imply audio input).
So now I'm full of doubts about what I can an can't do with liquidsoap
regarding video streams.
I could keep on trying different setups, but I guess maybe it's a good
idea to ask you people about liquidsoap actual functionalities first.
Would anyone please give me a hand with this?
Thank you all.
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users