Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./compile-ffmpeg.sh: 133: ./compile-ffmpeg.sh: source: not found #14

Closed
ghost opened this issue Apr 19, 2014 · 33 comments
Closed

./compile-ffmpeg.sh: 133: ./compile-ffmpeg.sh: source: not found #14

ghost opened this issue Apr 19, 2014 · 33 comments

Comments

@ghost
Copy link

ghost commented Apr 19, 2014

Please help me

[*] make NDK standalone toolchain

./compile-ffmpeg.sh: 85: [: Linux: unexpected operator
WARNING: The shell running this script isn't bash. Although we try to avoid bashism in scripts, things can happen.
Copying prebuilt binaries...
Copying sysroot headers and libraries...
Copying libstdc++ headers and libraries...
Copying files to: /home/longtq/ijkplayer-android-master/android/build/ffmpeg-armv7a/toolchain
Cleaning up...
Done.


[*] check ffmpeg env

./compile-ffmpeg.sh: 133: ./compile-ffmpeg.sh: source: not found
longtq@longtq:~/ijkplayer-android-master/android$

@bbcallen
Copy link
Contributor

Which platform did you build on?
I'm afraid you have to fix it by yourself, since I can't reproduce this error on my build env.

@ghost
Copy link
Author

ghost commented Apr 21, 2014

Hi bbcallen.

Now I build on linux (ubuntu 12.04). Can you support me TO build on eclipse tool, pls do step by step , make a sreenshot and send it to me

@ghost
Copy link
Author

ghost commented Apr 21, 2014

If using command line build, can you DO IT step by step, make a screenshot on YOUR environment and sent it to me ?

@bbcallen
Copy link
Contributor

Here is my build steps.

$ sh compile-ffmpeg.sh 
====================
[*] check env
====================
NDKr9c (64-bit) detected

--------------------
[*] make NDK standalone toolchain
--------------------
build on darwin-x86_64
Copying prebuilt binaries...
Copying sysroot headers and libraries...
Copying libstdc++ headers and libraries...
Copying files to: /Users/bbcallen/Documents/bili/ibili-ios-xcode5/ibiliplayer/contrib/ijkplayer/android/build/ffmpeg-armv7a/toolchain
Cleaning up...
Done.

--------------------
[*] check ffmpeg env
--------------------

--------------------
[*] configurate ffmpeg
--------------------
Configured with: --prefix=/Applications/Xcode5.0.2.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Configured with: --prefix=/Applications/Xcode5.0.2.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1

… FFmpeg configure and build logs blablabla ….

INSTALL libavformat/libavformat.a
INSTALL libavcodec/libavcodec.a
INSTALL libswresample/libswresample.a
INSTALL libswscale/libswscale.a
INSTALL libavutil/libavutil.a
INSTALL libavformat/avformat.h
INSTALL libavformat/avio.h
INSTALL libavformat/version.h
INSTALL libavformat/libavformat.pc
INSTALL libavcodec/avcodec.h
INSTALL libavcodec/avfft.h
INSTALL libavcodec/dxva2.h
INSTALL libavcodec/old_codec_ids.h
INSTALL libavcodec/vaapi.h
INSTALL libavcodec/vda.h
INSTALL libavcodec/vdpau.h
INSTALL libavcodec/version.h
INSTALL libavcodec/xvmc.h
INSTALL libavcodec/libavcodec.pc
INSTALL libswresample/swresample.h
INSTALL libswresample/version.h
INSTALL libswresample/libswresample.pc
INSTALL libswscale/swscale.h
INSTALL libswscale/version.h
INSTALL libswscale/libswscale.pc
INSTALL libavutil/adler32.h
INSTALL libavutil/aes.h
INSTALL libavutil/attributes.h
INSTALL libavutil/audio_fifo.h
INSTALL libavutil/audioconvert.h
INSTALL libavutil/avassert.h
INSTALL libavutil/avstring.h
INSTALL libavutil/avutil.h
INSTALL libavutil/base64.h
INSTALL libavutil/blowfish.h
INSTALL libavutil/bprint.h
INSTALL libavutil/bswap.h
INSTALL libavutil/buffer.h
INSTALL libavutil/channel_layout.h
INSTALL libavutil/common.h
INSTALL libavutil/cpu.h
INSTALL libavutil/crc.h
INSTALL libavutil/error.h
INSTALL libavutil/eval.h
INSTALL libavutil/fifo.h
INSTALL libavutil/file.h
INSTALL libavutil/frame.h
INSTALL libavutil/hmac.h
INSTALL libavutil/imgutils.h
INSTALL libavutil/intfloat.h
INSTALL libavutil/intfloat_readwrite.h
INSTALL libavutil/intreadwrite.h
INSTALL libavutil/lfg.h
INSTALL libavutil/log.h
INSTALL libavutil/mathematics.h
INSTALL libavutil/md5.h
INSTALL libavutil/mem.h
INSTALL libavutil/murmur3.h
INSTALL libavutil/dict.h
INSTALL libavutil/old_pix_fmts.h
INSTALL libavutil/opt.h
INSTALL libavutil/parseutils.h
INSTALL libavutil/pixdesc.h
INSTALL libavutil/pixfmt.h
INSTALL libavutil/random_seed.h
INSTALL libavutil/rational.h
INSTALL libavutil/ripemd.h
INSTALL libavutil/samplefmt.h
INSTALL libavutil/sha.h
INSTALL libavutil/sha512.h
INSTALL libavutil/time.h
INSTALL libavutil/timecode.h
INSTALL libavutil/timestamp.h
INSTALL libavutil/version.h
INSTALL libavutil/xtea.h
INSTALL libavutil/lzo.h
INSTALL libavutil/avconfig.h
INSTALL libavutil/libavutil.pc

--------------------
[*] link ffmpeg
--------------------

--------------------
[*] Finished
--------------------
# to continue to build ijkplayer, run script below,
sh compile-ijk.sh 
$

@bbcallen
Copy link
Contributor

I'm afraid I'm not a shell expert to give you a blind fix.

Try google the error message, "The shell running this script isn't bash. Although we try to avoid bashism in scripts, things can happen.", and find out what really happened there on you build env.

@ghost
Copy link
Author

ghost commented Apr 21, 2014

Can you support me to build on eclipse tool ?

@bbcallen
Copy link
Contributor

For the wrapper project, yes. There are project files under android/ijkmediaplayer.
For the FFmpeg, no. I don't think FFmpeg itself maintains any Android.mk to support that.

No offense, I think vitamio would be more suitable for you. It has already built ffmpeg for you.
https://www.vitamio.org

@ghost
Copy link
Author

ghost commented Apr 21, 2014

thanks bbcallen, can you add my skype ?, my skype : long_j2ee

@bbcallen
Copy link
Contributor

Sorry, I don't use skype…

@ghost
Copy link
Author

ghost commented Apr 21, 2014

Please help me.

INSTALL libavutil/libavutil.pc
\n--------------------

[*] link ffmpeg

./compile-ffmpeg.sh: line 178: ccache: command not found
longtq@longtq:~/ijkplayer-android-master/android$

@ghost
Copy link
Author

ghost commented Apr 21, 2014

💃

[armeabi-v7a] StaticLibrary : libcpufeatures.a
[armeabi-v7a] SharedLibrary : libijksdl.so
[armeabi-v7a] SharedLibrary : libijkplayer.so
[armeabi-v7a] Install : libijkplayer.so => libs/armeabi-v7a/libijkplayer.so
[armeabi-v7a] Install : libijksdl.so => libs/armeabi-v7a/libijksdl.so
[armeabi-v7a] Install : libijkutil.so => libs/armeabi-v7a/libijkutil.so
[armeabi-v7a] Install : libstlport_shared.so => libs/armeabi-v7a/libstlport_shared.so

@ghost
Copy link
Author

ghost commented Apr 21, 2014

Ubuntu 12.04 LTS

  1. sudo apt-get install gcc-4.6-base cpp-4.6 libgomp1 libquadmath0 libc6-dev
  2. sudo apt-get install ccache
  3. bash ./compile-ijk.sh

@bbcallen
Copy link
Contributor

Seems fixed?

@ghost
Copy link
Author

ghost commented Apr 22, 2014

yes, i fixed it

@ghost
Copy link
Author

ghost commented Apr 22, 2014

why do you only support ffmpeg-armv7a ? , i need support ffmpeg-arm, ffmpeg-mip, ffmpeg-x86 can you help me ?

@bbcallen
Copy link
Contributor

I don't have that kinds of devices.

@ghost
Copy link
Author

ghost commented Apr 22, 2014

I think that all existing devices based on the ARM-V7 architecture , so no need for x86 and mip

@ghost
Copy link
Author

ghost commented Apr 22, 2014

doesn't it support protocol rstp ?

@bbcallen
Copy link
Contributor

@ghost
Copy link
Author

ghost commented Apr 23, 2014

i see it enable, that's right ?

@bbcallen
Copy link
Contributor

So it seems, but I don't have any rtsp stream for testing. Do you have?

@ghost
Copy link
Author

ghost commented Apr 24, 2014

please reference here : http://www.wowza.com/html/mobile.html

@bbcallen
Copy link
Contributor

rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
Plays OK on my MOTO MB886(ATRIX HD).

No deeper test yet.

@ghost
Copy link
Author

ghost commented Apr 24, 2014

do you think ijkplayer better than Vitamino ? :)

