[FFmpeg-user] he_aac with latm framing in a TS

Chris Wass chris.wass at gmail.com
Mon Nov 12 21:41:05 CET 2012


Of course, sorry.  Here's the console output:


$ ffmpeg -y -i catswiththumbs_1080_short.mp4 -vcodec libx264 -vprofile main
-vlevel 3 -vf scale=720:576 -acodec libfdk_aac -aprofile aac_he -ar 48000
out.latm
ffmpeg version git-2012-11-11-5aedee4 Copyright (c) 2000-2012 the FFmpeg
developers
  built on Nov 11 2012 22:12:29 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-librtmp --enable-libtheora --enable-libvorbis --enable-x11grab
--enable-libx264 --enable-nonfree --enable-version3
  libavutil      52.  5.100 / 52.  5.100
  libavcodec     54. 71.100 / 54. 71.100
  libavformat    54. 36.100 / 54. 36.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 21.106 /  3. 21.106
  libswscale      2.  1.102 /  2.  1.102
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'catswiththumbs_1080_short.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2011-03-06 19:21:07
  Duration: 00:00:10.00, start: 0.000000, bitrate: 4070 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 3938 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
s16, 127 kb/s
    Metadata:
      creation_time   : 2011-03-06 19:21:07
      handler_name    : (C) 2007 Google Inc. v08.13.2007.
Output #0, latm, to 'out.latm':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf54.36.100
    Stream #0:0(und): Audio: aac (HE-AAC), 48000 Hz, stereo, s16, 69 kb/s
    Metadata:
      creation_time   : 2011-03-06 19:21:07
      handler_name    : (C) 2007 Google Inc. v08.13.2007.
Stream mapping:
  Stream #0:1 -> #0:0 (aac -> libfdk_aac)
Press [q] to stop, [?] for help
[latm @ 0xa893be0] ADTS header detected - ADTS will not be incorrectly
muxed into LATM
av_interleaved_write_frame(): Invalid data found when processing input



If I specify a .ts file output itt completes but uses ADTS framing for the
AAC:

$ ffmpeg -y -i catswiththumbs_1080_short.mp4 -vcodec libx264 -vprofile main
-vlevel 3 -vf scale=720:576 -acodec libfdk_aac -aprofile aac_he -ar 48000
out.ts
ffmpeg version git-2012-11-11-5aedee4 Copyright (c) 2000-2012 the FFmpeg
developers
  built on Nov 11 2012 22:12:29 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-librtmp --enable-libtheora --enable-libvorbis --enable-x11grab
--enable-libx264 --enable-nonfree --enable-version3
  libavutil      52.  5.100 / 52.  5.100
  libavcodec     54. 71.100 / 54. 71.100
  libavformat    54. 36.100 / 54. 36.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 21.106 /  3. 21.106
  libswscale      2.  1.102 /  2.  1.102
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'catswiththumbs_1080_short.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2011-03-06 19:21:07
  Duration: 00:00:10.00, start: 0.000000, bitrate: 4070 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 3938 kb/s, 25 fps, 25 tbr, 1k tbn, 50 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
s16, 127 kb/s
    Metadata:
      creation_time   : 2011-03-06 19:21:07
      handler_name    : (C) 2007 Google Inc. v08.13.2007.
[libx264 @ 0xa894ea0] using SAR=64/45
[libx264 @ 0xa894ea0] using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
SlowCTZ SlowAtom
[libx264 @ 0xa894ea0] profile Main, level 3.0
Output #0, mpegts, to 'out.ts':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    encoder         : Lavf54.36.100
    Stream #0:0(und): Video: h264, yuv420p, 720x576 [SAR 64:45 DAR 16:9],
q=-1--1, 90k tbn, 25 tbc
    Metadata:
      creation_time   : 1970-01-01 00:00:00
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (HE-AAC), 48000 Hz, stereo, s16, 69 kb/s
    Metadata:
      creation_time   : 2011-03-06 19:21:07
      handler_name    : (C) 2007 Google Inc. v08.13.2007.
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> libx264)
  Stream #0:1 -> #0:1 (aac -> libfdk_aac)
