AC-4 Audio?

ATSC 3.0 Forum
Post Reply
bobchase
Posts: 81
Joined: Sun Nov 22, 2020 12:25 pm
Device ID: 10810736
x 10

Re: AC-4 Audio?

Post by bobchase »

The ATSC3.0 standard requires the broadcast to be AC4. That is not to say that *all* the stations are, after all some are broadcasting 1080i. A few years back some of the encoders were not AC4 approved. However, the seven encoder brands I've used all have AC4 as an audio option.

hdhruser
Posts: 16
Joined: Mon Dec 31, 2012 6:32 pm

Re: AC-4 Audio?

Post by hdhruser »

I was looking to see if any progress has been made on adding AC-4 support to FFMPEG, because that is the key to getting AC-4 audio to work in most if not all of the video player software out there. Virtually everything relies on FFMPEG and so far there has been little progress aside from richardpl's fork, which none of the major projects seem to want to use, most likely because it is a fork and not officially supported, but also possibly because one gets the impression that it's not quite fully functional yet, and nothing new has been added in the last three months.

But something I was not aware of until today is that some people want this badly enough that they are offering a small bounty for this addition to ffmpeg. At the moment it stands at $210, which I realize may not be enough to motivate a professional programmer with a bunch of degrees after their name, but maybe it's enough to motivate someone to work on this. I have no doubt that sooner or later someone will get it done, I just hope it will be sooner rather than later.

If for some reason someone doesn't care to work on ffmpeg, I suppose it would be perfectly acceptable to have a standalone piece of software that does nothing other than receive a video file or stream with AC-4 audio (in .ts or .mp4 format), and create an output where the video and any data streams are simply copied, but the audio is converted from ac-4 to ac-3 or eac-3, and the output is a stream or a file. Would not qualify for the bounty, of course, but it would also mean you would not have to wait to see if or when the FFMPEG developers would accept your patch.

RonRN18
Posts: 22
Joined: Sun Jan 24, 2016 2:04 pm

Re: AC-4 Audio?

Post by RonRN18 »

Has anyone been able to get the richardpl's AC4 branch to work without audio hiccups? I have compiled it in a Linux VM and wrote a script that allows me to convert a video file with AC4 audio into other formats and into another output file. The problem that I am having is that while it does work, it has audio glitches every few seconds. For the most part, I can understand the audio quite well, it is just the little hiccups every few seconds that I find annoying. At the moment, all of my tests have been from samples I've been able to download over the Internet so it IS possible I'm dealing with a faulty input and GIGO. I'll be able to test that hypothesis in a few days, as our first ATSC 3.0 lighthouse station is supposed to go live on Tuesday. In case anyone is curious as to my conversion script, it is below:

Code: Select all

#!/bin/sh
args_no=1
while [ $args_no -le $# ]
do
  case "$1" in
    -i)
      INFILE="$2"
      shift 2
      ;;
    -o)
      OUTFILE="$2"
      shift 2
      ;;
    -a)
      CODEC="$2"
      shift 2
      ;;
    *)
      echo "WTF? $1"
      shift
      ;;
  esac
done

ffmpeg \
  -i "${INFILE}" \
  -f lavfi -i movie="${INFILE}[out+subcc]" \
  -map 0 -map 1:s \
  -codec:v copy \
  -codec:a "${CODEC}" \
  -codec:s srt \
  -metadata:s:s:0 language=eng \
  "${OUTFILE}"
While this script still needs to be run from a command line, it makes it easier for me to test things. I call this script "atsc3.sh" and make it executable (duh!... chmod +x atsc.sh) and I've copied it to my /usr/local/bin folder, which allows me to run it from anywhere. Say I have a test file called "test.ts" and I want to convert the audio using AC3. I would enter "atsc3.sh -i test.ts -o test.mkv -a ac3". When I run the script, the following is the output:

Code: Select all

ffmpeg version git-2021-03-13-79236061bd Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10 (Ubuntu 10.3.0-1ubuntu1)
  configuration: 
  libavutil      56. 68.100 / 56. 68.100
  libavcodec     58.131.100 / 58.131.100
  libavformat    58. 74.100 / 58. 74.100
  libavdevice    58. 12.100 / 58. 12.100
  libavfilter     7.109.100 /  7.109.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
[ac4 @ 0x55b3e95f5e40] substream audio data underread: 4414
[ac4 @ 0x55b3e95f5e40] overread
[mpegts @ 0x55b3e95d1940] PES packet size mismatch
[mpegts @ 0x55b3e95d1940] Packet corrupt (stream = 1, dts = 127221418).
Input #0, mpegts, from 'test.ts':
  Duration: 00:00:45.01, start: 1368.559667, bitrate: 3603 kb/s
  Program 3 
  Stream #0:0[0x31]: Video: hevc (Main 10) ([36][0][0][0] / 0x0024), yuv420p10le(tv), 1920x1080 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 59.94 tbc
  Stream #0:1[0x32]: Audio: ac4 (AC-4 / 0x342D4341), 48000 Hz, 5.1(side), fltp
  Stream #0:2[0x33]: Audio: ac4 (AC-4 / 0x342D4341), 48000 Hz, stereo, fltp
  Stream #0:3[0x39]: Audio: ac4 (STPP / 0x50505453), 48000 Hz, mono, fltp
[ac4 @ 0x55b3e970f600] substream audio data underread: 4414
[ac4 @ 0x55b3e970f600] overread
[mpegts @ 0x55b3e96077c0] PES packet size mismatch
[mpegts @ 0x55b3e96077c0] Packet corrupt (stream = 1, dts = 127221418).
Input #1, lavfi, from 'movie=test.ts[out+subcc]':
  Duration: N/A, start: 1368.609722, bitrate: N/A
  Stream #1:0: Video: rawvideo (Y3[11][10] / 0xA0B3359), yuv420p10le, 1920x1080 [SAR 1:1 DAR 16:9], 59.94 fps, 59.94 tbr, 90k tbn, 90k tbc
  Stream #1:1: Subtitle: eia_608
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (ac4 (native) -> ac3 (native))
  Stream #0:2 -> #0:2 (ac4 (native) -> ac3 (native))
  Stream #0:3 -> #0:3 (ac4 (native) -> ac3 (native))
  Stream #1:1 -> #0:4 (eia_608 (cc_dec) -> subrip (srt))
Press [q] to stop, [?] for help
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 4414
[ac4 @ 0x55b3e9a5ed40] overread
Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf58.74.100
  Stream #0:0: Video: hevc (Main 10) ([36][0][0][0] / 0x0024), yuv420p10le(tv), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 59.94 fps, 59.94 tbr, 1k tbn, 90k tbc
  Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 kb/s
    Metadata:
      encoder         : Lavc58.131.100 ac3
  Stream #0:2: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s
    Metadata:
      encoder         : Lavc58.131.100 ac3
  Stream #0:3: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, mono, fltp, 96 kb/s
    Metadata:
      encoder         : Lavc58.131.100 ac3
  Stream #0:4(eng): Subtitle: subrip
    Metadata:
      encoder         : Lavc58.131.100 srt
