sync two streams

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

sync two streams

Jon bae
Hello!

From our office we stream a 576p livestream to a server in the internet. On
this server the stream gets scaled to half. The full and the half stream
gets from there streamed to another server for publishing.

The problem is now that the both streams have a little delay from ~1
second. I found out, that when I would encode both stream new and send them
via the *tee *output from one ffmpeg instance it would be sync. But I don't
want to transcode the full res again.

Have you some tips what I could do, to sync this both streams?

Regards

Jonathan
_______________________________________________
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
|  
Report Content as Inappropriate

Re: sync two streams

Moritz Barsnick
On Tue, Aug 08, 2017 at 08:43:27 +0200, Jon bae wrote:
> The problem is now that the both streams have a little delay from ~1
> second. I found out, that when I would encode both stream new and send them
> via the *tee *output from one ffmpeg instance it would be sync. But I don't
> want to transcode the full res again.
>
> Have you some tips what I could do, to sync this both streams?

Sure, you can send it twice. If you're not recoding with ffmpeg, but
using the "copy" codec, it may suffice to "encode" twice, it shouldn't
impact performance:

$ ffmpeg -i input-stream-url -c copy -f mpegts server-stream-url1 -c copy -f mpegts server-stream-url2

Moritz
_______________________________________________
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
|  
Report Content as Inappropriate

Re: sync two streams

Jon bae
2017-08-12 22:10 GMT+02:00 Moritz Barsnick <[hidden email]>:

> On Tue, Aug 08, 2017 at 08:43:27 +0200, Jon bae wrote:
> > The problem is now that the both streams have a little delay from ~1
> > second. I found out, that when I would encode both stream new and send
> them
> > via the *tee *output from one ffmpeg instance it would be sync. But I
> don't
> > want to transcode the full res again.
> >
> > Have you some tips what I could do, to sync this both streams?
>
> Sure, you can send it twice. If you're not recoding with ffmpeg, but
> using the "copy" codec, it may suffice to "encode" twice, it shouldn't
> impact performance:
>
> $ ffmpeg -i input-stream-url -c copy -f mpegts server-stream-url1 -c copy
> -f mpegts server-stream-url2
>
> Moritz
> _______________________________________________
>

Hi Moritz,
I forgot to write my full command down, because I do this already:

ffmpeg -i rtmp://localhost/live/stream -s 512x288 -c:v libx264 -crf 23
-preset slow -g 25 -c:a copy [...] -f flv rtmp://output1 -c copy -f flv
rtmp://output2

With this command output2 is a bit faster in time then output1. When I
transcode both outputs it would be sync.

Jonathan
_______________________________________________
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".
Loading...