[Libav-user] Green Flicker/Flash iOS

Dee Bitros Dee.Bitros at navico.com
Tue Apr 26 06:51:56 CEST 2016


I’m currently connecting to a rstp stream from an external device decoding a h264 format using ffmpeg on an iOS device developing on Xcode 7.3. The FFMpeg library worked well for the 32bit version but after the need to convert it to 64bit i’ve been receiving random green flashes/flickers while displaying this rtsp stream.

I have converted the FFMPEG library using this this link - https://github.com/kewlbear/FFmpeg-iOS-build-script - to 64bit. My current configuration is as follows. I’ve attached my current build script with the configuration i’m using.

I’ve checked the logs, no corrupt frames or messages are printed during the flickering. I’ve tried changing the configuration at build time of the FFMPEG library . I’m stumped on the solution any help and guidance in the right direction would be great.



=====================

#!/bin/sh

# directories
SOURCE="ffmpeg-3.0"
FAT="FFmpeg-iOS"

SCRATCH="scratch"
# must be an absolute path
THIN=`pwd`/"thin"

# absolute path to x264 library
#X264=`pwd`/fat-x264

#FDK_AAC=`pwd`/fdk-aac/fdk-aac-ios

CONFIGURE_FLAGS="--enable-cross-compile --disable-debug --disable-programs \
                 --disable-doc --enable-pic"

if [ "$X264" ]
then
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-gpl --enable-libx264"
fi

if [ "$FDK_AAC" ]
then
CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-libfdk-aac"
fi

# avresample
#CONFIGURE_FLAGS="$CONFIGURE_FLAGS --enable-avresample"

ARCHS="arm64 armv7 armv7s x86_64 i386"

COMPILE="y"
LIPO="y"

DEPLOYMENT_TARGET="6.0"