[Parsed_movie_0 @ 0x55b3e9609c40] EOF timestamp not reliablebitrate=  13.1kbits/s speed=0.014x     
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2121
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 5906 bitrate=   7.4kbits/s speed=0.0247x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2108
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 4958 bitrate=   2.8kbits/s speed=0.0652x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 4027
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9602ac0] invalid aspx num env: 6 (class 3).40 bitrate=   1.8kbits/s speed=0.102x    
Error while decoding stream #0:1: Invalid data found when processing input
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 6158
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 5498
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 3206
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 5861 bitrate=   1.3kbits/s speed=0.138x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 911
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2104 bitrate= 189.4kbits/s speed=0.173x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2079
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 1261 bitrate= 789.9kbits/s speed=0.206x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 1650
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 896
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 1942 bitrate=1103.0kbits/s speed=0.234x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9602ac0] substream audio data overread: 7
Error while decoding stream #0:1: Invalid data found when processing input
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 1223 bitrate=1448.1kbits/s speed=0.266x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 3031
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 486
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2357 bitrate=1719.5kbits/s speed=0.296x    
[ac4 @ 0x55b3e9a5ed40] overread
[matroska @ 0x55b3e978bac0] Non-monotonous DTS in output stream 0:3; previous: 19022, current: 19014; changing to 19022. This may result in incorrect timestamps in the output file.
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 5044
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2469
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2504 bitrate=1826.5kbits/s speed=0.329x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 917
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 9171 bitrate=2016.6kbits/s speed=0.358x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 917
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 5113 bitrate=2154.0kbits/s speed=0.39x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2089
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9602ac0] substream audio data overread: 6
Error while decoding stream #0:1: Invalid data found when processing input
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 4664 bitrate=2287.3kbits/s speed=0.419x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2064
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2486
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 5922 bitrate=2373.4kbits/s speed=0.452x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 5207
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 3994 bitrate=2463.9kbits/s speed=0.482x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 3189
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 1263 bitrate=2597.1kbits/s speed=0.512x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2790
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 900
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 5254 bitrate=2600.8kbits/s speed=0.542x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2785
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 3511 bitrate=2653.8kbits/s speed=0.572x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 6158
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2412
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 3238 bitrate=2758.7kbits/s speed= 0.6x    
[ac4 @ 0x55b3e9a5ed40] overread
[ac4 @ 0x55b3e9a5ed40] substream audio data underread: 2812 bitrate=2763.5kbits/s speed=0.627x    
[ac4 @ 0x55b3e9a5ed40] overread
[mpegts @ 0x55b3e95d1940] PES packet size mismatch
[mpegts @ 0x55b3e95d1940] Packet corrupt (stream = 1, dts = 127221418).
test.ts: corrupt input packet in stream 1
[ac4 @ 0x55b3e9602ac0] overread
frame= 2695 fps= 38 q=-1.0 Lsize=   19831kB time=00:00:45.00 bitrate=3609.6kbits/s speed=0.629x    
video:16393kB audio:3386kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.256445%
As you can see, I get a lot of "substream audio data underread" errors, which I'm presuming is the little glitches I hear every few seconds. If I were to look at the Mediainfo data of the input and output files, this is what they look like.

INPUT

Code: Select all

General
ID                                       : 1 (0x1)
Complete name                            : W:\Recorded TV\ATSC 3.0\test.ts
Format                                   : MPEG-TS
File size                                : 19.3 MiB
Duration                                 : 44 s 945 ms
Overall bit rate mode                    : Variable
Overall bit rate                         : 3 604 kb/s

