2

I am cross compiling gst-libav-1.8.0 and having some problem blocking me for several days. Would you please help?

From build.log there are many demuxers enabled. But when using gst-inspect I only find following demuxers. no error is found in build.out

when i run gst-inspect i got following warning. not sure whether it has something to do with this issue:

(gst-inspect-1.0:4419): GStreamer-WARNING **: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual. This should normally not be required though.

i use following build script for cross compiling:

#!/bin/sh

ROOT=$PWD/../../../../..

DIRECTORY=$ROOT/../gst/usr/local

if [ ! -d "$DIRECTORY" ]; then
  mkdir -p $DIRECTORY
fi

if [ ! -d "$DIRECTORY" ]; then
  exit;
fi

export PATH="$ROOT/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin:$PATH"
export SYS_ROOT="$ROOT/prebuilts/ndk/9/platforms/android-19/arch-arm"
export CC="arm-linux-androideabi-gcc --sysroot=$SYS_ROOT"
export CXX="arm-linux-androideabi-g++"
export LD="arm-linux-androideabi-ld" 
export AR="arm-linux-androideabi-ar"
export RANLIB="arm-linux-androideabi-ranlib"
export STRIP="arm-linux-androideabi-strip"

#./configure --host=arm-linux-androideabi --prefix=$DIRECTORY --disable-rpath --includedir=$DIRECTORY/include --libdir=$DIRECTORY/lib --exec-prefix=$DIRECTORY CFLAGS="-fPIE -pie" LDFLAGS="-fPIE -pie" --with-pkg-config-path="$DIRECTORY/lib/pkgconfig" --with-libav-extra-configure="--disable-yasm --pkgconfigdir=$DIRECTORY/lib/pkgconfig --enable-ffmpeg"
./configure --host=arm-linux-androideabi --prefix=$DIRECTORY --disable-rpath --includedir=$DIRECTORY/include --libdir=$DIRECTORY/lib --exec-prefix=$DIRECTORY CFLAGS="-fPIE -pie" LDFLAGS="-fPIE -pie" --with-pkg-config-path="$DIRECTORY/lib/pkgconfig" --with-libav-extra-configure="--disable-yasm"

make 
make install

use gst-inspect only find following demuxers:

./gst-inspect-1.0 libav |grep demux 
  avdemux_yuv4mpegpipe: libav YUV4MPEG pipe demuxer
  avdemux_wsvqa: libav Westwood Studios VQA demuxer
  avdemux_wsaud: libav Westwood Studios audio demuxer
  avdemux_wc3movie: libav Wing Commander III movie demuxer
  avdemux_voc: libav Creative Voice demuxer
  avdemux_vmd: libav Sierra VMD demuxer
  avdemux_tta: libav TTA (True Audio) demuxer
  avdemux_psxstr: libav Sony Playstation STR demuxer
  avdemux_sol: libav Sierra SOL demuxer
  avdemux_smk: libav Smacker demuxer
  avdemux_film_cpk: libav Sega FILM / CPK demuxer
  avdemux_pva: libav TechnoTrend PVA demuxer
  avdemux_nuv: libav NuppelVideo demuxer
  avdemux_nut: libav NUT demuxer
  avdemux_nsv: libav Nullsoft Streaming Video demuxer
  avdemux_mxf: libav MXF (Material eXchange Format) demuxer
  avdemux_mpc8: libav Musepack SV8 demuxer
  avdemux_mpc: libav Musepack demuxer
  avdemux_mmf: libav Yamaha SMAF demuxer
  avdemux_mm: libav American Laser Games MM demuxer
  avdemux_ipmovie: libav Interplay MVE demuxer
  avdemux_idcin: libav id Cinematic demuxer
  avdemux_gxf: libav GXF (General eXchange Format) demuxer
  avdemux_gif: libav CompuServe Graphics Interchange Format (GIF) demuxer
  avdemux_4xm: libav 4X Technologies demuxer
  avdemux_ffm: libav FFM (FFserver live feed) demuxer
  avdemux_ea: libav Electronic Arts Multimedia demuxer
  avdemux_daud: libav D-Cinema audio demuxer
  avdemux_avs: libav AVS demuxer
  avdemux_ape: libav Monkey's Audio demuxer
  avdemux_aiff: libav Audio IFF demuxer

