AC-4 Audio?

ATSC 3.0 Forum
Post Reply
ferrellsl
Posts: 39
Joined: Sat Oct 17, 2020 11:57 pm
Location: Mesa, AZ
x 14
Contact:

Re: AC-4 Audio?

Post by ferrellsl »

(;-)
Last edited by ferrellsl on Fri May 07, 2021 4:43 pm, edited 1 time in total.

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

Re: AC-4 Audio?

Post by TBR »

ferrellsl wrote: Fri Feb 05, 2021 11:30 pm Here's an updated player with streaming support so there's no longer a need for ffmpeg, wget or other app to capture streams to a file before playback.
Thanks very much for this player (v1.1), which works on all my Windows machines save the tiny 1.44 GHz Alfawise (it plays, but at half speed).

I've been trying to compile richardpl's FFmpeg on Ubuntu following the FFmpeg guide https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu (substituting the FFmpeg source with FFmpeg-ac4) and finally managed to get an ffplay that produces video but no audio (the terminal window shows understreaming rates and overstreaming, FWIW). I'm hoping I just need to adjust the ./configure options somehow. I'll try the suggestions in the prior posts related to compiling for Windows unless someone has already succeeded and would care to share how.

ferrellsl
Posts: 39
Joined: Sat Oct 17, 2020 11:57 pm
Location: Mesa, AZ
x 14
Contact:

Re: AC-4 Audio?

Post by ferrellsl »

(;-)
Last edited by ferrellsl on Fri May 07, 2021 4:43 pm, edited 1 time in total.

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

Re: AC-4 Audio?

Post by TBR »

ferrellsl wrote: Sun Mar 07, 2021 9:52 am Compiling for Ubuntu should be as easy as downloading the source code and opening a terminal in the folder where the sources are located and typing: "./configure" followed by "make", and then by "make install".
Unfortunately that produces ffmpeg and ffprobe (without ffplay). I tried installing some of the libraries, but with the same result. I will try it again now that I have all the libraries listed in the build guide. Thanks!

ferrellsl
Posts: 39
Joined: Sat Oct 17, 2020 11:57 pm
Location: Mesa, AZ
x 14
Contact:

Re: AC-4 Audio?

Post by ferrellsl »

(;-)
Last edited by ferrellsl on Fri May 07, 2021 4:43 pm, edited 1 time in total.

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

Re: AC-4 Audio?

Post by TBR »

ferrellsl wrote: Sun Mar 07, 2021 1:12 pm
Compiling for Ubuntu should be as easy as downloading the source code and opening a terminal in the folder where the sources are located and typing: "./configure" followed by "make", and then by "make install".

...

When you run the configure script, add the --enable switch so that your command line looks like this: ./configure --enable-ffplay

You also need to ensure that you've installed SDL2 on your build system as ffplay relies on it.

sudo apt-get install libsdl2-dev
Success. The options suggested for Windows (-inbuf -sync video) do not work with Ubuntu, but it plays well.

My previous problem with no audio from ffplay was probably caused by the wrong environmental output selection. I just rebuilt this machine with a Ryzen 5-5600 CPU and have yet to work out all the kinks.

ferrellsl
Posts: 39
Joined: Sat Oct 17, 2020 11:57 pm
Location: Mesa, AZ
x 14
Contact:

Re: AC-4 Audio?

Post by ferrellsl »

(;-)
Last edited by ferrellsl on Fri May 07, 2021 4:43 pm, edited 1 time in total.

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

Re: AC-4 Audio?

Post by TBR »

ferrellsl wrote: Sun Mar 07, 2021 8:39 pm
Oops, you may have introduced a typo with a missing "f". The switches should be -infbuf -sync video, not -inbuf.
Hazards of being old, blind, dyslexic, and clumsy.

The -infbuf switch is already the default for a real-time stream. The little Z83 Alfawise plays the video stream very slowly (an initial frame, then after a bit there are very late changes) so the -sync video switch just slows down the audio. I've tried -sync audio (which is the default) and -sync ext, but the problem continues. I also tried -framedrop without making a difference, and I don't see any other relevant switches.

I was tempted to try recompiling FFmpeg-ac4 with MSYS2. However, if I can get richardpl's AC-4 codecs working in an Android app for the Android 9 TV Box, I can distribute the output through my AV network and watch it from any TV. My "enthusiast" days were pre-DOS and there have been just a few changes since then. :) So instead of trying to get up to speed with MSYS2, I'll put my efforts towards an Android player.

ferrellsl
Posts: 39
Joined: Sat Oct 17, 2020 11:57 pm
Location: Mesa, AZ
x 14
Contact:

Re: AC-4 Audio?

Post by ferrellsl »

(;-)
Last edited by ferrellsl on Fri May 07, 2021 4:44 pm, edited 1 time in total.

