<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi guys,<br>
I am trying to change the pipeline dynamically but do not get it
working. I also did not get splitmuxsrc working but that is a
different story.<br>
<br>
The general idea is recording a rtp live stream to disk and split it
into files of some size or time. For this part splitmuxsink seems to
work well.<br>
<code class="bash plain" style="font-family: Consolas,
"Bitstream Vera Sans Mono", "Courier New",
Courier, monospace; border-radius: 0px; background: 0px center
rgb(255, 255, 255); border: 0px; bottom: auto; float: none;
height: auto; left: auto; line-height: 20px; margin: 0px; outline:
0px; overflow: visible; padding: 0px; position: static; right:
auto; text-align: left; top: auto; vertical-align: baseline;
width: auto; box-sizing: content-box; font-weight: 400;
font-style: normal; font-size: 14px; min-height: inherit; color:
black !important; font-variant-ligatures: normal;
font-variant-caps: normal; letter-spacing: normal; orphans: 2;
text-indent: 0px; text-transform: none; white-space: nowrap;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial;">gst-launch-1.0
-e rtpbin udpsrc caps=</code><code class="bash string"
style="font-family: Consolas, "Bitstream Vera Sans
Mono", "Courier New", Courier, monospace;
border-radius: 0px; background: 0px center rgb(255, 255, 255);
border: 0px; bottom: auto; float: none; height: auto; left: auto;
line-height: 20px; margin: 0px; outline: 0px; overflow: visible;
padding: 0px; position: static; right: auto; text-align: left;
top: auto; vertical-align: baseline; width: auto; box-sizing:
content-box; font-weight: 400; font-style: normal; font-size:
14px; min-height: inherit; color: rgb(42, 0, 255) !important;
font-variant-ligatures: normal; font-variant-caps: normal;
letter-spacing: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: nowrap; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial;">"application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)H264"</code><span
style="color: rgb(51, 51, 51); font-family: Consolas,
"Bitstream Vera Sans Mono", "Courier New",
Courier, monospace; font-size: 14px; font-style: normal;
font-variant-ligatures: normal; font-variant-caps: normal;
font-weight: 400; letter-spacing: normal; orphans: 2; text-align:
left; text-indent: 0px; text-transform: none; white-space: nowrap;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); text-decoration-style:
initial; text-decoration-color: initial; display: inline
!important; float: none;"><span> </span></span><code class="bash
plain" style="font-family: Consolas, "Bitstream Vera Sans
Mono", "Courier New", Courier, monospace;
border-radius: 0px; background: 0px center rgb(255, 255, 255);
border: 0px; bottom: auto; float: none; height: auto; left: auto;
line-height: 20px; margin: 0px; outline: 0px; overflow: visible;
padding: 0px; position: static; right: auto; text-align: left;
top: auto; vertical-align: baseline; width: auto; box-sizing:
content-box; font-weight: 400; font-style: normal; font-size:
14px; min-height: inherit; color: black !important;
font-variant-ligatures: normal; font-variant-caps: normal;
letter-spacing: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: nowrap; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial;">address=232.0.0.1
port=5000 ! rtph264depay ! h264parse ! splitmuxsink location=~</code><code
class="bash plain" style="font-family: Consolas, "Bitstream
Vera Sans Mono", "Courier New", Courier, monospace;
border-radius: 0px; background: 0px center rgb(255, 255, 255);
border: 0px; bottom: auto; float: none; height: auto; left: auto;
line-height: 20px; margin: 0px; outline: 0px; overflow: visible;
padding: 0px; position: static; right: auto; text-align: left;
top: auto; vertical-align: baseline; width: auto; box-sizing:
content-box; font-weight: 400; font-style: normal; font-size:
14px; min-height: inherit; color: black !important;
font-variant-ligatures: normal; font-variant-caps: normal;
letter-spacing: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: nowrap; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial;">/video</code><code
class="bash plain" style="font-family: Consolas, "Bitstream
Vera Sans Mono", "Courier New", Courier, monospace;
border-radius: 0px; background: 0px center rgb(255, 255, 255);
border: 0px; bottom: auto; float: none; height: auto; left: auto;
line-height: 20px; margin: 0px; outline: 0px; overflow: visible;
padding: 0px; position: static; right: auto; text-align: left;
top: auto; vertical-align: baseline; width: auto; box-sizing:
content-box; font-weight: 400; font-style: normal; font-size:
14px; min-height: inherit; color: black !important;
font-variant-ligatures: normal; font-variant-caps: normal;
letter-spacing: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: nowrap; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial;">%02d.mp4
max-size-</code><code class="bash functions" style="font-family:
Consolas, "Bitstream Vera Sans Mono", "Courier
New", Courier, monospace; border-radius: 0px; background: 0px
center rgb(255, 255, 255); border: 0px; bottom: auto; float: none;
height: auto; left: auto; line-height: 20px; margin: 0px; outline:
0px; overflow: visible; padding: 0px; position: static; right:
auto; text-align: left; top: auto; vertical-align: baseline;
width: auto; box-sizing: content-box; font-weight: 400;
font-style: normal; font-size: 14px; min-height: inherit; color:
rgb(255, 20, 147) !important; font-variant-ligatures: normal;
font-variant-caps: normal; letter-spacing: normal; orphans: 2;
text-indent: 0px; text-transform: none; white-space: nowrap;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial;">time</code><code
class="bash plain" style="font-family: Consolas, "Bitstream
Vera Sans Mono", "Courier New", Courier, monospace;
border-radius: 0px; background: 0px center rgb(255, 255, 255);
border: 0px; bottom: auto; float: none; height: auto; left: auto;
line-height: 20px; margin: 0px; outline: 0px; overflow: visible;
padding: 0px; position: static; right: auto; text-align: left;
top: auto; vertical-align: baseline; width: auto; box-sizing:
content-box; font-weight: 400; font-style: normal; font-size:
14px; min-height: inherit; color: black !important;
font-variant-ligatures: normal; font-variant-caps: normal;
letter-spacing: normal; orphans: 2; text-indent: 0px;
text-transform: none; white-space: nowrap; widows: 2;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial;">=90000000000
max-size-bytes=100000000<br>
</code>The next step is playing it back (a bit like a DVR) as a
playlist or chunks/files (as rtp again). This is where i struggle.
My pipeline looks basically like this:<br>
gst-launch-1.0 rtpbin name=rtpbin <br>
filesrc location=/home/user/video00.mp4 ! qtdemux ! h264parse !
rtph264pay ! capsfilter 'application/x-rtp,ssrc=(uint)1356955624' !
rtpbin.send_rtp_sink_0 <br>
rtpbin.send_rtp_src_0 ! udpsink
port=5000 <br>
rtpbin.send_rtcp_src_0 ! udpsink port=5001
sync=false async=false <br>
udpsrc port=5005 ! rtpbin.recv_rtcp_sink_0<br>
<br>
(I was expecting splitmuxsrc to work in the reverse way but it did
not somehow and the limitation to the pattern is not exactly what I
need anyway.)<br>
Then I was trying it with concat what works well but I want to add
new files to the playlist dynamically and seek between them. So I
was writing some code and trying to dynamically change the pipeline
(like in the documentation page with the same name).<br>
So first I tried to find a signal or event at the filesrc which
tells me when I need to read the next element. I was expecting EOS
for example but did not get it there.<br>
Then I found out the EOS seems to get created by the demuxer and I
tried to probe it there. In the blocking probe I tried to change the
location of the filesrc but it complains then.<br>
So I tried to change the state to null for the filesrc, change the
location and set the state back to playing. Then I got errors about
demux.sink was in push mode - which I do not understand. I also got
errors telling me I am in the wrong thread for the change.<br>
How can it be the wrong thread for me when the example does it in
the same way and place?<br>
However just to be sure I also tried two different filesrc elements
and creating a new one but I end up with the same thing all the
time.<br>
I also tried a idle callback on the filesrc which did not kick in
and a g_idle_add was also not working out for me.<br>
<br>
What is the correct or best way to achieve this? What is my mistake
here?<br>
<br>
Thanks<br>
Alex<br>
<br>
<code class="bash plain" style="font-family: Consolas,
"Bitstream Vera Sans Mono", "Courier New",
Courier, monospace; border-radius: 0px; background: 0px center
rgb(255, 255, 255); border: 0px; bottom: auto; float: none;
height: auto; left: auto; line-height: 20px; margin: 0px; outline:
0px; overflow: visible; padding: 0px; position: static; right:
auto; text-align: left; top: auto; vertical-align: baseline;
width: auto; box-sizing: content-box; font-weight: 400;
font-style: normal; font-size: 14px; min-height: inherit; color:
black !important; font-variant-ligatures: normal;
font-variant-caps: normal; letter-spacing: normal; orphans: 2;
text-indent: 0px; text-transform: none; white-space: nowrap;
widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration-style: initial; text-decoration-color: initial;"></code>
</body>
</html>