invalid data found when processing input ffmpeg

3,077 views
Skip to first unread message

comput...@gmail.com

unread,
Nov 11, 2015, 2:22:26 AM11/11/15
to Native-Client-Discuss
hi,all

i compiled ffmpeg to naclports,when i decode RTSP stram in nacl by ffmpeg ,it failed: invalid data found when processing input ffmpeg.
but the vlc work fine with the same RTSP.

the build.sh file of ffmpeg in naclports:

# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

EXECUTABLES="ffmpeg ffmpeg_g ffprobe ffprobe_g"

# needed for RLIMIT_CPU
EnableGlibcCompat

ConfigureStep() {

  SetupCrossEnvironment

  local extra_args=""
  if [ "${TOOLCHAIN}" = "pnacl" ]; then
    extra_args="--cc=pnacl-clang"
  elif [ "${TOOLCHAIN}" = "clang-newlib" ]; then
    extra_args="--cc=${CC}"
  fi

  if [ "${NACL_ARCH}" = "pnacl" ]; then
    extra_args+=" --arch=pnacl"
  elif [ "${NACL_ARCH}" = "arm" ]; then
    extra_args+=" --arch=arm"
  else
    extra_args+=" --arch=x86"
  fi

  LogExecute ${SRC_DIR}/configure \
    --cross-prefix=${NACL_CROSS_PREFIX}- \
    --target-os=linux \
    --enable-gpl \
    --enable-static \
    --enable-cross-compile \
    --disable-inline-asm \
    --disable-ssse3 \
    --disable-mmx \
    --disable-amd3dnow \
    --disable-amd3dnowext \
    --disable-indevs \
    --enable-libmp3lame \
    --enable-libvorbis \
    --enable-libtheora \
    --enable-libvpx \
    --disable-ffplay \
    --disable-ffserver \
    --enable-network \
    --enable-protocols \
    --enable-demuxer=rtsp \
    --enable-demuxer=rtp \
    --enable-demuxer=sdp \
    --enable-decoder=h264 \
    --prefix=${PREFIX} \
    ${extra_args}
}

TestStep() {
  SetupCrossPaths
  LogExecute make testprogs
}

i enabled rtsp.

in the main :
……
char option_key[]="rtsp_transport";
char option_value[]="tcp";
av_dict_set(&avdic,option_key,option_value,0);
int re = avformat_open_input(&pFormatCtx,filepath,NULL,&avdic);

avformat_open_input return -1094995529 it is mean "Invalid data found when processing input".

thanks!

Sam Clegg

unread,
Nov 11, 2015, 1:04:11 PM11/11/15
to native-cli...@googlegroups.com
I would start by investigating two possible reasons for this kind of failure:

(1) the program isn't using ffmpeg API correctly . To verify this can
you compile that exact same main() function on your desktop linux
system and verify that it works outside of NaCl. That way you know
for sure its a bug in the NaCl version and not a generic issue.

(2) a issue with the transport layer (could be a bug in nacl_io which
is providing the TCP/UDP implementation). I would try somehow dumping
the rtsp data as it arrives to verify you get the same data in the
desktop linux binary as you do in the NaCl binary. Is it an issue
with rtsp in particular? can you decode normal http:// streams?


>
> thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.
> To post to this group, send email to native-cli...@googlegroups.com.
> Visit this group at http://groups.google.com/group/native-client-discuss.
> For more options, visit https://groups.google.com/d/optout.

comput...@gmail.com

unread,
Nov 12, 2015, 3:10:26 AM11/12/15
to Native-Client-Discuss
hi,

i have tried http stream,and there is another error :

-107  : Transport endpoint is not connected 

comput...@gmail.com

unread,
Nov 12, 2015, 5:48:47 AM11/12/15
to Native-Client-Discuss
hi,
i test the same main with out nacl,it is work fine.
when i compile "using_ppapi_simple",there are two warning :

F:\work\naclsdk_win\pepper_46\examples\tutorial\using_ppapi_simple>make
F:/work/naclsdk_win/pepper_46/tools/make -C F:\work\naclsdk_win\pepper_46/src/ppapi_simple STAMPDIR=F:/work/naclsdk_win/pepper_46/examples/tutorial/using_ppapi_simple/glibc/Release
 F:/work/naclsdk_win/pepper_46/examples/tutorial/using_ppapi_simple/glibc/Release/ppapi_simple.stamp
