Code Monkey home page Code Monkey logo

flutter_live's Introduction

flutter-live

Pub Version

跨平台(iOS+Andriod)多协议(RTMP/HTTP-FLV/HLS/WebRTC)直播播放器, Flutter+SRS

Live Streaming player, iOS+Android, RTMP/HTTP-FLV/HLS/WebRTC, by Flutter+SRS.

Usage

国内设置代理:

export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn && 
export PUB_HOSTED_URL=https://pub.flutter-io.cn

编译和运行SRS直播(iOS可以从这里安装):

git clone https://github.com/ossrs/flutter_live.git &&
cd flutter_live/example && flutter run

Warning: Not support iOS simulator, #14647.

Home

Home

Home

flutter_live's People

Contributors

winlinvip avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_live's Issues

Diagonal video noise on flutter_live - iOS

Hello everyone,

flutter_live was working fine with me until I started getting this noise:

noise

The device is iPhone 6 and I am using OBS to stream to DigitalOcean Ubuntu 20 Server with 2.2GHz and 1GB RAM. The ping between the Wifi and the server is ~100

I am running the same SRS live stream on this iPhone with VLC and it works with no issue. Also the default streams by ossrs.net works fine with no issues.

Also my stream works with no issue on flutter_live installed on Android devices ( as well as VLC, MX Player) and on macbook pro using VLC. I also tried to uninstall and install again with the same issue.

IOS闪退

在使用IOS设备播放FLV流的时候闪退,没有报错,以下是打印信息
flutter: [inf] 2020-11-16 17:46:36.970223 [fijk] FijkPlayer{id:-1} enterFullScreen

flutter: Start play live streaming http://***************.flv

flutter: [inf] 2020-11-16 17:46:37.050451 [fijk] create player id:1

flutter: [inf] 2020-11-16 17:46:37.058717 [fijk] FijkPlayer{id:1} setOption k:mediacodec-all-videos, v:1

flutter: [inf] 2020-11-16 17:46:37.062742 [fijk] FijkPlayer{id:1} setOption k:request-screen-on, v:1

flutter: [inf] 2020-11-16 17:46:37.066236 [fijk] FijkPlayer{id:1} setOption k:request-audio-focus, v:1

flutter: [inf] 2020-11-16 17:46:37.067226 [fijk] FijkPlayer{id:1} setOption k:probesize, v:16384

flutter: [inf] 2020-11-16 17:46:37.067728 [fijk] FijkPlayer{id:1} setOption k:analyzeduration, v:100000

flutter: [inf] 2020-11-16 17:46:37.069976 [fijk] FijkPlayer{id:1} setOption k:packet-buffering, v:0

flutter: [inf] 2020-11-16 17:46:37.076540 [fijk] FijkPlayer{id:1} setOption k:max_cached_duration, v:800

flutter: [inf] 2020-11-16 17:46:37.077057 [fijk] FijkPlayer{id:1} setOption k:max-buffer-size, v:32768

flutter: [inf] 2020-11-16 17:46:37.077665 [fijk] FijkPlayer{id:1} setOption k:infbuf, v:1

flutter: [inf] 2020-11-16 17:46:37.078240 [fijk] FijkPlayer{id:1} setOption k:min-frames, v:1

flutter: [inf] 2020-11-16 17:46:37.079115 [fijk] FijkPlayer{id:1} invoke setDataSource http://***************.flv

flutter: [inf] 2020-11-16 17:46:37.080453 [fijk] FijkPlayer{id:1} state changed to FijkState.initialized <= FijkState.idle

flutter: [inf] 2020-11-16 17:46:37.083203 [fijk] FijkPlayer{id:1} invoke prepareAsync and start #1

flutter: [inf] 2020-11-16 17:46:37.083362 [fijk] FijkPlayer{id:1} setOption k:start-on-prepared, v:1

flutter: [inf] 2020-11-16 17:46:37.210713 [fijk] FijkPlayer{id:1} state changed to FijkState.asyncPreparing <= FijkState.initialized

flutter: [inf] 2020-11-16 17:46:37.211346 [fijk] FijkPlayer{id:1} invoke prepareAsync and start #1 -> done

flutter: [inf] 2020-11-16 17:46:37.211483 [fijk] FijkPlayer{id:1} state changed to FijkState.initialized <= FijkState.idle

flutter: [inf] 2020-11-16 17:46:37.211587 [fijk] FijkPlayer{id:1} state changed to FijkState.asyncPreparing <= FijkState.initialized

Lost connection to device.

Incompatible with flutter_webrtc

Hi,
I'm trying to use this package with flutter_webrtc: ^0.6.3 :

flutter_live 1.0.13 depends on flutter_webrtc ^0.4.0 and no versions of flutter_live match >1.0.13 <2.0.0, flutter_live ^1.0.13 requires flutter_webrtc ^0.4.0.

what should I do?

Specs satisfying the `url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)` dependency were found, but they required a higher minimum deployment target.

I'm using a M1 Mac with Xcode 14.3 and Cocoapods 1.2.1
After executing flutter run, there comes the error message:

