Comments (6)
Thank you for question.
Since this is only a wrapper library, you have to know about
original openh264 implementation.
Regarding from the article below, time stamp is two frames time interval in ms.
cisco/openh264#2391
And openh264 have rate control flag.
The flags are RC_QUALITY_MODE, RC_BITRATE_MODE, RC_TIMESTAMP_MODE, and so on.
Currentry, in my OpenH264Lib, bit rate control flag is 'RC_QUALITY_MODE'
in Encoder::Setup function.
So, it might be set
base.iRCMode = RC_TIMESTAMP_MODE;
instead of
base.iRCMode = RC_QUALITY_MODE;
If so, my OpenH264Lib have timestamp argument in Encode function,
but it is not work correctry.
from openh264lib.net.
Handling timestamp processing was incorrect.
It seems that I do not have to modify timestamp manually.
I deleted timestamp argument in encode function.
Encode(Bitmap, timestamp) function is obsoleted.
Please use Encode(Bitmap) function instead.
from openh264lib.net.
@secile how can I encode frames that were can captured with no set framerate then? I have the timestamps, why was this tribes, how can I get the same functionality, I need to line up the frames with the audio, and they weren't captured at a set framerate
from openh264lib.net.
Hello! You are saying that you have images and audio sampling data with different frame rate? You have images and audios that are not regularly sampled?
Anyway, openh264 requires frame rate parameter, so I think you have to calculate frame rate from timestamps, and you need to complement lacked image.
from openh264lib.net.
@secile no that would be impossible since it's not a set rate, I know you had a timestamp parameter before but it was "obsolete", in the original dll there is probably a way to do it
from openh264lib.net.
Encode(bmp, timestamp) overload is obsoleted because it seemed that timestamp value is not effect to output h264 frame data.
As I writed above, My library uses 'RC_QUALITY_MODE'. It may work fine if change the mode to 'RC_TIMESTAMP_MODE'. I don't know it works as you expected, but I will describe how to use timestamp and 'RC_TIMESTAMP_MODE'.
Even thought you use 'RC_TIMESTAMP_MODE', you have to pass fps parameter in Setup(). Set fps as maximum frame rate value.
[Encoder.cpp]
line48: add argument 'float timestamp'.
line60: uncomment the line.
line38: add argument 'float timestamp'.
line42: replace to 'int rc = Encode(ptr, timestamp)'
line24: add argument 'float timestamp'.
line30: replace to 'int rc = Encode(i420, timestamp)'
line18-21:delete lines
line125: replace from 'RC_QUALITY_MODE' to 'RC_TIMESTAMP_MODE'.
[Encoder.h]
line44: add argument 'float timestamp'.
line45: add argument 'float timestamp'.
line46: add argument 'float timestamp'.
line41-42:delete lines
[Your project]
call Encode(bmp, timestamp)
timestamp is two frame time interval in second.
from openh264lib.net.
Related Issues (17)
- Decoder Samples HOT 2
- Encoded video play speed(frame interval) seems depended on fps. HOT 2
- H264 Stream freezes when generating IDR Frames HOT 2
- Unable to play H264 Stream from Ambarella Camera HOT 1
- Repetition in Metadata
- "Could not load file or assembly 'OpenH264Lib.dll' or one of it's dependencies" message on Win 10 vbox/vmware HOT 5
- How to get more then one layer onEncode? Is it possible? HOT 7
- RGB to YUV420 mistake HOT 1
- can not decode frame if I use cisco's openh264 dll version 2.1.0 or later. HOT 2
- Thanks ~!~! Mr.secile HOT 1
- Missing dll HOT 3
- Exception thrown: 'System.IO.FileNotFoundException' HOT 5
- How to use by AnyCPU? HOT 6
- How to display frames(I,P,B) HOT 1
- Lib can work with .h264 file or .h265 (hevc) ? HOT 2
- Decode method returns null image HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openh264lib.net.