make[1]: Entering directory 'F:/work/naclsdk_win/pepper_46/src/ppapi_simple'
make[1]: Leaving directory 'F:/work/naclsdk_win/pepper_46/src/ppapi_simple'
F:/work/naclsdk_win/pepper_46/tools/make -C F:\work\naclsdk_win\pepper_46/src/nacl_io STAMPDIR=F:/work/naclsdk_win/pepper_46/examples/tutorial/using_ppapi_simple/glibc/Release 
F:/work/naclsdk_win/pepper_46/examples/tutorial/using_ppapi_simple/glibc/Release/nacl_io.stamp
make[1]: Entering directory 'F:/work/naclsdk_win/pepper_46/src/nacl_io'
make[1]: Leaving directory 'F:/work/naclsdk_win/pepper_46/src/nacl_io'
  CC   glibc/Release/hello_world_x86_64.o
  LINK glibc/Release/using_ppapi_simple_unstripped_x86_64.nexe
libavformat.a(udp.o): In function `udp_close':
/home/baisy/pepper/naclports/out/build/ffmpeg/ffmpeg-2.6.1/libavformat/udp.c:934: warning: warning: pthread_cancel is not implemented and will always fail
libavformat.a(rtpdec.o): In function `ff_rtp_parse_open':
/home/baisy/pepper/naclports/out/build/ffmpeg/ffmpeg-2.6.1/libavformat/rtpdec.c:537: warning: warning: gethostname is not implemented and will always fail
  VALIDATE glibc/Release/using_ppapi_simple_unstripped_x86_64.nexe
  STRIP glibc/Release/using_ppapi_simple_x86_64.nexe
  CREATE_NMF glibc/Release/using_ppapi_simple.nmf

thanks!

On Thursday, November 12, 2015 at 2:04:11 AM UTC+8, Sam Clegg wrote:

Sam Clegg

unread,
Nov 12, 2015, 4:25:19 PM11/12/15
to native-cli...@googlegroups.com
On Thu, Nov 12, 2015 at 12:10 AM, <comput...@gmail.com> wrote:
> hi,
>
> i have tried http stream,and there is another error :
>
> -107 : Transport endpoint is not connected

Are you running with sockets enabled (either as a Chrome app with the
correct permissions or with --allow-nacl-socket-api=<hostname>)? If
not, then that sounds like the issue. If you have sockets enabled and
you are still getting this kind of error then you will need to start
looking at the network code in ffmpeg to see where/why its failing.
It could be that its using some socket API that is not supported by
nacl_io.

cheers,
sma
>> > email to native-client-di...@googlegroups.com.
>> > To post to this group, send email to native-cli...@googlegroups.com.
>> > Visit this group at
>> > http://groups.google.com/group/native-client-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to native-client-di...@googlegroups.com.
Message has been deleted

comput...@gmail.com

unread,
Nov 17, 2015, 2:11:06 AM11/17/15
to Native-Client-Discuss
hi,
as your advice ,i enable nacl-socket-api,but there have the same error.



thanks.
>> > To post to this group, send email to native-cli...@googlegroups.com.
>> > Visit this group at
>> > http://groups.google.com/group/native-client-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Sam Clegg

unread,
Nov 17, 2015, 5:39:57 PM11/17/15
to native-cli...@googlegroups.com
On Mon, Nov 16, 2015 at 11:11 PM, <comput...@gmail.com> wrote:
hi,
as your advice ,i enable nacl-socket-api,but there have the same error.




The --enable-nacl-socket-api option requires and argument.  e.g. --enable-nacl-socket-api=localhost.  Do you have access the stdout of the chrome process?  If so, then you should see error when attempting to use the socket API without enabling it correctly.

>> > To post to this group, send email to native-cli...@googlegroups.com.
>> > Visit this group at
>> > http://groups.google.com/group/native-client-discuss.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Native-Client-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> To post to this group, send email to native-cli...@googlegroups.com.
> Visit this group at http://groups.google.com/group/native-client-discuss.
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to native-client-di...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages