Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6237081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:57:46+00:00 2026-05-24T10:57:46+00:00

I wrote a little HTTP video streaming server using GStreamer. Essentially the client does

  • 0

I wrote a little HTTP video streaming server using GStreamer. Essentially the client does a GET request and receives a continuous HTTP stream.

The stream should be sent synchronously, i.e. at the same speed as the bitrate is. Problem is that some players (mplayer is a prominent example) don’t buffer variable bitrate content well, thus lacking every other second.

I want to circumvent the buffer underruns by transmitting the first, say, 5 MB immediately, ignoring the pipeline’s clock. The rest of the stream should be transmitted at the appropriate speed.

I figured setting the fdsink sync=TRUE for the first 5 MB, and sync=FALSE from then on should do the trick, but that does not work, as the fdsink patiently waits for the pipeline clock to catch up to the already sent data. In my test with a very low bitrate, there is no data transmitted for quite some seconds.

My fdsink reader thread currently looks like this:

static void *readerThreadFun(void*) {
    int fastStart = TRUE;
    g_object_set(G_OBJECT(fdsink0), "sync", FALSE, NULL);
    for(uint64_t position = 0;;) {
        // (On the other side there is node.js,
        // that's why I don't do the HTTP chunking here)
        ssize_t readCount = splice(gstreamerFd, NULL, remoteFd,
                NULL, 1<<20, SPLICE_F_MOVE|SPLICE_F_MORE);
        if(readCount == 0) {
            break;
        } else if(readCount < 0) {
            goto error;
        }
        position += readCount;
        if(fastStart && position >= 5*1024*1024) {
            fastStart = FALSE;
            g_object_set(G_OBJECT(fdsink0), "sync", TRUE, NULL);
        }
    }
    ...
}

How can I make GStreamer “forget” the duration the wall clock has to catch up with? Is there some “reset” function? Am I misunderstanding sync? Is there another method to realize a “fast start” in GStreamer?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:57:47+00:00Added an answer on May 24, 2026 at 10:57 am

    That’s not quite the solution I was looking for:

    gst_base_sink_set_ts_offset(GST_BASE_SINK(fdsink0), -10ll*1000*1000*1000);

    The sink will stream the first 10 seconds immediately.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wrote a little search script for a client, it works and words get
First a little intro: Last year i wrote this http://dragan.yourtree.org/code/canvas-3d-graph/ Now, i want to
i wrote a little addin, which does some formatting of my C# code. in
I wrote a little drawing script (canvas) for this website: http://scri.ch/ When you click
I just installed Ubuntu 10.10 server with NodeJS 0.4.6 using this guide: http://www.codediesel.com/linux/installing-node-js-on-ubuntu-10-04/ on
I wrote a little wrapper using beautifulsoup great html parser recently I tried to
I wrote little WPF application with 2 threads - main thread is GUI thread
I wrote a little daemon in Perl that calls up FFMpeg to encode a
i wrote a little test programm which queries the status servlet of a tomcat
I wrote a little monkeypatch to the Rails MySQLAdapter and want to package it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.