GithubHelp home page GithubHelp logo

Comments (15)

tsingien avatar tsingien commented on August 17, 2024

config ffmpeg:
jni/libffmpeg/config.h

-CONFIG_HTTP_PROTOCOL 0
-CONFIG_TCP_PROTOCOL 0

+CONFIG_HTTP_PROTOCOL 1
+CONFIG_TCP_PROTOCOL 1

jni/libffmpeg/config-arm.mak:
-!CONFIG_TCP_PROTOCOL=yes
-!CONFIG_HTTP_PROTOCOL=yes

+CONFIG_TCP_PROTOCOL=yes
+CONFIG_HTTP_PROTOCOL=yes

from ffmpeg.

misol101 avatar misol101 commented on August 17, 2024

Thanks, but after a clean build with your changes I get:

/home/misol/Android/android-ndk-r5c/samples/havlenapetr-FFMpeg-7c27aa2/obj/local/armeabi/libavformat.a(allformats.o): In function av_register_all': /home/misol/Android/android-ndk-r5c/samples/havlenapetr-FFMpeg-7c27aa2/jni/libffmpeg/libavformat/allformats.c:237: undefined reference tohttp_protocol'
/home/misol/Android/android-ndk-r5c/samples/havlenapetr-FFMpeg-7c27aa2/jni/libffmpeg/libavformat/allformats.c:237: undefined reference to `tcp_protocol'
collect2: ld returned 1 exit status
make: *** [/home/misol/Android/android-ndk-r5c/samples/havlenapetr-FFMpeg-7c27aa2/obj/local/armeabi/libffmpeg_jni.so] Error 1

Can you help out again?

from ffmpeg.

misol101 avatar misol101 commented on August 17, 2024

Finally managed to compile with tcp/hhtp on, using the following (with a few ugly hacks, I'm no make build expert):

diff -r jni/libffmpeg/config-arm.mak ../../samples/havlenapetr-FFMpeg-7c27aa2/jni/libffmpeg/config-arm.mak
272c272
+CONFIG_NETWORK=yes
---
-!CONFIG_NETWORK=yes
948c948
+CONFIG_HTTP_PROTOCOL=yes
---
-!CONFIG_HTTP_PROTOCOL=yes
957c957
+CONFIG_TCP_PROTOCOL=yes
---
-!CONFIG_TCP_PROTOCOL=yes
diff -r jni/libffmpeg/config.h ../../samples/havlenapetr-FFMpeg-7c27aa2/jni/libffmpeg/config.h
199c199
+#define CONFIG_NETWORK 1
---
-#define CONFIG_NETWORK 0
875c875
+#define CONFIG_HTTP_PROTOCOL 1
---
-#define CONFIG_HTTP_PROTOCOL 0
884c884
+#define CONFIG_TCP_PROTOCOL 1
---
-#define CONFIG_TCP_PROTOCOL 0
diff -r jni/libffmpeg/config.mak ../../samples/havlenapetr-FFMpeg-7c27aa2/jni/libffmpeg/config.mak
272c272
+CONFIG_NETWORK=yes
---
-!CONFIG_NETWORK=yes
948c948
+CONFIG_HTTP_PROTOCOL=yes
---
-!CONFIG_HTTP_PROTOCOL=yes
957c957
+CONFIG_TCP_PROTOCOL=yes
---
-!CONFIG_TCP_PROTOCOL=yes
diff -r jni/libffmpeg/libavformat/network.h ../../samples/havlenapetr-FFMpeg-7c27aa2/jni/libffmpeg/libavformat/network.h
67c67
+#if 0
---
-
93d92
+ #endif
diff -r jni/libffmpeg/libavformat/os_support.h ../../samples/havlenapetr-FFMpeg-7c27aa2/jni/libffmpeg/libavformat/os_support.h
50c50
+//typedef int socklen_t;
---
-typedef int socklen_t;

Unfortunately (and like I suspected) there is no difference when setDataSource is called (av_open_input_file fails, which seems to make sense since it seems to work with files only?).
tsingien, how do I actually make any use of my now "http/tcp-enabled" library?

from ffmpeg.

tsingien avatar tsingien commented on August 17, 2024

maybe you should call
./configure --your parameters such as --enable-network --enable-http etc.
on linux.

this command will create config.h and config.mak. then copy config options to your havlenapetr project.

from ffmpeg.

misol101 avatar misol101 commented on August 17, 2024

But are you saying that remote streams and urls will in fact play "automagically" as long as my ffmpeg config is right? That av_open_input_file (as called in mediaplayer.cpp) will open and play these with no other modifications needed?
Is that working for you?

from ffmpeg.

tsingien avatar tsingien commented on August 17, 2024

yes.

Will u please give me your email address? I'll send my config.h and config.mak to u.

from ffmpeg.

misol101 avatar misol101 commented on August 17, 2024

Great, thanks! Send to ******@yahoo.com

from ffmpeg.

easycui avatar easycui commented on August 17, 2024

I also have such problem. Do you mind send me config.h and config.mak? My email is [email protected] Thanks.

from ffmpeg.

Mag83 avatar Mag83 commented on August 17, 2024

I'm getting the following errors updating the config files. Could you please also send me the config files? (_@_*.com)
/network.h:69: : redefinition of 'struct __kernel_sockaddr_storage'
/network.h:83: error: redefinition of 'struct addrinfo'

I just want to play an rtsp h264 HiP stream on 2.2 Android tablets.
Default Android MediaPlayer has at least 10s buffering delay and I need to reduce it.
Using ffmpeg with jni seems to be, at that time, the only way to reduce it.

from ffmpeg.

kietcao avatar kietcao commented on August 17, 2024

I'm getting the following errors updating the config files.
Compile thumb : ffmpeg_jni <= cmdutils.c
In file included from libffmpeg/cmdutils.c:44:
libffmpeg/libavformat/network.h:69: error: redefinition of 'struct __kernel_sockaddr_storage'
libffmpeg/libavformat/network.h:83: error: redefinition of 'struct addrinfo'
make: *** [libffmpeg/cmdutils.o] Error 1

I just want to play an rtsp h264 HiP stream on 2.2 Android tablets.
Default Android MediaPlayer has at least 10s buffering delay and I need to reduce it.
Using ffmpeg with jni seems to be, at that time, the only way to reduce it.
Email: [email protected]. Thanks for your reply.

from ffmpeg.

kietcao avatar kietcao commented on August 17, 2024

I build with configuration is successfull.

/libffmpeg/config.h
#define CONFIG_NETWORK 1
#define CONFIG_HTTP_PROTOCOL 1
#define CONFIG_TCP_PROTOCOL 1
#define CONFIG_RTMP_PROTOCOL 1
#define CONFIG_RTP_PROTOCOL 1
#define CONFIG_UDP_PROTOCOL 1
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
#define HAVE_STRUCT_ADDRINFO 1
#define HAVE_SOCKLEN_T 1


libffmpeg/config.mak
CONFIG_NETWORK=yes
CONFIG_HTTP_PROTOCOL=yes
CONFIG_TCP_PROTOCOL=yes
CONFIG_RTMP_PROTOCOL=yes
CONFIG_RTP_PROTOCOL=yes
CONFIG_UDP_PROTOCOL=yes
HAVE_STRUCT_SOCKADDR_STORAGE=yes
HAVE_SOCKLEN_T=yes
HAVE_STRUCT_ADDRINFO=yes

But It does not play rtsp. Please let me know, why is it?

from ffmpeg.

tsingien avatar tsingien commented on August 17, 2024

I never test rtsp stream. http is ok.

from ffmpeg.

kietcao avatar kietcao commented on August 17, 2024

Do You use http with m3u8? Please send me link to testing?

from ffmpeg.

xccloveny avatar xccloveny commented on August 17, 2024

@kietcao can you send me the config.sh config.h and config.mak? [email protected]
Thank you very much!

from ffmpeg.

xccloveny avatar xccloveny commented on August 17, 2024

@misol101 can you send me the config.sh config.h and config.mak? [email protected]
Thank you very much!
I have the same problem,maybe you had done this now :),please give me some advice.

from ffmpeg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.