Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ac4 patch to enable ATSC 3.0 #128

Open
wants to merge 1 commit into
base: jellyfin
Choose a base branch
from

Conversation

simcop2387
Copy link

I don't expect this to actually get accepted, but wanted to make it for tracking purposes. This adds the AC4 codec patch that exists to the ffmpeg used by jellyfin so that ATSC 3.0 support can be achieved. I've tested this with my local install and an ATSC 3.0 broadcast and it works very well.

This could be used while awaiting official support in FFMpeg in a future version, and I've created an amd64 .deb that I'm placing as a release on my fork for anyone who needs it.

Copy link
Member

@nyanmisaka nyanmisaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name of the patch should be registered in https://github.com/jellyfin/jellyfin-ffmpeg/blob/jellyfin/debian/patches/series

https://trac.ffmpeg.org/ticket/8349
I'd like to wait for the patch series to get into upstream first since the it's still WIP and it may break when we bump to ffmpeg 5.x, which has many API changes.

+ ssch->Q_high[1][ts][sb_high] = ssch->Q_low_ext[1][n][p];
+
+ fcomplex_mul(&cplx[0], &cplx[1], ssch->alpha0[p][0], ssch->alpha0[p][1], ssch->Q_low_ext[0][n-2][p], ssch->Q_low_ext[1][n-2][p]);
+ fcomp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mpegts.c.orig should be removed.

OBJS-$(CONFIG_AGM_DECODER) += agm.o
OBJS-$(CONFIG_AIC_DECODER) += aic.o
--- /dev/null
+++ jellyfin-ffmpeg-4.4.1/libavcodec/Makefile.orig
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makefile.orig should be removed.

Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2022-04-07
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2022-04-07

--- jellyfin-ffmpeg-4.4.1.orig/libavcodec/Makefile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-4.4.1 suffix should be removed.

@simcop2387
Copy link
Author

Agreed about the changes, I can make them but I also agree that waiting for the switch to ffmpeg 5.x is better anyway. The original patch on the trac link is actually made for ffmpeg 5 and i did some surgery to get it to apply to 4.4, which is why i made this. for anyone who wanted to apply it earlier than waiting for that upgrade to happen. If I find them time I'll fix this up so it's easier to apply and test.

@Shadowghost
Copy link
Contributor

Shadowghost commented Jun 1, 2022

If you didn't already see it: the codebase of Jellyfin-ffmpeg is now 5.x, so that should make things easier for you :)

@soxrok2212
Copy link

Is there any news on this? I live in an ATSC 3.0 market and am actively looking to transcode AC4 :)

@scott4290
Copy link

Is there any news on this? I live in an ATSC 3.0 market and am actively looking to transcode AC4 :)

It looks like @nyanmisaka requested that @simcop2387 make some additional changes. I was looking into how to get ac4 support into the ffmpeg base, and it looks like changes are discussed in the ffmpeg-devel email distro.

@soxrok2212
Copy link

There's another fork here: sub3/FFmpeg@565c5ab

I've yet to try it though, as I need to run a new coax to my HD HomeRun and my server is changing up a bit.

@Robert-D
Copy link

I am also looking for AC4 support for ATSC 3. Any chance this will be merged in the near future? Sorry just bought a HDHomeRun Flex for the sole purpose of getting these channels, but can't hear them. Any resources you can point me to compile the ffmpeg from a working fork?

@Robert-D
Copy link

Robert-D commented Sep 15, 2023

@simcop2387

...and I've created an amd64 .deb that I'm placing as a release on my fork for anyone who needs it.

Any way we can get a .deb package of the static build files for ffmpeg 5? I tried the release for version 4 on your fork, but when I selected the new location of the ffmpeg file inside jellyfin it gave me an error "We're unable to find FFmpeg using the path you've entered. FFprobe is also required and must exist in the same folder. These components are normally bundled together in the same download. Please check the path and try again."

@androidWG
Copy link

Any update on this? Still not able to play ATSC tracks on Jellyfin

@Shadowghost
Copy link
Contributor

There are still no patches compatible with current FFmpeg versions. FFmpeg does only support remuxing of AC-4 streams at the moment.

@gnattu gnattu mentioned this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants