View Single Post
Old 2nd March 2018, 19:16   #7  |  Link
mkver
Registered User
 
Join Date: May 2016
Posts: 197
I didn't thought that others stumbled upon this problem, too. I actually thought that it never ever worked at all and that no one used it so no one complained. It seems that I stand corrected. Just out of curiosity: When did it stop working?
PS: That they are smaller now is probably due to the disabling of some audio codecs. (I tested an earlier version of MABS and there was code for disabling, but it didn't work.) One can reduce the size of the builds even further:
The size of my light x264 build with MABS: 17376256 B (all builds are x64).
After disabling all bitstream filters and enabling the extract_extradata-bsf (my test show this to be needed to actually get the codec parameters from transport streams; the h2645_mp4toannexb bsf are not needed for h2645 in mp4/Matroska) this is down to 17159680 B.
After also (trying to, see below) disabling subtitle decoders this is down to 17126912 B.
And looking at the list of disabled codecs I noticed that quite a few audio and subtitle decoders aren't disabled. The reason: MABS currently only disables decoders for which there is an encoder of the same name (I think I will report this). Fixing this brings the size down to 14960128 B. (Side issue: I have observed that if the input file has an mp2 audio track, lavf now emits a warning that it couldn't find the codec parameters for this stream. This might also happen for other codecs; similar things might also happen with the currently used list of codecs to deactivate. Does anyone know a way to stop lavf emitting warnings for non-video codecs?)
Finally, I also disabled some of the things that ffmpeg enables by default, but which is (to the best of my knowledge) unusable for lavf inside x264.exe: I added --disable-amf --disable-d3d11va --disable-dxva2 --disable-iconv --disable-schannel --disable-cuda --disable-cuvid. Now the size is only 13884928 B.
The relevant part of my script now looks like the following:
Code:
                audio_codecs=(
                    $(sed -n '/audio codecs/,/external libraries/p' ../libavcodec/allcodecs.c | \
                      sed -n "s/^[^#]*extern.* *ff_\([^ ]*\)_decoder;/\1/p")
                )
                LDFLAGS+=" -L$MINGW_PREFIX/lib" \
                    log configure ../configure "${FFMPEG_BASE_OPTS[@]}" \
                    --prefix="$LOCALDESTDIR/opt/lightffmpeg" \
                    --disable-{programs,devices,filters,encoders,muxers,debug,sdl2,network,protocols,doc,bsfs} \
                    --enable-protocol=file,pipe \
                    --disable-decoder="$(IFS=, ; echo "${audio_codecs[*]}")" --enable-gpl \
                    --enable-bsf=extract_extradata \
                    --disable-amf --disable-d3d11va --disable-dxva2 --disable-iconv --disable-schannel --disable-cuda --disable-cuvid
                unset audio_codecs
Any suggestions/comments/improvements?
mkver is offline   Reply With Quote