if [ "$*" ]
then
if [ "$*" = "lipo" ]
then
# skip compile
COMPILE=
else
ARCHS="$*"
if [ $# -eq 1 ]
then
# skip lipo
LIPO=
fi
fi
fi

if [ "$COMPILE" ]
then
if [ ! `which yasm` ]
then
echo 'Yasm not found'
if [ ! `which brew` ]
then
echo 'Homebrew not found. Trying to install...'
                        ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" \
|| exit 1
fi
echo 'Trying to install Yasm...'
brew install yasm || exit 1
fi
if [ ! `which gas-preprocessor.pl` ]
then
echo 'gas-preprocessor.pl not found. Trying to install...'
(curl -L https://github.com/libav/gas-preprocessor/raw/master/gas-preprocessor.pl \
-o /usr/local/bin/gas-preprocessor.pl \
&& chmod +x /usr/local/bin/gas-preprocessor.pl) \
|| exit 1
fi

if [ ! -r $SOURCE ]
then
echo 'FFmpeg source not found. Trying to download...'
curl http://www.ffmpeg.org/releases/$SOURCE.tar.bz2 | tar xj \
|| exit 1
fi

CWD=`pwd`
for ARCH in $ARCHS
do
echo "building $ARCH..."
mkdir -p "$SCRATCH/$ARCH"
cd "$SCRATCH/$ARCH"

CFLAGS="-arch $ARCH"
if [ "$ARCH" = "i386" -o "$ARCH" = "x86_64" ]
then
   PLATFORM="iPhoneSimulator"
   CFLAGS="$CFLAGS -mios-simulator-version-min=$DEPLOYMENT_TARGET"
else
   PLATFORM="iPhoneOS"
   CFLAGS="$CFLAGS -mios-version-min=$DEPLOYMENT_TARGET -fembed-bitcode"
   if [ "$ARCH" = "arm64" ]
   then
       EXPORT="GASPP_FIX_XCODE5=1"
   fi
fi

XCRUN_SDK=`echo $PLATFORM | tr '[:upper:]' '[:lower:]'`
CC="xcrun -sdk $XCRUN_SDK clang"
CXXFLAGS="$CFLAGS"
LDFLAGS="$CFLAGS"
if [ "$X264" ]
then
CFLAGS="$CFLAGS -I$X264/include"
LDFLAGS="$LDFLAGS -L$X264/lib"
fi
if [ "$FDK_AAC" ]
then
CFLAGS="$CFLAGS -I$FDK_AAC/include"
LDFLAGS="$LDFLAGS -L$FDK_AAC/lib"
fi

TMPDIR=${TMPDIR/%\/} $CWD/$SOURCE/configure \
   --target-os=darwin \
            --disable-everything \
            --disable-asm \
            --disable-doc \
            --disable-shared \
            --enable-static \
            --enable-decoder=aac \
            --enable-decoder=mpegvideo \
            --enable-decoder=h264 \
            --enable-parser=h264 \
            --enable-parser=aac \
            --enable-parser=aac_latm \
            --enable-parser=mpeg4video \
            --enable-parser=mpegvideo \
            --enable-demuxer=aac \
            --enable-demuxer=mpegvideo \
            --enable-demuxer=sdp \
            --enable-demuxer=h264 \
            --enable-demuxer=rtsp \
            --enable-demuxer=rtp \
            --enable-protocol=rtp \
            --fatal-warnings \
   --arch=$ARCH \
   --cc="$CC" \
   $CONFIGURE_FLAGS \
   --extra-cflags="$CFLAGS" \
   --extra-ldflags="$LDFLAGS" \
   --prefix="$THIN/$ARCH" \
|| exit 1

make -j3 install $EXPORT || exit 1
cd $CWD
done
fi

if [ "$LIPO" ]
then
echo "building fat binaries..."
mkdir -p $FAT/lib
set - $ARCHS
CWD=`pwd`
cd $THIN/$1/lib
for LIB in *.a
do
cd $CWD
echo lipo -create `find $THIN -name $LIB` -output $FAT/lib/$LIB 1>&2
lipo -create `find $THIN -name $LIB` -output $FAT/lib/$LIB || exit 1
done

cd $CWD
cp -rf $THIN/$1/include $FAT
fi

echo Done


==========================


Begin forwarded message:

From: Dee Bitros <Dee.Bitros at navico.com<mailto:Dee.Bitros at navico.com>>
Date: 26 April 2016 at 4:39:25 PM NZST
To: "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." <libav-user at ffmpeg.org<mailto:libav-user at ffmpeg.org>>
Subject: [Libav-user] Green Flicker/Flash iOS

I’m currently connecting to a rstp stream from an external device decoding a h264 format using ffmpeg on an iOS device developing on Xcode 7.3. The FFMpeg library worked well for the 32bit version but after the need to convert it to 64bit i’ve been receiving random green flashes/flickers while displaying this rtsp stream.

I have converted the FFMPEG library using this this link - https://github.com/kewlbear/FFmpeg-iOS-build-script - to 64bit. My current configuration is as follows. I’ve attached my current build script with the configuration i’m using.

I’ve checked the logs, no corrupt frames or messages are printed during the flickering. I’ve tried changing the configuration at build time of the FFMPEG library . I’m stumped on the solution any help and guidance in the right direction would be great.


From: Postmaster
Date: 26 April 2016 at 4:39:34 PM NZST
To: "libav-user@" <ffmpeg.orglibav-user at ffmpeg.org<mailto:ffmpeg.orglibav-user at ffmpeg.org>>
Subject: bscript.txt


Attachment Notice

The following attachment was removed from the associated email message.

File Name
bscript.txt
File Size
4065 Bytes


Attachment management policies limit the types of attachments that are allowed to pass through the email infrastructure.

Attachments are monitored and audited for security reasons.


_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org<mailto:Libav-user at ffmpeg.org>
http://ffmpeg.org/mailman/listinfo/libav-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20160426/a550f6d0/attachment.html>


More information about the Libav-user mailing list