How to pipe the FFmpeg output to multiple ffplay?

£可爱£侵袭症+ 提交于 2020-05-28 07:33:21

问题


I use the following command to pipe the FFmpeg output to 2 ffplay , but it doesn't work.

ffmpeg -ss 5 -t 10 -i input.avi -force_key_frames 00:00:00.000 -tune zerolatency -s 1920x1080 -r 25 -f mpegts output.ts  -f avi -vcodec copy  -an - | ffplay -i - -f mpeg2video - | ffplay -i -

How can I pipe the FFmpeg output to 2 (or more) ffplay?

I saw this page but it doesn't work for ffplay. (it is for Linux but my OS is windows)

Please help me

Thanks


回答1:


There's some kind of Tee-Object (alias tee) in PowerShell but I'm not sure if it's similar to the one on Linux. You can try:

ffmpeg -re -i [...] -f mpegts - | tee >(ffplay -) | ffplay -

An alternative is to output to a multicast port on the local subnetwork:

ffmpeg -re -i [...] -f mpegts udp://224.0.0.1:10000

You can then connect as many clients as you require on the same address/port:

ffplay udp://224.0.0.1:10000



来源:https://stackoverflow.com/questions/33662523/how-to-pipe-the-ffmpeg-output-to-multiple-ffplay

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!