a-schild / jave2

The JAVE (Java Audio Video Encoder) library is Java wrapper on the ffmpeg project
GNU General Public License v3.0
1.22k stars 245 forks source link

can Jave2 transfer mp4 to rtmp? #81

Open steeveen opened 4 years ago

steeveen commented 4 years ago

在ffmpeg命令行里,使用rtmp://协议地址直接做输出就可以将视频转为流推送出去。我看Jave2的大部分例子是将视频转为本地文件的。那么推流这个功能目前有么,如果没有的话,以后会开发么

a-schild commented 4 years ago

Can you please post an repond in english?

Currently jave does only accept input via URL's but not the output. If you provide a merge request which adds this feature, then we will integrate it

LJWxyz commented 4 years ago

at ffmpeg arguments, using rtmp:// (agreed address?,ps i am not networking pro) directly as output can make video become stream sent out. I think most example for Jave2 is making videos become a local file,Does this stream* function exist ,if not exist will it be implemented in the future?

steeveen commented 4 years ago

I am sorry for language. I was used to push live stream by ffmpeg. In ffmpeg command line mode, I can accomplish pushing live stream just by putting the rtmp://xxx as ffmpeg output. But in most samples of Jave2, I noticed that the samples just show Jave power of processing local videos. Does Jave contains the function of pushing (or processing) stream media? Best Wishes

LJWxyz commented 4 years ago

only accept input via URL's but not the output.只可以收(input),没有url(output) If you provide a merge request which adds this feature, then we will integrate it。(如果你开merge,有urloutput)他们会implement。

LJWxyz commented 4 years ago

https://github.com/a-schild/jave2/tree/master/jave-core/src/main/java/ws/schild/jave 看了一下,好像还没有任和stream有关的processing。如果你突然有灵感,开源下😄。 Video processing 是有的。

a-schild commented 4 years ago

You can always implement this and send me a merge request. I haven't time to implement this

mressler commented 4 years ago

If we had a particular command line example of ffmpeg that would support this I would be happy to look into this some more.

steeveen commented 4 years ago

I'm sorry i'm not good at english. Do you mean I need give the command code used in FFmpeg? There is one example: if i want to use a video(named demo.wmv) to simulate a live(the live address is rtmp://127.0.0.1:1935/live/123 ). I can type:"ffmpeg.exe -i demo.wmv -f flv rtmp://127.0.0.1:1935/live/123"

a-schild commented 4 years ago

This is currently not supported, but I would accept a patch for this.

See also https://github.com/a-schild/jave2/issues/23

mressler commented 4 years ago

Interesting, we'd just need to be able to take strings as an output destination. Shouldn't be hard to do, if you're up for it @steeveen.

0oIronhide commented 3 years ago

对不起,我英语不好。您是说我需要提供FFmpeg中使用的命令代码吗? 有一个例子:如果我想使用一个视频(名为demo.wmv)来模拟现场直播(现场直播地址为rtmp://127.0.0.1:1935 / live / 123)。我可以输入:“ ffmpeg.exe -i demo.wmv -f flv rtmp://127.0.0.1:1935 / live / 123”

您好,请问您的问题现在解决了嘛,我遇到的问题更您类似,但我是要将Java的inputstream流进行转码,再播放

English: Hello, has your problem been solved now? The problem I encountered is more similar to you. I need to transcode the Java InputStream stream and play it again

a-schild commented 3 years ago

Until now no one has provided a merge request for this, so no, at the moment it's not implemented