📜 ⬆️ ⬇️

Multicast streaming video files using tsplay

Good day.

There was a need to broadcast video files to the network (movie trailers). The first thought that arose in my head (and you, too, probably?) Is VLC. Installed VLC, configured, launched and the result: everything works. Half an hour later, I notice that sometimes the image is poured. I sin on a disk subsystem. An hour later, I understand that some heavy files are very heavy, and some are perfect. I open the TS-streams analyzer and see (IAT jumps strongly when switching to another trailer):

image
')
Transport flow is imperfect, probably VLC is to blame? Seeking another broadcast software and find tsplay.
Under the cat there is a small instruction for launching the broadcast of the file list via tsplay.
Immediately show the results of the analyzer when broadcasting using tsplay:

image



The tsplay program is included in the software package called tstools.

Sources: code.google.com/p/tstools/downloads/list
Official website: tstools.berlios.de

Debian / Ubuntu users are lucky, you can install from repositories.
The rest will have to download the source, unpack and run make. I hope to describe this process is not necessary?

To start the broadcast run:
tsplay filename.ts 1.2.3.4:5500 

Looping:
 tsplay filename.ts 1.2.3.4:5500 -loop 

And we read only the first 1000 TS packages:
 tsplay filename.ts 1.2.3.4:5500 -loop -m 1000 

I wrote a simple loop that in turn broadcasts all the .ts files from the current directory:
 while true; do for i in `ls | grep .ts`; do tsplay $i 239.255.10.156:1234; done; done; 

I threw it into the screen and forgot, it has been working stably for weeks.

Computer resources do not eat at all. I hope someone will come in handy. See other programs from the tstools suite. Good luck.

Source: https://habr.com/ru/post/154349/


All Articles