Replace dropped frames in H264

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

Replace dropped frames in H264

Aviv Hurvitz
I am dealing with a system that transfers H264 over the internet in the
following way:
We break the encoded stream into frames, then we send individual frames
over the network, then we piece the stream back together.

The problem is that due to inadequate network speed we sometimes drop
frames out of the stream. When we piece the stream back together, it has
gaps of course, which corrupts that group-of-frames, but what is worse -
seeking by timestamp is incorrect.

What I want to do is fill the dropped frames with some spacer that will
ensure the video has the correct length and seeks by timestamp will work.

I am willing to replace individual frames or even entire groups-of-frames
to make the seeking work.

The video is fixed rate 25 FPS, has no B frames, has I frames every second.
I know exactly which frames were dropped.
My question is: how do I make the spacer frames? Say, if a P frame was
lost, would it make sense to duplicate the P frame that came before it to
make a spacer?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://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: Replace dropped frames in H264

Aviv Hurvitz
Apologies that my question is hardly related to Ffmpeg. Just trying to tap
into the knowledge of the experts on this user group.

On Tue, Dec 18, 2018 at 10:32 PM Aviv Hurvitz <[hidden email]>
wrote:

> I am dealing with a system that transfers H264 over the internet in the
> following way:
> We break the encoded stream into frames, then we send individual frames
> over the network, then we piece the stream back together.
>
> The problem is that due to inadequate network speed we sometimes drop
> frames out of the stream. When we piece the stream back together, it has
> gaps of course, which corrupts that group-of-frames, but what is worse -
> seeking by timestamp is incorrect.
>
> What I want to do is fill the dropped frames with some spacer that will
> ensure the video has the correct length and seeks by timestamp will work.
>
> I am willing to replace individual frames or even entire groups-of-frames
> to make the seeking work.
>
> The video is fixed rate 25 FPS, has no B frames, has I frames every second.
> I know exactly which frames were dropped.
> My question is: how do I make the spacer frames? Say, if a P frame was
> lost, would it make sense to duplicate the P frame that came before it to
> make a spacer?
>
>
>
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

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