Open ngovanquang opened 1 year ago
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:
v_dts += 1000 / 30 * 90;
1000/30 introducing cumulative error.
Thanks for your help, I still have a problem when I stream mpegts audio and video over my local network and play with vlc, I get the error as shown below. But when i only stream video, the error not occur
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;
}