New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I sync video and audio on mpegts in libmpeg #290
Comments
In MPEG-TS audio/video have same sample rate (90MHz). libmpeg only generate ts stream, don't include a/v sync function. |
Thanks for your reply! So, can you suggest me some documentation about a/v sync function? I'm a newbie to mpegts. Thanks! |
Just only keep your input a/v frame pts/dts sequential。 From your code:
1000/30 introducing cumulative error. |
try to print out audio/video dts before call mpeg_ts_write? |
Hi author,
I am having problem with mpegts, i have passed video and audio but i don't know what parameter in your library to sync audio and video. Here is my implementation:
void pack_mpegts(const void *buffer, int size, int media_type, int frame_number)
{
static int64_t a_pts = 0;
static int64_t a_dts = 0;
static int64_t v_pts = 0;
static int64_t v_dts = 0;
static int cnt_a = 0;
static int cnt_v = 0;
}
The text was updated successfully, but these errors were encountered: