<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>Thibault,<br></div><div><br></div><div>Managed to get the pipeline properly writing to a file by setting the proper caps for the framerate.<br></div><div><br></div><div>However, we're unable to output to autovideosink due to a QoS event.<br></div><p class="p1"><span class="s1">videodecoder gstvideodecoder.c:3675:gst_video_decoder_clip_and_push_buf:<avdec_h264-1> Dropping frame due to QoS. start:0:00:00.000000000 deadline:0:00:00.000000000 earliest_time:0:00:03.034568335</span><br></p><div>All the frames get dropped because they are arriving "late"<br></div><div><br></div><div>How would we go about updating the latency for this?<br></div><div><br></div><div>And regarding GES, we have some specific requirements that need finer grained control of the timeline state than what GES allows.</div><div><br></div><div>Thanks,<br></div><div>Luke</div><div><br></div><div class="zmail_extra_hr" style="border-top: 1px solid rgb(204, 204, 204); height: 0px; margin-top: 10px; margin-bottom: 10px; line-height: 0px;"><br></div><div class="zmail_extra" data-zbluepencil-ignore="true"><div><br></div><div id="Zm-_Id_-Sgn1">---- On Tue, 11 Oct 2022 09:58:48 -0700 <b>Thibault Saunier <thibault@saunier.eu></b> wrote ---<br></div><div><br></div><blockquote id="blockquote_zmail" style="margin: 0px;"><div>Hi Rodrigo, <br> <br> <br>That sounds weird I just tested your program and it just works here, <br>ooc, what version of Gst are you using? <br> <br>By the way, you should also commit the composition, emitting the <br>'commit' signal (but for this simple case it will be done <br>automatically). <br> <br>Also, have you checked the GStreamer Editing Services? It is simpler to <br>use and mighthelp with your use case. <br> <br>Regards, <br> <br>- Thibault <br> <br>On Tue, 2022-10-11 at 11:53 -0300, Rodrigo Santos via gstreamer-devel <br>wrote: <br>> Hi, <br>> <br>> I have the following code in Rust that creates a nlecomposition and <br>> adds to it two nleurisource elements. The duration of both sources is <br>> set to 10s, and the start of the second source is set to 10s. The <br>> output is being stored in a file. <br>> <br>> My expectation is that the video file would have a total of 20s of <br>> duration, but its actual duration is 33s: the first video has a <br>> duration of 22s while the second video has 11s of duration. Is this a <br>> bug or am I missing something? <br>> <br>> The weird thing is if I don't change the uri when I create the second <br>> source (both sources having the same value for the uri property) the <br>> resulting video file will have 20s of duration as expected (each <br>> video plays for 10s). <br>> <br>> fn add_to_bin(bin: &Element, element: &Element) { <br>>     let bin = bin.dynamic_cast_ref::<Bin>().unwrap(); <br>>     bin.add_many(&[element]).unwrap(); <br>> } <br>> <br>> fn create_nle_src (uri: &str, start: u64, inpoint: u64, duration: <br>> i64, priority: u32) -> Element { <br>>     let nlesource = ElementFactory::make("nleurisource", <br>> None).unwrap(); <br>> <br>>     nlesource.set_property("uri", uri); <br>>     nlesource.set_property("start", start); <br>>     nlesource.set_property("inpoint", inpoint); <br>>     nlesource.set_property("duration", duration); <br>>     nlesource.set_property("priority", priority); <br>> <br>>     nlesource <br>> } <br>> <br>> fn main() { <br>>     <....> <br>>     let comp = ElementFactory::make("nlecomposition", Some("test- <br>> composition")).unwrap(); <br>>     let caps = "video/x-raw(ANY)"; <br>>     let caps = Caps::from_str(caps).expect("Could not create caps <br>> from str"); <br>>     comp.set_property("caps", caps); <br>> <br>>     let uri = "file:///C:/Users/rodsantos/Downloads/video.mp4"; //big <br>> buck bunny video <br>>     let inpoint = ClockTime::from_seconds(0).nseconds(); <br>>     let duration: i64 = <br>> ClockTime::from_seconds(10).nseconds().try_into().expect("Cast <br>> failed"); <br>>     let mut start: u64 = 0; <br>>     let nlesource= create_nle_src(uri, start, inpoint, duration, 1); <br>> <br>>     add_to_bin(&comp, &nlesource); <br>> <br>>     start += duration as u64; <br>> <br>>     let uri = "file:///C:/Users/rodsantos/Downloads/sintel_trailer- <br>> 480p.webm"; //sintel trailer video <br>>     let duration: i64 = <br>> ClockTime::from_seconds(10).nseconds().try_into().expect("Cast <br>> failed"); <br>>     let nlesource = create_nle_src(uri, start, inpoint, duration, 1); <br>>     add_to_bin(&comp, &nlesource); <br>> <br>>     comp.emit_by_name::<bool>("commit", &[&true]); <br>> <br>>     let videoconvert = ElementFactory::make("videoconvert", <br>> None).unwrap(); <br>>     let compositor = ElementFactory::make("compositor", <br>> None).unwrap(); <br>>     let encoder = ElementFactory::make("x264enc", None).unwrap(); <br>>     let mux = ElementFactory::make("avimux", None).unwrap(); <br>>     let filesink = ElementFactory::make("filesink", None).unwrap(); <br>> <br>>     let pipeline = Pipeline::new(None); <br>>     pipeline.add_many(&[ <br>>         &comp, <br>>         &videoconvert, <br>>         &compositor, <br>>         &encoder, <br>>         &mux, <br>>         &filesink, <br>>     ]).unwrap(); <br>> <br>>     Element::link_many(&[ <br>>         &comp, <br>>         &videoconvert, <br>>         &compositor, <br>>         &encoder, <br>>         &mux, <br>>         &filesink <br>>     ]).unwrap(); <br>> <br>>     filesink.set_property("location", "test.avi"); <br>> <br>>     pipeline.set_state(State::Playing).expect("Could not set pipeline <br>> to Playing state"); <br>>     <br>>    <....> <br>> } <br>> <br>> <br>> Rodrigo Santos <br>> <br>> <br> <br></div></blockquote></div><div><br></div></div><br></body></html>