<div dir="ltr">I will give it a try. Thanks for the hint.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 13, 2015 at 10:27 AM, wm4 <span dir="ltr"><<a href="mailto:nfxjfg@googlemail.com" target="_blank">nfxjfg@googlemail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 13 Feb 2015 10:22:46 -0600<br>
Cen-bi Liu <<a href="mailto:cenbiliu@gmail.com">cenbiliu@gmail.com</a>> wrote:<br>
<br>
> yes.<br>
><br>
<br>
How about open(filename, O_CREAT | O_WRONLY | O_CLOEXEC, 0666)? This is<br>
approximately what libavformat calls. You can also check strace output.<br>
<div class="HOEnZb"><div class="h5"><br>
> On Fri, Feb 13, 2015 at 10:19 AM, wm4 <<a href="mailto:nfxjfg@googlemail.com">nfxjfg@googlemail.com</a>> wrote:<br>
><br>
> > On Fri, 13 Feb 2015 10:08:29 -0600<br>
> > Cen-bi Liu <<a href="mailto:cenbiliu@gmail.com">cenbiliu@gmail.com</a>> wrote:<br>
> ><br>
> > > Hi all,<br>
> > ><br>
> > > I'm new to ffmpeg and trying to use ffmpeg as a shared library in Android<br>
> > > to convert PCM to an .mp4 file by following tutorials.<br>
> > ><br>
> > > I hit a snag in my openOutputFile function, I have the following which<br>
> > has<br>
> > > given me an error (passing in "/sdcard/a.mp4" for filename):<br>
> > ><br>
> > > if ((error = avio_open(&output_io_context, filename,<br>
> > >                        AVIO_FLAG_WRITE)) < 0) {<br>
> > >     __android_log_print(ANDROID_LOG_ERROR, "encoder","couldn't open<br>
> > > output file");<br>
> > >     exit(1);}<br>
> > ><br>
> > > My configure for ffmpeg compilation is as follows:<br>
> > ><br>
> > > ./configure \--prefix=$PREFIX \--enable-demuxer=mov<br>
> > > \--enable-muxer=mov \--enable-libvpx \--enable-libvorbis<br>
> > > \--enable-protocol=file \--enable-shared \--disable-static<br>
> > > \--disable-doc \--disable-ffmpeg \--disable-ffplay \--disable-ffprobe<br>
> > > \--disable-ffserver \--disable-avdevice \--disable-symver<br>
> > > \--cross-prefix=$TOOLCHAIN/bin/arm-linux-androideabi-<br>
> > > \--target-os=linux \--arch=arm \--enable-cross-compile<br>
> > > \--sysroot=$SYSROOT \--extra-cflags="-Os -fpic $ADDI_CFLAGS"<br>
> > > \--extra-ldflags="$ADDI_LDFLAGS" \<br>
> > ><br>
> > > When searching, I have come across others' experiencing similar issues<br>
> > and<br>
> > > added the --enable-protocol=file and --enable-muxer=mov when compiling<br>
> > > ffmpeg. I did add the permissions to external storage in the manifest.xml<br>
> > > file. Please let me know what you think.<br>
> > ><br>
> > > Cheers,<br>
> > ><br>
> > > Cen<br>
> ><br>
> > Does fopen() work?<br>
> > _______________________________________________<br>
> > Libav-user mailing list<br>
> > <a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
> > <a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
> ><br>
><br>
><br>
><br>
<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">===============================<br><br>Cen Bi Liu<br></div>
</div>