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 6972317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:57:08+00:00 2026-05-27T16:57:08+00:00

I modify the OpenRtspClient so that Now instead of writing frames to file I

  • 0

I modify the OpenRtspClient so that

  • Now instead of writing frames to file I collect them in a queue with incoming presenttaion times

  • Then give the h264 frames to MP4 muxer [ Geraint Davies MP4 mux filter]

  • Finally write muxed data to file…

So I can able to save h264 stream into MP4 container…

But the problem is that, some of the recorded data [NOT all of them]
has wrong values for time duration:

Suppose that a 10 minute record seems that it was 12 h stream…
VLC play the 10 minute that play last frame for the remaing time.

It seems that i set sample times wrong into the Muxer…
Then i debug and see that there is positive and negative dramatic jumps at time stamps…

Here is how i set time stamps:

  • Firts i take presentationTime from H264VideoFileSink::afterGettingFrame1 function
  • Then calculate the firstPresentaionTime [ at the beginning]
  • Then collect other timestamps

And I see that frameTimeStamp values show dramatic jumps to negative or positive values…[ i keeep those values as int64 ]

#define TIMEVAL_TO_REFERENCE_TIME(x) 
      ((__int64)(x.tv_sec * 1000000) + x.tv_usec) * 10

void  H264VideoFileSink::
 afterGettingFrame1(unsigned frameSize, struct timeval presentationTime) 
{

    // At the beginning [ just for once calculate firstPresentaionTime ]

    firstPresentaionTime = TIMEVAL_TO_REFERENCE_TIME(presentationTime);

    // for the other frames collect frames timestamps

    frameTimeStamp = TIMEVAL_TO_REFERENCE_TIME(presentationTime) - 
firstPresentationTime

    }

What my cause this?

  • Or is it agood idea to use this “presentationTime” for a MP4 Muxer?
  • Where the “presentationTime” is calculated at library?
  • Is it possible that H264VideoFileSink::afterGettingFrame1 method “presentationTime” values may be wrong?
  • Anybody record h264 stream in a mp4 contianer and wanted to share his/her experience?
  • 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-27T16:57:09+00:00Added an answer on May 27, 2026 at 4:57 pm

    In partial answer to your question:

    • Where the “presentationTime” is calculated at library?
    • Is it possible that H264VideoFileSink::afterGettingFrame1 method “presentationTime” values may be wrong?
    • the presentation time is based on the RTP timestamp of the sample.
    • Unlikely, we have been using live555 for a fairly long period without any timestamp issues. If the timestamps are incorrect, I would suspect that the timestamp is wrong at the RTP source i.e. the RTSP server or camera. It may or may not be helpful to sniff the RTP packets with wireshark to look at the RTP timestamps and then convert back into NTP time from there to see what the difference is between consecutive frames.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I modify a SharePoint site so that versioning is turned on by
I need to modify a (xml-)file from Apache Ant. loadfile task allows to load
Is it possible to modify/write data to an XML file without any server-side proxy(e.g.
I would like to modify a Spotlight metadata attribute of a file within my
I'm trying to modify some exports. I understand that this code doesn't work because
I'm attempting to modify an inherited project that has a convoluted process of displaying
I want to modify an existing Perforce label using a script that I can
How could I modify this VBScript to return only the newest file's name and
Is it possible to modify the script below so that the value of each
I want to modify my current script so that when you click on the

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.