but in build.log it says following demuxers are enabled:

Enabled demuxers:
aa          fourxm          mpc8
aac         frm         mpegps
ac3         fsb         mpegts
acm         g722            mpegtsraw
act         g723_1          mpegvideo
adf         g729            mpjpeg
adp         genh            mpl2
ads         gif         mpsub
adx         gsm         msf
aea         gxf         msnwc_tcp
afc         h261            mtv
aiff            h263            mv
amr         h264            mvi
anm         hevc            mxf
apc         hls         mxg
ape         hnm         nc
apng            ico         nistsphere
aqtitle         idcin           nsv
asf         idf         nut
asf_o           iff         nuv
ass         ilbc            ogg
ast         image2          oma
au          image2_alias_pix    paf
avi         image2_brender_pix  pcm_alaw
avr         image2pipe      pcm_f32be
avs         image_bmp_pipe      pcm_f32le
bethsoftvid     image_dds_pipe      pcm_f64be
bfi         image_dpx_pipe      pcm_f64le
bfstm           image_exr_pipe      pcm_mulaw
bink            image_j2k_pipe      pcm_s16be
bintext         image_jpeg_pipe     pcm_s16le
bit         image_jpegls_pipe   pcm_s24be
bmv         image_pictor_pipe   pcm_s24le
boa         image_png_pipe      pcm_s32be
brstm           image_qdraw_pipe    pcm_s32le
c93         image_sgi_pipe      pcm_s8
caf         image_sunrast_pipe  pcm_u16be
cavsvideo       image_tiff_pipe     pcm_u16le
cdg         image_webp_pipe     pcm_u24be
cdxl            ingenient       pcm_u24le
cine            ipmovie         pcm_u32be
concat          ircam           pcm_u32le
data            iss         pcm_u8
daud            iv8         pjs
dcstr           ivf         pmp
dfa         ivr         pva
dirac           jacosub         pvf
dnxhd           jv          qcp
dsf         live_flv        r3d
dsicin          lmlm4           rawvideo
dss         loas            realtext
dts         lrc         redspark
dtshd           lvf         rl2
dv          lxf         rm
dvbsub          m4v         roq
dxa         matroska        rpl
ea          mgsts           rsd
ea_cdata        microdvd        rso
eac3            mjpeg           sami
epaf            mlp         sbg
ffm         mlv         sdr2
ffmetadata      mm          segafilm
filmstrip       mmf         shorten
flac            mov         siff
flic            mp3         sln
flv         mpc         smacker
smjpeg          tmv         w64
smush           truehd          wav
sol         tta         wc3
sox         tty         webm_dash_manifest
spdif           txd         webvtt
srt         v210            wsaud
stl         v210x           wsvqa
str         vag         wtv
subviewer       vc1         wv
subviewer1      vc1t            wve
sup         vivo            xa
svag            vmd         xbin
swf         vobsub          xmv
tak         voc         xvag
tedcaptions     vpk         xwma
thp         vplayer         yop
threedostr      vqf         yuv4mpegpipe
tiertexseq
Jack
  • 21
  • 5
  • I think they may be blacklisted.. you can run `gst-inspect-1.0 -b` check it like [here](http://stackoverflow.com/a/27407328/3876138) – nayana Aug 19 '16 at 10:02
  • Hi Otopoisky, thanks very much for your reply! i will give a try later. – Jack Aug 20 '16 at 12:57
  • there is no blacklisted elements. ./gst-inspect-1.0 -b Blacklisted files: Total count: 0 blacklisted files when i run gst-inspect i got following warning. not sure whether it has something to do with this issue: (gst-inspect-1.0:4419): GStreamer-WARNING **: External plugin loader failed. This most likely means that the plugin loader helper binary was not found or could not be run. You might need to set the GST_PLUGIN_SCANNER environment variable if your setup is unusual. This should normally not be required though. – Jack Aug 22 '16 at 00:57

2 Answers2

0

after enable the log i found the clue. From the source code, it seems some demuxers are disabled for a purpose:

in file ext/libav/gstavdemux.c
    /* Set the rank of demuxers known to work to MARGINAL.
 * Set demuxers for which we already have another implementation to NONE
 * Set All others to NONE*/

After following code modification, all demuxers are registered:

    if (1) {
/*if (!strcmp (in_plugin->name, "wsvqa") ||
    !strcmp (in_plugin->name, "wsaud") ||
    !strcmp (in_plugin->name, "wc3movie") ||
    !strcmp (in_plugin->name, "voc") ||
    !strcmp (in_plugin->name, "tta") ||
    !strcmp (in_plugin->name, "sol") ||
    !strcmp (in_plugin->name, "smk") ||
    !strcmp (in_plugin->name, "vmd") ||
    !strcmp (in_plugin->name, "film_cpk") ||
    !strcmp (in_plugin->name, "ingenient") ||
    !strcmp (in_plugin->name, "psxstr") ||
    !strcmp (in_plugin->name, "nuv") ||
    !strcmp (in_plugin->name, "nut") ||
    !strcmp (in_plugin->name, "nsv") ||
    !strcmp (in_plugin->name, "mxf") ||
    !strcmp (in_plugin->name, "mmf") ||
    !strcmp (in_plugin->name, "mm") ||
    !strcmp (in_plugin->name, "ipmovie") ||
    !strcmp (in_plugin->name, "ape") ||
    !strcmp (in_plugin->name, "RoQ") ||
    !strcmp (in_plugin->name, "idcin") ||
    !strcmp (in_plugin->name, "gxf") ||
    !strcmp (in_plugin->name, "ffm") ||
    !strcmp (in_plugin->name, "ea") ||
    !strcmp (in_plugin->name, "daud") ||
    !strcmp (in_plugin->name, "avs") ||
    !strcmp (in_plugin->name, "aiff") ||
    !strcmp (in_plugin->name, "4xm") ||
    !strcmp (in_plugin->name, "yuv4mpegpipe") ||
    !strcmp (in_plugin->name, "pva") ||
    !strcmp (in_plugin->name, "mpc") ||
    !strcmp (in_plugin->name, "mpc8") || !strcmp (in_plugin->name, "gif"))
*/
  rank = GST_RANK_MARGINAL;
}
else {
  GST_DEBUG ("ignoring %s", in_plugin->name);
  rank = GST_RANK_NONE;
  goto next;
}

Now i get all demuxers. Will verify them later.

Jack
  • 21
  • 5
  • this may be a bad way to enable demux plugins in GStreamer. GST_RANK_MARGINAL means that it can be automatically chosen by GStreamer. – Alan Aug 22 '16 at 06:56
  • actually we used some of those demuxers from FFmpeg in other project. so the plan in GStreamer project is still to keep using FFmpeg version. By "automatically chosen by GStreamer", how does it work? – Jack Aug 22 '16 at 07:31
0

Since these demuxers are supported in libav. There is a nicer way to enable certain demuxer plugins.

Demuxer plugins could be configured use below command:

  --enable-muxer=NAME      enable muxer NAME
  # As you can see all muxers are disabled by default
  --disable-muxers         disable all muxers

You can find the whole configure script under the libav sources:

alan@libav-11.7$ls
arch.mak         avprobe.c               COPYING.GPLv3     libavformat    README.md
avconv.c         Changelog               COPYING.LGPLv2.1  libavresample  RELEASE
avconv_dxva2.c   cmdutils.c              COPYING.LGPLv3    libavutil      tests
avconv_filter.c  cmdutils_common_opts.h  CREDITS           library.mak    tools
avconv.h         cmdutils.h              doc               libswscale     VERSION
avconv_opt.c     common.mak              INSTALL           LICENSE        version.sh
avconv_vda.c     compat                  libavcodec        Makefile
avconv_vdpau.c   configure               libavdevice       presets
avplay.c         COPYING.GPLv2           libavfilter       README

So please use

alan@libav-11.7$./configure --enable-demuxer=mux_name1 mux_name2
Alan
  • 469
  • 10
  • 26
  • i think by default they are all enabled. Also i can see this from build.log as follows. but still they are not built out if i don't enable them via above code change. In build.log, Enabled demuxers: aa fourxm mpc8 aac frm mpegps ac3 fsb mpegts acm g722 mpegtsraw act g723_1 mpegvideo adf g729 mpjpeg ... – Jack Aug 22 '16 at 07:20