ferrellsl
Posts: 39
Joined: Sat Oct 17, 2020 11:57 pm
Location: Mesa, AZ
x 14
Contact:

Re: AC-4 Audio?

Post by ferrellsl »

(;-)
Last edited by ferrellsl on Fri May 07, 2021 4:44 pm, edited 1 time in total.

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

Re: AC-4 Audio?

Post by TBR »

ferrellsl wrote: Tue Mar 09, 2021 10:57 am I'm pleased to report that the ffmpeg-ac4 branch runs perfectly on a Celeron J4125 CPU. Audio and video were in perfect sync with no dropped frames or stuttering and I was streaming HEVC over WiFi. I didn't even need to use any buffer or sync switches on my command line. This leads me to believe that performance on ARM devices and other low-end CPUs should be fine. Bear in mind that none of the ATSC 3.0/AC-4 broadcasts in my area are in 4K, only 1080p, so I'm anxious to see how things perform once the broadcasters in my area start supplying 4K content.
I could not find a way to disable vsync via the command line. However, I did a bit more testing with the Z83 (Windows 10) and a ZBox (strictly Ubuntu).

The Z83 also plays slowly using the VideoPlayer you provided on ATSC 1.0 channels, which seems to indicate it is not just an HEVC/H.265 issue. FFplay can keep up on ATSC 1.0 channels.

Since I have yet to learn how to transfer compiled programs from the Ryzen 5-5600 machine (which performs the FFmpeg make in a minute or two using the -j$(nproc) switch), I compiled a fresh copy of FFmpeg on the ZBox following your Ubuntu suggestions (without adding all the libraries in the FFmpeg guide). It also plays HEVC video slowly (audio plays just fine considering the weak signal).

Also, this may not just be a CPU issue. The HDHR Windows app plays on an Acer desktop but just shows HEVC channels as black silent windows on both the Ryzen and Z83 machines. But that's another thread.

ferrellsl
Posts: 39
Joined: Sat Oct 17, 2020 11:57 pm
Location: Mesa, AZ
x 14
Contact:

Re: AC-4 Audio?

Post by ferrellsl »

(;-)
Last edited by ferrellsl on Fri May 07, 2021 4:44 pm, edited 1 time in total.

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

Re: AC-4 Audio?

Post by TBR »

ferrellsl wrote: Tue Mar 09, 2021 12:45 pm To disable your GPU's vsync or to use a lower refresh rate, you'll need to use the vendor supplied app(s) to turn it off or lower it to a more reasonable refresh rate. On Windows boxes with Intel iGPUs, it's usually the Intel Graphics Command Center in the lower right portion of the Windows Task Bar. I'm not sure how you'd make such adjustments under Linux.

========

I noticed that the QT based player that I built also suffers from the problem that you describe when running on my Beelink Celeron J4125 box. After about 5 minutes of play, my video also slows down to about half speed while the audio continues to play fine. So I definitely have a sync problem with the QT built app, but everything plays fine with ffplay, so there's definitely a problem with the QT-based player on lower-end CPUs. I don't experience this problem with the QT-based player on my i-7 based systems.....one of the dangers of coding and testing on beefier systems I suppose.
The Intel Graphics Command Center in the Z83 box seems rudimentary and does not offer the option (it's also attached to a cheap small TV).

I did, however, succeed in making a Debian package on the Ryzen machine. When I installed it on a Vostro laptop, ffplay definitely warmed up the CPU but it played the ATSC 3.0 stream well (considering that my signal was weak and breaking up), staying in sync. When I installed it on the ZBox (supposedly a refurbished AD04-Plus, but apparently a related custom build), the Debian ffplay performed no better than the previous make install. So ffplay is CPU intensive.

Does anyone have a suggestion for an Android app source code that I could build on? VLC might work, but it is quite complex and I am only interested in playing from the tuner over an Android 9 TV box. Since the Android HDHR app already plays the video stream, I'm hoping it would be relatively simple to expand its software audio decoding with richardpl's AC-4 codec: if I could find the source code. Failing that, where else could I look for an open-source app?

ferrellsl
Posts: 39
Joined: Sat Oct 17, 2020 11:57 pm
Location: Mesa, AZ
x 14
Contact:

Re: AC-4 Audio?

Post by ferrellsl »

(;-)
Last edited by ferrellsl on Fri May 07, 2021 4:44 pm, edited 1 time in total.

ferrellsl
Posts: 39
Joined: Sat Oct 17, 2020 11:57 pm
Location: Mesa, AZ
x 14
Contact:

Re: AC-4 Audio?

Post by ferrellsl »

(;-)
Last edited by ferrellsl on Fri May 07, 2021 4:44 pm, edited 1 time in total.

Post Reply