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

shaka-packager doesn't recognise HE-AAC(v2) generated by ffmpeg #1212

Open
Jamie0 opened this issue May 30, 2023 · 0 comments
Open

shaka-packager doesn't recognise HE-AAC(v2) generated by ffmpeg #1212

Jamie0 opened this issue May 30, 2023 · 0 comments
Labels
type: enhancement New feature or request
Milestone

Comments

@Jamie0
Copy link

Jamie0 commented May 30, 2023

System info

Operating System: Ubuntu 20.04
Shaka Packager Version: v2.6.1

Issue and steps to reproduce the problem

When using ffmpeg to encode HE-AAC (v1 or v2) as an input to shaka-packager, the input is treated as AAC LC.

Packager Command: /bin/packager in=/dev/stdin --dump_stream_info

Extra steps to reproduce the problem?
Use ffmpeg to generate an MPEG transport stream e.g. ffmpeg -i http://localhost:8000/radio_service -c:a libfdk_aac -b:a 48k -profile:a aac_he_v2 -tag:a AACH -f mpegts -loglevel debug pipe: | [...packager command]

What is the expected result?

shaka-packager should recognise the HE-AAC-v2 codec tag and reflect it in the codec string. I would expect the following output:

Found 1 stream(s).
Stream [0] type: Audio
 codec_string: mp4a.40.29
 time_scale: 90000
 duration: Infinite
 is_encrypted: false
 codec: AAC
 sample_bits: 16
 num_channels: 2
 sampling_frequency: 48000
 language: 

What happens instead?

shaka-packager treats the HE-AAC-v2 (SBR + PS) stream as AAC LC and as such .m3u8 cannot be played back correctly on Apple devices

Found 1 stream(s).
Stream [0] type: Audio
 codec_string: mp4a.40.2
 time_scale: 90000
 duration: Infinite
 is_encrypted: false
 codec: AAC
 sample_bits: 16
 num_channels: 1
 sampling_frequency: 24000
 language: 

Running ffprobe against the generated MPEG-TS correctly identifies HE-AAC:

Input #0, mpegts, from '/tmp/out.ts':
  Duration: 00:00:15.40, start: 64688.427900, bitrate: 61 kb/s
  Program 1 
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
  Stream #0:0[0x100]: Audio: aac (HE-AACv2) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 47 kb/s
@cosmin cosmin added the type: enhancement New feature or request label Apr 26, 2024
@github-actions github-actions bot added this to the Backlog milestone Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants