Opened 3 years ago

Last modified 3 years ago

#4230 open defect

ASF: Big Muxing Overhead

Reported by: Đonny Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: asf
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Summary of the bug:
I'm doing lossless trimming of WMA (audio only; ASF) files and I have the issue that the overall bitrate of the file is growing. I managed to narrow the problem to following issue: If I just pass ASF file through FFMpeg using copy codec the file size grows.
How to reproduce:
Take the attached input file and encode it using following command

ffmpeg -i original.wma -c copy -y o2.asf
ffmpeg version N-68881-ga79ac73 Copyright (c) 2000-2015 the FFmpeg developers
  built on Jan  5 2015 22:14:33 with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --e
nable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-li
bass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-li
bgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-lib
opencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-l
ibrtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --en
able-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable
-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
  libavutil      54. 16.100 / 54. 16.100
  libavcodec     56. 19.100 / 56. 19.100
  libavformat    56. 18.100 / 56. 18.100
  libavdevice    56.  3.100 / 56.  3.100
  libavfilter     5.  6.100 /  5.  6.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  3.100 / 53.  3.100
Guessed Channel Layout for  Input Stream #0.0 : stereo
Input #0, asf, from 'original.wma':
  Metadata:
    WMFSDKNeeded    : 0.0.0.0000
    DeviceConformanceTemplate: L1
    WM/WMADRCPeakReference: 32767
    WM/WMADRCAverageReference: 11007
    PeakValue       : 32673
    AverageLevel    : 8571
    WM/Lyrics       : (Hej, hej) šuti
                    : samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    :
                    : (Hej hej)
                    :
                    : Ako te sretnem samo šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    :
                    : Ako te sretnem samo šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    :
                    : Iako davno su nestale veze
                    : Što spajale su nas
                    : Iako davno izbrisane su rije─Źi
                    : I ne pamtim ti glas
                    :
                    : Iako davno ve─ç zaborav te skrio
                    : I dodir tvoj je stran
                    : Susreti novi probudi u meni onaj stari plan
                    :
                    : Ako te sretnem samo šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    : Šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    :
                    : (hej, hej)
                    :
                    : Dugo ve─ç dugo
                    : Pamtim te samo kao ─Ĺa─Źki grijeh
                    : Dugo ve─ç dugo
                    : Ne znam dal' su dra┼że bile suze il' smijeh (oho)
                    : Dugo ve─ç dugo zaborav te skriva
                    : I dodir tvoj je stran
                    : Susreti novi probudi u meni onaj stari plan
                    :
                    : Ako te sretnem samo šuti, samo šuti
                    : [03:04]┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    : Šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    : Šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    :
                    : Šuti, šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    :
                    : (┼íuti moj dje─Źa─Źe plavi)
                    :
    title           : ┼áuti moj dje─Źa─Źe plavi
    album           : Malo Pomalo
    WMFSDKVersion   : 9.00.00.3250
    IsVBR           : 0
    WM/Year         : 1994
    WM/EncodingTime : 18446744072371848576
    WM/UniqueFileIdentifier: ;
    composer        : Karma
    publisher       : Groove Attack
    genre           : Electronica & Dance
    album_artist    : Karma
    WM/Provider     : User Feedback
    WM/SharedUserRating: 99
    track           : 13
    artist          : Karma
  Duration: 00:04:34.76, start: 0.000000, bitrate: 97 kb/s
    Stream #0:0(cze): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp, 96 k
b/s
Output #0, asf, to 'o2.asf':
  Metadata:
    WMFSDKNeeded    : 0.0.0.0000
    DeviceConformanceTemplate: L1
    WM/WMADRCPeakReference: 32767
    WM/WMADRCAverageReference: 11007
    PeakValue       : 32673
    AverageLevel    : 8571
    WM/Lyrics       : (Hej, hej) šuti
                    : samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    :
                    : (Hej hej)
                    :
                    : Ako te sretnem samo šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    :
                    : Ako te sretnem samo šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    :
                    : Iako davno su nestale veze
                    : Što spajale su nas
                    : Iako davno izbrisane su rije─Źi
                    : I ne pamtim ti glas
                    :
                    : Iako davno ve─ç zaborav te skrio
                    : I dodir tvoj je stran
                    : Susreti novi probudi u meni onaj stari plan
                    :
                    : Ako te sretnem samo šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    : Šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    :
                    : (hej, hej)
                    :
                    : Dugo ve─ç dugo
                    : Pamtim te samo kao ─Ĺa─Źki grijeh
                    : Dugo ve─ç dugo
                    : Ne znam dal' su dra┼że bile suze il' smijeh (oho)
                    : Dugo ve─ç dugo zaborav te skriva
                    : I dodir tvoj je stran
                    : Susreti novi probudi u meni onaj stari plan
                    :
                    : Ako te sretnem samo šuti, samo šuti
                    : [03:04]┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    : Šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    : Šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    : I nek tvoja kosa plava
                    : Na jastuku uspomena spava
                    :
                    : Šuti, šuti, samo šuti
                    : ┼áuti moj dje─Źa─Źe plavi
                    :
                    : (┼íuti moj dje─Źa─Źe plavi)
                    :
    title           : ┼áuti moj dje─Źa─Źe plavi
    WM/AlbumTitle   : Malo Pomalo
    WMFSDKVersion   : 9.00.00.3250
    IsVBR           : 0
    WM/Year         : 1994
    WM/EncodingTime : 18446744072371848576
    WM/UniqueFileIdentifier: ;
    WM/Composer     : Karma
    WM/Language     : hr
    WM/Publisher    : Groove Attack
    WM/Genre        : Electronica & Dance
    WM/AlbumArtist  : Karma
    WM/Provider     : User Feedback
    WM/SharedUserRating: 99
    WM/TrackNumber  : 13
    Author          : Karma
    WM/EncodingSettings: Lavf56.18.100
    Stream #0:0(cze): Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, 96 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
size=    4648kB time=00:04:34.73 bitrate= 138.6kbits/s
video:0kB audio:3235kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead:
43.663895%

You see the huge muxing overhead.
The comparison of the original and outout file is

Original file
Size:	3 343 892 B
Audio bitrate: 96kb/s
Overall bitrate: 97kb/s
Overhead: 1%

Copied file
Size:	4 759 638 B (42% growth)
Audio bitrate: 96kb/s
Overall bitrate: 138kb/s
Overhead: 43%

When I compare the files binary I see several blocks of 0 bytes in the transcoded file.

I guess this is issue how the ASF file is generated, that the 0 blocks should nopt be there, thus lowering the overhead.

Change History (2)

comment:1 Changed 3 years ago by Đonny

The original file can be downloaded from http://dzonny.cz/misc/temp/original.wma (to big to attach directly)

comment:2 Changed 3 years ago by cehoyos

  • Component changed from undetermined to avformat
  • Keywords asf added; ASF WMA copy lossless removed
  • Reproduced by developer set
  • Status changed from new to open
Note: See TracTickets for help on using tickets.