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

[BUG]: Audio transcoding not working #1663

Open
zenzo22 opened this issue Feb 29, 2024 · 12 comments
Open

[BUG]: Audio transcoding not working #1663

zenzo22 opened this issue Feb 29, 2024 · 12 comments
Milestone

Comments

@zenzo22
Copy link

zenzo22 commented Feb 29, 2024

Tvheadend Version

v4.3 (development)

Build Number

4.3-2286~gae51d24fe

Platform

Ubuntu 20.04 (Focal)

Architecture

ARMv8 (arm)

Category

Transcoding

Description

Hello,

asked this before without getting a solution: I am currently using HTS Tvheadend 4.3-2286~gae51d24fe on several root servers.
Due to limited mobile data volume I want to transcode video and audio to a lower bitrate.

Video transcoding is working fine but currently I can only use "copy" for the audio streams.
No matter which codec profiles I want to use for the audio transcoding to AAC 56k (or any other) no sound seems to be transcoded or at least output by TVH.

The audio stream in VLC is always empty, using all kinds of different settings. Tried this for different networks and on different servers. Switching back to "copy" the original audio is working. FFProbe and the stream output on VLC show that there is no audio stream sent at all when transcoded.

It affects pretty much all recent versions (stable, development, unstable) of tvheadend.

I know this worked before (years ago though) and I have no clue what causes this behaviour. I have no stream filters applied. All neccessary codecs are installed and working. Manually transcoding the same input streams via the command line produces the desired audio output.

Would be really thankful for any help on this.

Logfile

mpegts: channels - ARTE HD - tuning on IPTV #1
subscription: 0007: "HTTP" subscribing on channel "ARTE HD", weight: 100, adapter: "IPTV #1", network: "xxx", mux: "channels - ARTE HD", provider: "FFmpeg", service: "ARTE HD", profile="mobi", hostname="xxx", username="xxx", client="VLC/3.0.18 LibVLC/3.0.18"
transcode: 0005: 02:H264: ==> Using profile 400
transcode: 0005: 01:AAC: ==> Using profile 56k
libav: AVCodecContext: using SAR=1/1
libav: AVCodecContext: using cpu capabilities: ARMv8 NEON
libav: AVCodecContext: profile High, level 3.0, 4:2:0, 8-bit

Reproduction

Tested on several devices with different linux distros and different TVH versions, different sources -> no transcoded audio output.

@Flole998
Copy link
Member

You can try bisecting the issue, if it worked previously there is some commit that will break it. Once that is identified a solution can be worked on.

@zenzo22
Copy link
Author

zenzo22 commented Feb 29, 2024

I tried a few versions back to the oldest available stable one (4.3-2098~g44bf691ac) on Cloudsmith but all of them seem to have this bug.

Where can I find older releases (ARM 64-bit preferred for testing)?

@Flole998
Copy link
Member

Flole998 commented Mar 1, 2024

Older versions are not available on Cloudsmith, you will have to self-compile older versions.

@Flole998 Flole998 added this to the 2024-release1 milestone Mar 22, 2024
@GeekSpeak79
Copy link

The transcode Error appears to have been implemented between the following versions:

4.2.8-22~g67e75a932 (LS10) WORKS
g67375a932 working

4.3-1789~g6bfeca6c0 (LS13) Does not work
g6bfeca6c0 NOT Working

@Flole998
Copy link
Member

Now you are comparing 2 completely different branches. You need to go back on the 4.3 branch to figure out where the issue was introduced there.

@GeekSpeak79
Copy link

I'll investigate further, but it appears that the transcoding has never worked in the 4.3 branch.

@Flole998
Copy link
Member

IIRC it did work a few years ago. But there have been many library updates in the meantime, so it probably broke somewhere along the way.

@GeekSpeak79
Copy link

Good to know thanks.
I'll see if i can identify a suspect commit. I traced it as far back to 6bfeca6-ls13 on 4.3 branch where it still fails.

@Flole998
Copy link
Member

Thats quite old, I'd expect it to work on that old releases. You are compiling with static ffmpeg, right? The dynamic versions that use your system ffmpeg might fail if it is a ffmpeg bug.

@GeekSpeak79
Copy link

Based on your recommendation I recompiled version 4.3-1906~g7e1dac822 ensuring FFMPEG was set to static. Transcode muxing issue persisted, however I did manage to get an error during the test that i have attached.
error code

TVHE options

@mrblond18
Copy link

Hello,
I took the leap and went from 4.2 to 4.3 (Build: 4.3-2323~g73a6bd00d) this week. I compiled myself on Ubuntu 22.04 64 bit. I am having this same issue. However, I have been able to figure out it only fails for aac source streams. If the source is AC3 it does properly transcode, also to aac.

During compiling I noticed:

libfdkaac                                no
libfdkaac_static                         no

I built with:
$ AUTOBUILD_CONFIGURE_EXTRA=--enable-libffmpeg_static\ --enable-trace\ --enable-debug\ --enable-nonfree\ --enable-libfdk-aac\ --enable-libfdkaac_static ./Autobuild.sh

I already had installed libfdk-aac0, libfdk-aac2 and libfdk-aac-dev on my system.

Any ideas how to fix?

@GeekSpeak79
Copy link

I've tried compiling commit versions back to 2017 and I haven't found a version of 4.3 Build:XXX that has a working transcode. If anyone knows a version of 4.3 that does work, I'm happy to trace the commits to identify where it stopped working.

Currently I just use 4.2.8-22~g67e75a932 for transcoding needs.

Docker builds have the same issue

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

No branches or pull requests

4 participants