Press [q] to stop, [?] for help
frame=  250 fps=5.0 q=28.0 Lsize=    1153kB time=00:00:09.96 bitrate=
948.2kbits/s
video:951kB audio:86kB subtitle:0 global headers:0kB muxing overhead
11.240927%
[libx264 @ 0xa894ea0] frame I:8     Avg QP:19.42  size: 39179
[libx264 @ 0xa894ea0] frame P:102   Avg QP:22.89  size:  5014
[libx264 @ 0xa894ea0] frame B:140   Avg QP:27.26  size:  1064
[libx264 @ 0xa894ea0] consecutive B-frames: 18.0% 14.4% 22.8% 44.8%
[libx264 @ 0xa894ea0] mb I  I16..4: 21.9%  0.0% 78.1%
[libx264 @ 0xa894ea0] mb P  I16..4:  2.7%  0.0%  3.2%  P16..4: 28.4%  8.9%
 6.3%  0.0%  0.0%    skip:50.6%
[libx264 @ 0xa894ea0] mb B  I16..4:  0.2%  0.0%  0.2%  B16..8: 21.6%  2.6%
 0.6%  direct: 0.8%  skip:73.9%  L0:31.9% L1:62.6% BI: 5.5%
[libx264 @ 0xa894ea0] coded y,uvDC,uvAC intra: 65.6% 67.7% 40.2% inter:
6.2% 9.1% 0.6%
[libx264 @ 0xa894ea0] i16 v,h,dc,p: 48% 14% 10% 28%
[libx264 @ 0xa894ea0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 16% 13%  4%  6%
 7%  5%  6%  4%
[libx264 @ 0xa894ea0] i8c dc,h,v,p: 52% 15% 28%  5%
[libx264 @ 0xa894ea0] Weighted P-Frames: Y:1.0% UV:0.0%
[libx264 @ 0xa894ea0] ref P L0: 74.7% 11.6% 10.0%  3.6%  0.0%
[libx264 @ 0xa894ea0] ref B L0: 89.6%  8.8%  1.7%
[libx264 @ 0xa894ea0] ref B L1: 94.7%  5.3%
[libx264 @ 0xa894ea0] kb/s:779.04




FFProbe confirms ADTS (15) rather than LATM:

$ ffprobe out.ts
ffprobe version git-2012-11-11-5aedee4 Copyright (c) 2007-2012 the FFmpeg
developers
  built on Nov 11 2012 22:12:29 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac
--enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-librtmp --enable-libtheora --enable-libvorbis --enable-x11grab
--enable-libx264 --enable-nonfree --enable-version3
  libavutil      52.  5.100 / 52.  5.100
  libavcodec     54. 71.100 / 54. 71.100
  libavformat    54. 36.100 / 54. 36.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 21.106 /  3. 21.106
  libswscale      2.  1.102 /  2.  1.102
  libswresample   0. 16.100 /  0. 16.100
  libpostproc    52.  1.100 / 52.  1.100
[mpegts @ 0xaa30e80] max_analyze_duration 5000000 reached at 5000000
Input #0, mpegts, from 'out.ts':
  Duration: 00:00:10.07, start: 1.294622, bitrate: 938 kb/s
  Program 1
    Metadata:
      service_name    : Service01
      service_provider: FFmpeg
    Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
yuv420p, 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x101](und): Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz,
stereo, s16, 66 kb/s


Any help appreciated.



On 12 November 2012 20:15, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Chris Wass <chris.wass <at> gmail.com> writes:
>
> > I have compiled ffmpeg with the necessary FDK_AAC library to enable
> he_aac
> > with latm but cannot figure out the directive to make it happen:
> >
> > $ ffmpeg -y -i <infile> -vcodec libx264 -vprofile main -vlevel 3 -vf
> > scale=720:576 -acodec libfdk_aac -aprofile aac_he -ar 48000 out.ts
>
> Complete, uncut console output missing.
>
> Carl Eugen
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list