Page 1 of 1

Record a service from ts udp multicast

Posted: Thu Oct 19, 2017 8:36 am
by danhpt
HI All,
I try record ts from udp multicast
ffmpeg -i udp://224.1.1.1:1234 -vcodec copy -acodec copy -f mpegts "output.ts"
but in udp multicast has many channel, i want select 1 channel in mulchannel
How to edit command line
Program 2140
Metadata:
service_name : HTV2 HD
service_provider: Harmonic
Stream #0:9[0x29]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels
Stream #0:10[0x2a]: Video: h264 ([27][0][0][0] / 0x001B), none, 90k tbr, 90k
tbn
Program 2150
Metadata:
service_name : HTVC - Phim HD
service_provider: TMS
Stream #0:7[0x210]: Video: h264 ([27][0][0][0] / 0x001B), none, 90k tbr, 90k
tbn
Stream #0:8[0x310]: Audio: mp3 ([3][0][0][0] / 0x0003), 0 channels
Thanks

Re: Record a service from ts udp multicast

Posted: Sun Nov 05, 2017 8:52 pm
by navilor
You need to use the "map" option that FFmpeg has to select the specific inputs you want capture. Below are two example command lines, one to capture the audio and video from Program 2140 and another to capture the audio and video from Program 2150.

Code: Select all

ffmpeg -i udp://224.1.1.1:1234 -map 0:10 -map 0:9 -c:v copy -c:a copy -f mpegts Program2140.ts

Code: Select all

ffmpeg -i udp://224.1.1.1:1234 -map 0:8 -map 0:7 -c:v copy -c:a copy -f mpegts Program2150.ts
Additional information regarding map can be found in the FFmpeg documentation below.
https://trac.ffmpeg.org/wiki/Map

https://ffmpeg.org/ffmpeg.html#Stream-selection

Re: Record a service from ts udp multicast

Posted: Tue Apr 16, 2019 6:14 am
by sadon
Hi,
I have 20 multicast channels with different ip, how do i check all are working or not. Your response will be highly appreciated.