Video
ID                                       : 49 (0x31)
Menu ID                                  : 3 (0x3)
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L4.1@Main
Codec ID                                 : 36
Duration                                 : 44 s 961 ms
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate                               : 59.940 (60000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 10 bits
Color range                              : Limited

Audio #1
ID                                       : 50 (0x32)
Menu ID                                  : 3 (0x3)
Format                                   : AC-4
Format/Info                              : Audio Coding 4
Commercial name                          : Dolby AC-4
Format version                           : Version 2
Codec ID                                 : 6
Duration                                 : 44 s 978 ms
Sampling rate                            : 48.0 kHz
Frame rate                               : 29.970 FPS (1601.6 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -17 ms
I-Frame interval                         : 60 frames
Number of presentations                  : 1
Number of substreams                     : 1
Presentation #1                          : 5.1 Main
 Presentation ID                         : 0
 Dialogue normalization                  : -24.00
 Loudness                                : Yes
  Integrated loudness (speech gated)     : -23.2 LKFS
  Integrated loudness (level gated)      : -22.7 LKFS
  Audio Loudness Standard                : Manual
  Realtime loudness corrected            : Yes
  Dialogue corrected                     : Yes
 Dynamic Range Control                   : Yes
 Downmix                                 : Yes
  LoRo center mix gain                   : -3.0 dB
  LoRo surround mix gain                 : -3.0 dB
  LtRt center mix gain                   : -3.0 dB
  LtRt surround mix gain                 : -3.0 dB
  LFE mix gain                           : -3 dB
  Preferred downmix                      : Pro Logic II
 Group #s                                : 1
Group #1                                 : Main
 Content classifier                      : Main
 Channel coded                           : Yes
 Number of substreams                    : 1
 Substream #s                            : 1
Substream #1                             : 5.1
 Channel mode                            : 5.1
 Channel layout                          : L R C LFE Ls Rs
 Dialogue enhancement                    : Yes
  Enabled                                : Yes
  Max gain                               : 9 dB
  Channel configuration                  : C

Audio #2
ID                                       : 51 (0x33)
Menu ID                                  : 3 (0x3)
Format                                   : AC-4
Format/Info                              : Audio Coding 4
Commercial name                          : Dolby AC-4
Format version                           : Version 2
Codec ID                                 : 6
Duration                                 : 45 s 11 ms
Sampling rate                            : 48.0 kHz
Frame rate                               : 29.970 FPS (1601.6 SPF)
Compression mode                         : Lossy
Delay relative to video                  : -50 ms
NOK                                      : tools_metadata
I-Frame interval                         : 60 frames
Number of presentations                  : 1
Number of substreams                     : 1
Presentation #1                          : Stereo Main
 Presentation ID                         : 0
 Dialogue normalization                  : -24.00
 Loudness                                : Yes
  Integrated loudness (speech gated)     : -22.8 LKFS
  Integrated loudness (level gated)      : -22.7 LKFS
  Audio Loudness Standard                : Manual
  Realtime loudness corrected            : Yes
  Dialogue corrected                     : Yes
 Dynamic Range Control                   : Yes
 Group #s                                : 1
Group #1                                 : Main
 Content classifier                      : Main
 Channel coded                           : Yes
 Number of substreams                    : 1
 Substream #s                            : 1
Substream #1                             : Stereo
 Channel mode                            : Stereo
 Channel layout                          : L R
 Preprocessing                           : Yes
  Phase 90 Filer Info 2-ch               : Not applied
 Dialogue enhancement                    : Yes
  Enabled                                : Yes
  Max gain                               : 9 dB
  Channel configuration                  : L R

Menu
ID                                       : 48 (0x30)
Menu ID                                  : 3 (0x3)
Duration                                 : 44 s 945 ms
List                                     : 49 (0x31) (HEVC) / 50 (0x32) (AC-4) / 51 (0x33) (AC-4) / 57 (0x39) ()

OUTPUT

Code: Select all

General
Unique ID                                : 139808372462523371118512433230871930671 (0x692E1CF421D7EDA777FC18E75E32272F)
Complete name                            : W:\Recorded TV\ATSC 3.0\test.mkv
Format                                   : Matroska
Format version                           : Version 4
File size                                : 19.4 MiB
Duration                                 : 45 s 43 ms
Overall bit rate                         : 3 607 kb/s
Writing application                      : Lavf58.74.100
Writing library                          : Lavf58.74.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L4.1@Main
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 44 s 962 ms
Bit rate                                 : 2 799 kb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 59.940 (60000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 10 bits
Bits/(Pixel*Frame)                       : 0.023
Stream size                              : 15.0 MiB (77%)
Default                                  : Yes
Forced                                   : No
Color range                              : Limited

Audio #1
ID                                       : 2
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 44 s 977 ms
Bit rate mode                            : Constant
Bit rate                                 : 448 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 32 bits
Compression mode                         : Lossy
Delay relative to video                  : 11 ms
Stream size                              : 2.40 MiB (12%)
Writing library                          : Lavc58.131.100 ac3
Service kind                             : Complete Main
Default                                  : Yes
Forced                                   : No

Audio #2
ID                                       : 3
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 44 s 977 ms
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 32 bits
Compression mode                         : Lossy
Delay relative to video                  : 11 ms
Stream size                              : 1.03 MiB (5%)
Writing library                          : Lavc58.131.100 ac3
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Audio #3
ID                                       : 4
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 44 s 100 ms
Bit rate mode                            : Constant
Bit rate                                 : 96.0 kb/s
Channel(s)                               : 1 channel
Channel layout                           : C
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Bit depth                                : 32 bits
Compression mode                         : Lossy
Delay relative to video                  : -55 ms
Stream size                              : 517 KiB (3%)
Writing library                          : Lavc58.131.100 ac3
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No

Text
ID                                       : 5
Format                                   : UTF-8
Codec ID                                 : S_TEXT/UTF8
Codec ID/Info                            : UTF-8 Plain Text
Writing library                          : Lavc58.131.100 srt
Language                                 : English
Default                                  : Yes
Forced                                   : No

I do not know if the method of extracting closed captioning is the same as it was for MPEG2 transport streams, which is where the template for my script had come from, or if there just was no closed captioning in the test source.

Just to be honest, I am not an expert at what I'm messing with, I'm just trying to piece things together that have worked in the past and trying to tweak them to how I want them to be. If anyone can point out the error in my ways, please let me know. BTW, does anyone know if the methods for detecting commercials still works in ATSC 3.0 as it did in ATSC 1.0? Will Plex Media Server remove them?

TBR
Posts: 73
Joined: Fri Feb 19, 2021 12:26 pm
x 1

Re: AC-4 Audio?

Post by TBR »

RonRN18 wrote: Sun May 30, 2021 1:03 pm Has anyone been able to get the richardpl's AC4 branch to work without audio hiccups?
I compiled it on Ubuntu 20.04 LTS and used FFplay to watch ATSC 3.0 stations.

I didn't notice audio hiccups, although there were a lot of errors in the stream (fringe reception).

What I did notice is that FFplay is CPU intensive, which means video has decoding faults because it can't keep up.

Can't pretend I really followed along much in your scripts. My efforts at getting FFmpeg to transcode have fallen by the wayside for now.

DaveNLR
Posts: 4
Joined: Wed Oct 07, 2020 11:17 am

Re: AC-4 Audio?

Post by DaveNLR »

I find it amazing they would choose a codec that no one has, and apparently Dolby does not sell.
I do not know how, but I am actually getting audio with my Plex DVR app on an Nvidia Shield through a Sony 1080 AVR into a Vizio OLED. I am not getting audio on my computer or cell phone, or laptop. With all the open source free codecs, I am wondering who was the bright individual who decided to use a codec no one has, or can get, for a system designed for poor and rural folks without any other options to watch TV.

TBR
Posts: 73
Joined: Fri Feb 19, 2021 12:26 pm
x 1

Re: AC-4 Audio?

Post by TBR »

DaveNLR wrote: Wed Jun 30, 2021 9:45 am I am not getting audio on my computer or cell phone, or laptop. With all the open source free codecs, I am wondering who was the bright individual who decided to use a codec no one has, or can get, for a system designed for poor and rural folks without any other options to watch TV.
Dolby put up $$$ for ATSC 3 development, thus buying their way into adoption of the AC-4 standard.

Dolby did not make this investment for the public good. Apparently that arrangement was acceptable to the public officials regulating the public airwaves "for the public good."

If your devices already have Dolby licenses (not apparently available for retail sale), then you stand a chance of getting audio. If not, we're all waiting for FFmpeg to get past Dolby and release a codec.

rpcameron
Posts: 1032
Joined: Fri Mar 25, 2016 9:55 am
x 9

Re: AC-4 Audio?

Post by rpcameron »

DaveNLR wrote: Wed Jun 30, 2021 9:45 am I find it amazing they would choose a codec that no one has, and apparently Dolby does not sell.
I do not know how, but I am actually getting audio with my Plex DVR app on an Nvidia Shield through a Sony 1080 AVR into a Vizio OLED.
IIRC, AC-4 is part of Dolby Atmos, so devices that support Atmos ought to be able to play back ATSC3 content.

kyl416
Posts: 279
Joined: Wed Sep 17, 2014 12:09 pm
Device ID: 1080DB11
Location: Tobyhanna, PA
x 28
Contact:

Re: AC-4 Audio?

Post by kyl416 »

Actual NextGen TVs aren't affected by this, it's bring your own viewer/decoder tuners that are.

We went through the same thing with the first ATSC 1.0 PC tuners in the late 90s/early 00s since MPEG-2 and AC-3 codecs weren't bundled with Windows until Windows 7. Prior to that it was up to the PC's manufacturer to include them on models that came with DVD drives or Media Center Edition PCs, and even then sometimes the OEM codecs were hardcoded to only work with the bundled software and not any 3rd party players, and the more cheap manufacturers only provided a free trial of WinDVD where you had to pay extra to unlock it.

For the DIY PC builder, you never bought the AC-3 codec directly from Dolby. Until the open source community caught up and added support for things like error correction (so the decoder doesn't crash each time a gust of wind hits), you had to purchase it via 3rd party software like Intervideo's WinDVD or NVidia's PureVideo, which didn't become widely available until the XP Media Center era. And if you wanted to use it with Windows Media Center, that had its own additional set of requirements that the open source community was slow to implement.

In those days there were also extra video card requirements since software decoding of MPEG-2 HD was beyond the capability of most PCs, so Hauppauge came out with the WinTV-D for low end PCs that had a built in hardware transcoder to downconvert everything to analog SD, and for more higher end PCs they had the WinTV-HD. Both of these early devices used proprietary drivers and chipsets, so they weren't compatible with Windows Media Center (or WebTV for Windows if you want a real throwback), or linux.
Last edited by kyl416 on Wed Jun 30, 2021 1:24 pm, edited 4 times in total.

RBBrittain
Posts: 3
Joined: Wed Jun 30, 2021 12:03 pm

Re: AC-4 Audio?

Post by RBBrittain »

rpcameron wrote: Wed Jun 30, 2021 11:26 am
DaveNLR wrote: Wed Jun 30, 2021 9:45 am I find it amazing they would choose a codec that no one has, and apparently Dolby does not sell.
I do not know how, but I am actually getting audio with my Plex DVR app on an Nvidia Shield through a Sony 1080 AVR into a Vizio OLED.
IIRC, AC-4 is part of Dolby Atmos, so devices that support Atmos ought to be able to play back ATSC3 content.
Not actually true. Vizio support has confirmed to me via their official subreddit that none of their soundbars, including their Atmos models, decode AC-4.

Ironically, their current TV models DO decode AC-4 when set to decode internally; but the only way I found to access the HDHR on their SmartCast platform was a paid upgrade to the Plex app — NO native HDHR app, not even a DLNA app. The other two major proprietary smart TV platforms, Samsung’s Tizen & LG’s webOS, both have native HDHR apps. So does virtually every other potential streaming platform except PlayStation (which supports it via DLNA) and generally cable & satellite boxes with streaming capabilities (unlikely that MVPDs will ever support it — they never exactly liked the Prime). Thus I have to stream to my Vizio via my 2020 Roku Ultra or 2021 Apple TV 4K (both of which will decode AC-4 internally at least in their HDHR apps), or possibly Chromecast or AirPlay.

RBBrittain
Posts: 3
Joined: Wed Jun 30, 2021 12:03 pm

Re: AC-4 Audio?

Post by RBBrittain »

DaveNLR wrote: Wed Jun 30, 2021 9:45 am I do not know how, but I am actually getting audio with my Plex DVR app on an Nvidia Shield through a Sony 1080 AVR into a Vizio OLED.
Your Shield may have a built-in AC-4 decoder, like both of my Samsung Android devices. If you were routing your audio thru the Vizio first it definitely has an AC-4 decoder just like mine (a lesser grade 2020 model), though at best it would only transcode to DD or possibly DD+ to your AVR over regular ARC or optical/coax.

jasonl
Expert
Posts: 15669
Joined: Sun Oct 28, 2007 9:23 pm
x 29

Re: AC-4 Audio?

Post by jasonl »

RBBrittain wrote: Wed Jun 30, 2021 12:42 pm Ironically, their current TV models DO decode AC-4 when set to decode internally; but the only way I found to access the HDHR on their SmartCast platform was a paid upgrade to the Plex app — NO native HDHR app, not even a DLNA app. The other two major proprietary smart TV platforms, Samsung’s Tizen & LG’s webOS, both have native HDHR apps. So does virtually every other potential streaming platform except PlayStation (which supports it via DLNA) and generally cable & satellite boxes with streaming capabilities (unlikely that MVPDs will ever support it — they never exactly liked the Prime). Thus I have to stream to my Vizio via my 2020 Roku Ultra or 2021 Apple TV 4K (both of which will decode AC-4 internally at least in their HDHR apps), or possibly Chromecast or AirPlay.
SD doesn't have a Samsung app. They had one once, which was discontinued because Samsung wouldn't approve updates for it, and then they had RUI which worked like an app until Samsung killed it by forcing a firmware update on every TV that had it which disabled the RUI feature.

SD would support Vizio if the platform was capable of it. Unfortunately, Vizio's app system is kind of like Roku where you're basically just creating a user interface and controlling the TV's built in video player, and Vizio's built in video player doesn't support playing true live streams. The Plex server converts the live stream into what is effectively web streaming video, which the Vizio player does support, and thus Plex works.

Watcher
Posts: 29
Joined: Thu Apr 08, 2021 10:38 pm
x 3

Re: AC-4 Audio?

Post by Watcher »

RBBrittain wrote: Wed Jun 30, 2021 1:15 pm Your Shield may have a built-in AC-4 decoder....
The newer shield models are ATMOS certified (which apparently includes the ability to decode the ATSC 3.0 AC-4 stream) due the inclusion of a new Dolby certified chip. Older models do not include the capability.

Watcher
Posts: 29
Joined: Thu Apr 08, 2021 10:38 pm
x 3

Re: AC-4 Audio?

Post by Watcher »

TBR wrote: Wed Jun 30, 2021 11:18 am Dolby put up $$$ for ATSC 3 development, thus buying their way into adoption of the AC-4 standard.
Dolby did the approximate same for DD for digital TV ($20M for MIT, and a discount license for Zenith) during that decision process. Of course all sides said their decision was technical, and not influenced by the money. And I am sure I believe all the parties statements.

Watcher
Posts: 29
Joined: Thu Apr 08, 2021 10:38 pm
x 3

Re: AC-4 Audio?

Post by Watcher »

rpcameron wrote: Wed Jun 30, 2021 11:26 am IIRC, AC-4 is part of Dolby Atmos, so devices that support Atmos ought to be able to play back ATSC3 content.
The issue is that the term AC-4 is like the term MPEG2, there is the codec part, and there is the encapsulation part, and it is also extensible to add new capabilities, all under the same branding. While it is expected that at least some systems that can do Atmos should be able to be updated to support the ATSC 3.0 AC-4 usage, that is not assured, and even if it is possible, vendors will have to give a damn to update their firmware.
Last edited by Watcher on Sat Jul 03, 2021 8:37 pm, edited 1 time in total.

Watcher
Posts: 29
Joined: Thu Apr 08, 2021 10:38 pm
x 3

Re: AC-4 Audio?

Post by Watcher »

DaveNLR wrote: Wed Jun 30, 2021 9:45 am I find it amazing they would choose a codec that no one has, and apparently Dolby does not sell.
I believe that Dolby sells an app in the Microsoft Store for support of Atmos. I have no idea if it supports ATSC 3.0 AC-4 usage, but it would at least be a possibility for them to expand it if not.

Post Reply