First I need to know how to add the metadata for the Major Channel and Minor Channel to the transport stream. My current command line is:
This generates a 10 second long transport stream with a test video source, with a frame rate of 30fps, and an image size of 640x480 (aka 480p). The output is an MPEG TS file with an MPEG2 compressed video stream and a GOP size of 30 frames (one second of video per GOP). The video bit rate is 3000kbps and the overall bitrate is padded out to 19390kbps as required by the ATSC specification. But there's one problem still. Most TVs don't let you set the actual frequency to receive. Instead autodetect the frequencies of all available ATSC broadcasts, and decode the channel number meta data, and then associate that meta data with the frequency in a database in the TV's memory. So when you select a TV channel to watch you are using that channel's major and minor numbers (like 13.1) to cause the TV to look up the frequency for that channel in its stored database, which it then tunes to. So if I can't add a major and minor channel number to the MPEGTS stream, it won't be usable with most TVs as there would be no channel number for the TV to store in its database to associate with the frequency. I need to know the FFMPEG command line switches to store the channel number metadata in the MPEGTS stream.Code:ffmpeg -f lavfi -i testsrc2=rate=30:duration=10:size=640x480 -c:v mpeg2video -g 30 -b:v 3000k -muxrate 19390k test.ts
My plan is to then send the MPEGTS file with FFMPEG either using a UDP or TCP protocol over an Ethernet cable from my computer to an ATSC transmitter. But the problem is I don't know what ATSC transmitters accept an MPEGTS stream over an Ethernet cable. I know there are some relatively inexpensive (read as about $500) ATSC transmitters that accept an HDMI cable for direct input of digital video, but then those transmitters need to do the extra step of MPEG2 encodiing the video and then packing it in an MPEGTS stream before sending it onto the other data preparation and modulator circuits. With FFMPEG I can easily generate the MPEG2 compressed video in an MPEGTS stream, right in the computer itself. I just need to know if an ATSC transmitter out there exists that accepts such an MPEGTS stream delivered in TCP or UDP over an Ethernet cable.
+ Reply to Thread
Results 1 to 7 of 7
bellow some hints - complete is slightly more complex - should work as it work in real broadcast environment before
@set muxrate=19390400.0 @set mpegts=-start_at_zero -muxrate %muxrate% -mpegts_original_network_id 4 -mpegts_transport_stream_id 4 -mpegts_service_id 4 -mpegts_pmt_start_pid 32 -mpegts_start_pid 64 -streamid 0:512 -metadata service_provider="youasaprovider" -metadata service_name="H.264 MP@HL" -tables_version 0 -mpegts_service_type 0x11 @ffmpeg -re -y -hide_banner -loglevel 8 -stats -f lavfi -i %video% -c:v mpeg2video -profile:v 4 -level:v 4 -mpv_flags +skip_rd+strict_gop -q:v %qpval% -maxrate:v 18500K -bufsize:v 1835k -flags:v +ilme+ildct+cgop+low_delay+qscale -slices %slice% -thread_type +slice+frame -dc 10 -intra -g %gop% -bf 0 -top 1 -non_linear_quant 0 -alternate_scan 1 -seq_disp_ext 1 -sc_threshold 2G -me_method 0 -motion_est 0 -subq 0 -mbd 0 -precmp zero -skipcmp zero -ps 1316 -color_primaries 1 -color_trc 1 -colorspace 1 -color_range 2 -an -dn -sn -f mpegts %mpegts% -y udp://188.8.131.52:5000?pkt_size=1316
Most of those commandline switches I think are undocumented. Can you explain if they are all do, and also if they are all actually needed to successfully generate an MPETGTS stream that fits the ATSC specification? And where did the muxrate of 19390400 come from? I thought that the official specification required a muxrate of 19390000.
Also can you answer the second question from my original post? That is, where can I buy an ATSC transmitter that I can connect to my computer via an Ethernet cable?
Perhaps you should verify each of them with ffmpeg documentation (since 2016 till now ffmpeg could do some changes).
ATSC specification should be your reference (particularly for PSI/SI structure for ATSC).
So muxrate shall be:
Here is an example of an inexpensive HDMI to ATSC converter https://www.amazon.com/Modulator-Route-1080P-Ethernet-Setting/dp/B08B1VWPLP/ It can only create one channel per RF frequency and includes a built-in signal combiner to add that channel to an existing RF distribution set-up.
[Edit] This is another relatively inexpensive model: https://www.channelmaster.com/products/atsc-hd-modulator-hdmi-to-coax Unfortunately it's currently out of stock.
I have a SiliconDust HDHomerun Prime QAM tuner that does the reverse of what you want to do, (QAM RF in via coax, transport stream for one channel out via ethernet.) I haven't seen anything for consumers that would accept a transport stream delivered via ethernet and turn it into an ATSC RF signal.
Last edited by usually_quiet; 21st Dec 2021 at 22:54.Ignore list: hello_hello, tried, TechLord, Snoopy329
I know this is a bit old of a thread, but I'm still curious about one thing, something that your post didn't answer, despite it being a question in my opening post. And that question is how do I set the major-channel and minor-channel numbers? ATSC can transmit on one frequency (that corresponds to RF channel 5, for example) while using a different channel number for ease of use on a consumer TV, a number which in ATSC is purely metadata (for example 14.2) and has nothing to do with the frequency it's transmitting on. It's a 2 part channel number. In the previous example, the first part (the number 14) is the major-channel number, and the second part (the number 2) is the minor channel number.
How do you set the major and minor channel numbers in the MPEGTS stream in FFMPEG? If it's even possible, it would certainly be an undocumented feature, as I can't find anything on the internet saying how to do it.
ATSC PSIP editor i believe... and to be honest knowing how this industry works i doubt if you find something open sourced or free... Try at https://github.com/tvheadend and similar projects...
A/65 and A/69 seem to be most accurate answer for your question in terms of the technology itself.
In Europe PSI/SI structure is slightly different than in ATSC countries and feature you are searching for is called LCN (Logical Channel Numbering).