@bbcallen
Copy link
Contributor

Depends on what you need.

Vitamin is better If you doesn't want to care about native c/c++ development.

Ijkplayer is better only if you are interesting in the native c/c++ development, and need a first-step implement.

Vitamio's Advantage:

  1. Vitamio supports armv6, mips, while ijkplayer doesn't and won't.
  2. Vitamio supports hardware decode, while ijkplayer doest't yet.
  3. Vitamio has more developers as far as i can tell.
  4. Vitamio has more feature, such as snapshot and media scanner.

Ijkplayer's Advantage:

  1. Open source native c/c++, which is closed in vitamio.

@ghost
Copy link
Author

ghost commented Apr 24, 2014

can you development ijkplayer to support hardware decode as Vitamio ?

@bbcallen
Copy link
Contributor

It's a "TODO"

@liugb
Copy link

liugb commented Apr 24, 2014

@longtq-setacinq ,How do you fix "./compile-ffmpeg.sh: source: not found" ?

@jjlauer
Copy link

jjlauer commented Apr 29, 2014

Easiest fix is simple replace first line of #!/bin/sh with #!/bin/bash to fix the source error.

@bbcallen the most portable way to ensure bash is used is to have a first line of the following:

#!/usr/bin/env bash

@ghost
Copy link
Author

ghost commented Apr 29, 2014

@liugb , if you using Linux : bash ./compile-ffmpeg.sh, bash ./compile-ijk.sh ("longtq@longtq:~$ bash ./compile-ffmpeg.sh")

@liugb
Copy link

liugb commented Apr 29, 2014

thanks @longtq-setacinq @bbcallen

@bbcallen
Copy link
Contributor

Nice, thanks, I'll fix this later

@bbcallen
Copy link
Contributor

Fixed, I think...
17fbfe7
788ed1e

Thanks @jjlauer

liuming2049 pushed a commit to liuming2049/ijkplayer that referenced this issue Apr 6, 2021
* feat: srt scripts WIP

* feat: libsrt available on Mac OS

* feat(osx): CMakeLists check if build SRT using pkt-config

* feat(android): build ffmpeg with libsrt succeed
@smartTop smartTop mentioned this issue May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants