Audio Only Dolby Digital Plus

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Audio Only Dolby Digital Plus

Ronak Patel
Hi All,

I'm trying to get Ffmpeg to package and generate a valid fMP4 file for HLS of an Audio Only Dolby Digital Plus file. However, the stream that I get is unplayable and has no audio in its sample tables.

Here's an example command:

ffmpeg -i atmosTest.mp4 -codec copy -hls_time 0.993 -hls_segment_type fmp4 -hls_flags single_file -hls_playlist_type vod atmosTestffmpeg.m3u8
ffmpeg version N-92272-g0e9c01f Copyright (c) 2000-2018 the FFmpeg developers
  built with Apple LLVM version 10.0.0 (clang-1000.11.45.2)
  configuration: --prefix=/Users/ronakp/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/Users/ronakp/ffmpeg_build/include --extra-ldflags=-L/Users/ronakp/ffmpeg_build/lib --extra-libs=-lpthread --extra-libs=-lm --bindir=/Users/ronakp/bin --enable-libfdk_aac --enable-libmp3lame --enable-libopus --enable-nonfree
  libavutil      56. 20.100 / 56. 20.100
  libavcodec     58. 34.100 / 58. 34.100
  libavformat    58. 19.102 / 58. 19.102
  libavdevice    58.  4.106 / 58.  4.106
  libavfilter     7. 38.100 /  7. 38.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'atmosTest.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42dby1isom
    creation_time   : 2018-09-07T19:17:49.000000Z
  Duration: 00:02:40.80, start: 0.000000, bitrate: 769 kb/s
    Stream #0:0(und): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 768 kb/s (default)
    Metadata:
      creation_time   : 2018-09-07T19:17:49.000000Z
      handler_name    : sound handler
    Side data:
      audio service type: main
[hls @ 0x7fbfc4825c00] Opening 'atmosTestffmpeg.m4s' for writing
[mp4 @ 0x7fbfc4827600] track 0: codec frame size is not set
Output #0, hls, to 'atmosTestffmpeg.m3u8':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42dby1isom
    encoder         : Lavf58.19.102
    Stream #0:0(und): Audio: eac3 (ec-3 / 0x332D6365), 48000 Hz, 5.1(side), fltp, 768 kb/s (default)
    Metadata:
      creation_time   : 2018-09-07T19:17:49.000000Z
      handler_name    : sound handler
    Side data:
      audio service type: main
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=N/A time=00:02:40.76 bitrate=N/A speed= 397x    
video:0kB audio:15075kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

When I try to run Apple's mediastreamvalidator on this:


a45e60e46a79:Dolby ronakp$ mediastreamvalidator atmosTestffmpeg.m3u8
mediastreamvalidator: Version 1.2(180612)

[atmosTestffmpeg.m3u8] Started loading root playlist
[atmosTestffmpeg.m3u8] Started loading media playlist
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
Error injecting segment data
[atmosTestffmpeg.m3u8] All media files delivered and have end tag, stopping

--------------------------------------------------------------------------------
atmosTestffmpeg.m3u8
--------------------------------------------------------------------------------
Processed 0 out of 162 segments
Average segment duration: 0.992593
Total segment bitrates (all discontinuities): average: 765.16 kb/s, max: 769.29 kb/s


Discontinuity: sequence: 0, parsed segment count: 0 of 162, duration: 160.800 sec, average: 765.16 kb/s, max: 769.29 kb/s


However, when I use Apple's tooling to generate a stream, it works correctly:

a45e60e46a79:Dolby ronakp$ mediafilesegmenter -a -r -s atmosTest.ec3
Nov 12 2018 11:58:52.713: ISO fragmented mode, forcing segments to start with I-Frame
Nov 12 2018 11:58:52.714: Processing file /Users/ronakp/Desktop/Dolby/atmosTest.ec3
Nov 12 2018 11:58:52.743: Wrote 0 to 578 to main.mp4
Nov 12 2018 11:58:52.748: Wrote 578 to 959266 to main.mp4
Nov 12 2018 11:58:52.749: segment bitrate 768.18 kbits/sec is new max
Nov 12 2018 11:58:52.756: Wrote 959266 to 1917954 to main.mp4
Nov 12 2018 11:58:52.763: Wrote 1917954 to 2876642 to main.mp4
Nov 12 2018 11:58:52.772: Wrote 2876642 to 3835330 to main.mp4
Nov 12 2018 11:58:52.777: Wrote 3835330 to 4794018 to main.mp4
Nov 12 2018 11:58:52.784: Wrote 4794018 to 5752706 to main.mp4
Nov 12 2018 11:58:52.793: Wrote 5752706 to 6711394 to main.mp4
Nov 12 2018 11:58:52.800: Wrote 6711394 to 7670082 to main.mp4
Nov 12 2018 11:58:52.880: Wrote 7670082 to 8628770 to main.mp4
Nov 12 2018 11:58:52.924: Wrote 8628770 to 9587458 to main.mp4
Nov 12 2018 11:58:52.966: Wrote 9587458 to 10546146 to main.mp4
Nov 12 2018 11:58:52.973: Wrote 10546146 to 11504834 to main.mp4
Nov 12 2018 11:58:53.017: Wrote 11504834 to 12463522 to main.mp4
Nov 12 2018 11:58:53.060: Wrote 12463522 to 13422210 to main.mp4
Nov 12 2018 11:58:53.102: Wrote 13422210 to 14380898 to main.mp4
Nov 12 2018 11:58:53.147: Wrote 14380898 to 15339586 to main.mp4
Nov 12 2018 11:58:53.147: Wrote 15339586 to 15441066 to main.mp4
Nov 12 2018 11:58:53.147: segment bitrate 768.24 kbits/sec is new max
Nov 12 2018 11:58:53.147: Unknown video dynamic range value 0
Nov 12 2018 11:58:53.147: average bit rate is 768.21 kbits/sec - max file bit rate is 768.24 kbits/sec

a45e60e46a79:Dolby ronakp$ mediastreamvalidator atmosTest.m3u8
mediastreamvalidator: Version 1.2(180612)

[atmosTest.m3u8] Started loading root playlist
[atmosTest.m3u8] Started loading media playlist
[atmosTest.m3u8] All media files delivered and have end tag, stopping

--------------------------------------------------------------------------------
atmosTest.m3u8
--------------------------------------------------------------------------------
Processed 17 out of 17 segments
Average segment duration: 9.458824
Total segment bitrates (all discontinuities): average: 768.18 kb/s, max: 768.24 kb/s


Discontinuity: sequence: 0, parsed segment count: 17 of 17, duration: 160.800 sec, average: 768.18 kb/s, max: 768.24 kb/s
Track ID: 1
Audio Codec: ec-3
Audio sample rate: 48000 Hz
Audio channels: 6
Audio channel layout: 5.1 (L C R Ls Rs LFE)

I tried examining the generated M4S file from FFMPEG, and I noticed that the sample tables in the tkhd atoms are all 0s. Ffmpeg is not able to properly encode the audio into the fragments.
How can I go about debugging this issue and issue a fix to the community?

Thanks,

Ronak




_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Audio Only Dolby Digital Plus

Carl Eugen Hoyos-2
2018-11-12 18:20 GMT+01:00, Ronak <[hidden email]>:

> I'm trying to get Ffmpeg to package and generate a valid fMP4 file
> for HLS of an Audio Only Dolby Digital Plus file.

Is your input file really an atmos file?
If yes, please provide such a sample.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Audio Only Dolby Digital Plus

Ronak Patel

> On Nov 27, 2018, at 10:46 AM, Carl Eugen Hoyos <[hidden email]> wrote:
>
> 2018-11-12 18:20 GMT+01:00, Ronak <[hidden email]>:
>
>> I'm trying to get Ffmpeg to package and generate a valid fMP4 file
>> for HLS of an Audio Only Dolby Digital Plus file.
>
> Is your input file really an atmos file?
> If yes, please provide such a sample.
>

I'll try to generate a separate sample asset and provide it.
Because Apple is able to correctly detect the format and segment properly; I don't think this is a content issue.

> Carl Eugen
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".

_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Audio Only Dolby Digital Plus

Carl Eugen Hoyos-2
In reply to this post by Ronak Patel
2018-11-12 18:20 GMT+01:00, Ronak <[hidden email]>:

> I'm trying to get Ffmpeg to package and generate a valid fMP4 file for HLS
> of an Audio Only Dolby Digital Plus file. However, the stream that I get is
> unplayable and has no audio in its sample tables.
>
> Here's an example command:
>
> ffmpeg -i atmosTest.mp4

Do you get an unplayable output file only if the input file contains an
"Atmos" eac3 stream or for every eac3-stream?
Does it work if you re-encode to eac3 with FFmpeg?

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".