Preserver PCR

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Preserver PCR

Enrico Vittorini
Hello all,
i am receiving an HLS stream and make it as TS at the outptut. I would like to preserve the timestamps.

 ffmpeg -y  -f hls -m3u8_hold_counters 0 -max_reload 1 -live_start_index 0 -copyts -i http://127.0.0.1/origin/index.m3u8 -map 0:p:7 -c copy -f mpegts -muxdelay 0 -muxpreload 0 hls.ts

If i analyze  the original first chunk i have a startime = 0.000884
if i analyze the hls.ts i have a startime= 0.000667

Do not understand why these values are not preserved. Any clue?
thanks



_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Preserver PCR

kumowoon1025
> If i analyze  the original first chunk i have a startime = 0.000884
> if i analyze the hls.ts i have a startime= 0.000667
>
> Do not understand why these values are not preserved. Any clue?

0.000884 looks like it comes from audio with 44.1kHz sample rate. 0.000667 probably comes from the video. See if not specifying 0 muxdelay or muxpreload makes a difference.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Preserver PCR

Enrico Vittorini
thanks for your reply.
With your tip things are better but sitll a difference. Now i have startime = 0.000657.
Do not understand where the little difference comes from.
do you have an idea?

________________________________
From: ffmpeg-user <[hidden email]> on behalf of Ted Park <[hidden email]>
Sent: Monday, December 23, 2019 9:12 PM
To: FFmpeg user questions <[hidden email]>
Subject: Re: [FFmpeg-user] Preserver PCR

> If i analyze  the original first chunk i have a startime = 0.000884
> if i analyze the hls.ts i have a startime= 0.000667
>
> Do not understand why these values are not preserved. Any clue?

0.000884 looks like it comes from audio with 44.1kHz sample rate. 0.000667 probably comes from the video. See if not specifying 0 muxdelay or muxpreload makes a difference.

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Preserver PCR

kumowoon1025
> With your tip things are better but sitll a difference. Now i have startime = 0.000657.
> Do not understand where the little difference comes from.
> do you have an idea?

I am not sure, except for the fact that the number is still a multiple of 1/44100. I think what’s happening is there are audio frames that come before the first video, but not sure why that’s the case if it’s not for the source. Here are some random options you can try though: -copytb 0 / -mpegts_copyts 1 / -omit_video_pes_length 0.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".