Resolving dependencies of Podfile
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
[!] CocoaPods could not find compatible versions for pod "url_launcher_ios":
In Podfile:
url_launcher_ios (from .symlinks/plugins/url_launcher_ios/ios)

Specs satisfying the `url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)` dependency were found, but they required a higher
minimum deployment target.

/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
<internal:kernel>:90:in `tap'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/resolver.rb:94:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/installer/analyzer.rb:1082:in `block in
resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:422:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/installer.rb:162:in `install!'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/command/install.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/gems/cocoapods-1.12.1/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.12.1/libexec/bin/pod:25:in `<main>'

RTMP audio not working with flutter_live

I'm trying to use our RTMP url that is visible and with audio through VLC but not with flutter_live. To broadcast we are using OBS Studio or rtmp_publisher. The example urls also RTMP work. What am I doing wrong or am I missing?
Working with Android.

Thanks in advance

no valid found h264 payload type

Dear Creator,

Thanks for your answer in advance.
I tried so much and I found something.
When I'm using flutter-web. everything is ok in rtc mode.
Peer Connection is ok and I can publish and play in both side.
But when I'm trying on emulator or real device I receive this error :
no valid found h264 payload type in my srs server.
and I don't receive answer for connection.
Don I have to do something in device?
I passed all permissions in AndroidManifest already.

How To Stop Automatic Fullscreen without Disabling Fullscreen

Hello,

Following your example code, I have the following widget.

fijkplayer.FijkView(
                player: _player.fijk,
                  panelBuilder: fijkplayer.fijkPanel2Builder(),
                color: Colors.black,
                fs: false,
                fit: fijkplayer.FijkFit.ar16_9,
                fsFit: fijkplayer.FijkFit.fill
              )

My problem is that when fs is true, the video automatically tries to play fullscreen but when fs is false, the video plays regular size but cannot go fullscreen. I basically want the best of both worlds: I want the video to play with regular size but have the ability to go fullscreen if the user clicks on the fullscreen button.

请问插件能实现针对视频静音么?

你好,我在使用 flutter_live 插件的过程中,想实现视频静音,但是目前好像没有这个方法,我看 RealtimePlayer 有 setVolumn 的方法,请问能更新一个版本添加这个功能么?谢谢

webrtc stream can NOT be played in flutter_live if pushing mp4 video file like this

clone git and build it successfully.
run it on android 9 os. push mp4 video file with following command:
./ffmpeg -re -i video.mp4 -c copy -f flv -y rtmp://ip:1935/live/mp4test

then webrtc://ip/live/mp4test can be played via SRS rtcplayer in browser while can NOT be played by flutter_live apk.

how to fix it? could you please give some hint? thanks a lot!

android端推流的时候报错

android版本:10 设备:小米mix2s
E/libc: Access denied finding property "camera.aux.packagelist"
E/flutter: [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: CameraException(No video is recording, stopVideoStreaming was called when no video is streaming.)
#0 CameraController.stopVideoStreaming (package:camera_with_rtmp/camera.dart:817:7)
#1 _HomeState.disposeCamera (package:flutter_live_example/main.dart:81:29)
#2 _HomeState.stopPublish (package:flutter_live_example/main.dart:88:11)
#3 _HomeState._onStartPlayOrPublish (package:flutter_live_example/main.dart:117:7)
#4 _HomeState.build. (package:flutter_live_example/main.dart:159:12)
#5 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:993:19)
#6 _InkResponseState.build. (package:flutter/src/material/ink_well.dart:1111:38)
#7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:183:24)
#8 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:598:11)
#9 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:287:5)
#10 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:259:7)
#11 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:157:27)
#12 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:362:20)
#13 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:338:22)
#14 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:267:11)
#15 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:295:7)
#16 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:240:7)
#17 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:213:7)
#18 _rootRunUnary (dart:async/zone.dart:1206:13)
#19 _CustomZone.runUnary (dart:async/zone.dart:1100:19)
#20 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
#21 _invoke1 (dart:ui/hooks.dart:265:10)
#22 _dispatchPointerDataPacket (dart:ui/hooks.dart:174:5)

WebRtc don't playe

I try to test your example , But when I choose WebRTC nothing is played? this link webrtc://d.ossrs.net/live/livestream

This is result:

I/flutter (13957): Url webrtc://d.ossrs.net/live/livestream parsed to api=https://d.ossrs.net:443/rtc/v1/play/, stream=webrtc://d.ossrs.net/live/livestream
I/org.webrtc.Logging(13957): NetworkMonitorAutoDetect: link properties changed
D/FlutterWebRTCPlugin(13957): onIceCandidate
I/chatty  (13957): uid=10136(net.ossrs.flutter_live_example) signaling_threa identical 6 lines
D/FlutterWebRTCPlugin(13957): onIceCandidate
D/FlutterWebRTCPlugin(13957): onIceGatheringChangeCOMPLETE
I/flutter (13957): WebRTC request: https://d.ossrs.net:443/rtc/v1/play/ offer=3167B
I/flutter (13957): WebRTC reply: 12B, 200
E/flutter (13957): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: {"code":400}
E/flutter (13957):
I/org.webrtc.Logging(13957): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.

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.