Comments (7)
ffmpeg 提示
ffmpeg -loglevel debug -i rtmp://192.168.2.71:9492/hls/lvs
ffmpeg version 2.6.3 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-17)
configuration: --prefix=/usr/local/ --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libx264 --enable-libxvid --enable-pic --enable-pthreads --enable-libdc1394 --enable-libass --enable-pic --enable-openssl --enable-libtwolame --enable-libspeex --enable-libfreetype
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. 11.102
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-i' ... matched as input file with argument 'rtmp://192.168.2.71:9492/hls/lvs'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file rtmp://192.168.2.71:9492/hls/lvs.
Successfully parsed a group of options.
Opening an input file: rtmp://192.168.2.71:9492/hls/lvs.
[rtmp @ 0x1a326e0] Handshaking...
[rtmp @ 0x1a326e0] Type answer 3
[rtmp @ 0x1a326e0] Server version 13.14.10.13
[rtmp @ 0x1a326e0] Proto = rtmp, path = /hls/lvs, app = hls, fname = lvs
[rtmp @ 0x1a326e0] Server bandwidth = 5000000
[rtmp @ 0x1a326e0] Client bandwidth = 5000000
[rtmp @ 0x1a326e0] New incoming chunk size = 4096
[rtmp @ 0x1a326e0] Creating stream...
[rtmp @ 0x1a326e0] Sending play command for 'lvs'
[rtmp @ 0x1a326e0] Deleting stream...
rtmp://192.168.2.71:9492/hls/lvs: Invalid data found when processing input
from nginx-http-flv-module.
编译的时候加--with-debug,然后在conf文件里的error_log最后加debug,重启,然后看打印日志哪儿有问题
from nginx-http-flv-module.
debug日志刷得飞快啊,只能截最后出现我客户端IP的那部分了
2018/06/01 16:09:08 [debug] 17636#0: epoll: fd:14 ev:2019 d:00007FA976F11498
2018/06/01 16:09:08 [debug] 17636#0: epoll_wait() error on fd:14 ev:2019
2018/06/01 16:09:08 [debug] 17636#0: *2 recv: eof:1, avail:1
2018/06/01 16:09:08 [debug] 17636#0: *2 recv: fd:14 -1 of 138
2018/06/01 16:09:08 [info] 17636#0: *2 recv() failed (104: Connection reset by peer), client: 192.168.2.39, server: 0.0.0.0:9492
2018/06/01 16:09:08 [debug] 17636#0: *2 finalize session
2018/06/01 16:09:08 [debug] 17636#0: *2 post event 0000000001310B38
2018/06/01 16:09:08 [debug] 17636#0: timer delta: 0
2018/06/01 16:09:08 [debug] 17636#0: posted event 0000000001310B38
2018/06/01 16:09:08 [debug] 17636#0: *2 delete posted event 0000000001310B38
2018/06/01 16:09:08 [debug] 17636#0: *2 close session
2018/06/01 16:09:08 [info] 17636#0: *2 disconnect, client: 192.168.2.39, server: 0.0.0.0:9492
2018/06/01 16:09:08 [info] 17636#0: *2 deleteStream, client: 192.168.2.39, server: 0.0.0.0:9492
2018/06/01 16:09:08 [debug] 17636#0: *2 live: leave 'lvs'
2018/06/01 16:09:08 [debug] 17636#0: *2 create: stream_end msid=1
2018/06/01 16:09:08 [debug] 17636#0: *2 RTMP prep user (4) fmt=0 csid=2 timestamp=0 mlen=6 msid=0 nbufs=1
2018/06/01 16:09:08 [debug] 17636#0: *2 live: set active=0
2018/06/01 16:09:08 [debug] 17636#0: *2 RTMP send nmsg=1, priority=0 #14
2018/06/01 16:09:08 [debug] 17636#0: *2 record: close_stream
2018/06/01 16:09:08 [debug] 17636#0: *2 malloc: 000000000139AD70:660
2018/06/01 16:09:08 [debug] 17636#0: shmtx lock
2018/06/01 16:09:08 [debug] 17636#0: shmtx unlock
2018/06/01 16:09:08 [debug] 17636#0: *2 limit: dec conection counter: 1
2018/06/01 16:09:08 [debug] 17636#0: *2 event timer del: 14: 161392497
2018/06/01 16:09:08 [debug] 17636#0: *2 free: 0000000001396BE0, unused: 3526
2018/06/01 16:09:08 [debug] 17636#0: *2 free: 0000000001395BD0, unused: 2736
2018/06/01 16:09:08 [debug] 17636#0: *2 free: 000000000138DBC0
2018/06/01 16:09:08 [debug] 17636#0: *2 free: 000000000130E470, unused: 4000
2018/06/01 16:09:08 [debug] 17636#0: *2 close connection
2018/06/01 16:09:08 [debug] 17636#0: *2 reusable connection: 0
from nginx-http-flv-module.
看不出来错误,你最好再往更前面的日志看,我怀疑是配置有问题,我试过ffmpeg接收流是可以的:
[rtmp @ 0x7ff335e00360] Sending bytes read report0:00:40.06 bitrate=17211.5kbits/s speed=1.03x
[rtmp @ 0x7ff335e00360] Sending bytes read report0:00:41.06 bitrate=17227.3kbits/s speed=1.02x
[rtmp @ 0x7ff335e00360] Sending bytes read report0:00:42.06 bitrate=17230.2kbits/s speed=1.04x
No more output streams to write to, finishing.
[flv @ 0x7ff336000000] Failed to update header with correct duration.
[flv @ 0x7ff336000000] Failed to update header with correct filesize.
frame= 1277 fps= 31 q=-1.0 Lsize= 89618kB time=00:00:42.51 bitrate=17269.3kbits/s speed=1.05x
video:88566kB audio:994kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.065336%
Input file #0 (rtmp://localhost/myapp/mystream):
Input stream #0:0 (video): 1277 packets read (90691461 bytes);
Input stream #0:1 (audio): 1988 packets read (1017845 bytes);
Total: 3265 packets (91709306 bytes) demuxed
Output file #0 (rtmp://localhost/test/output):
Output stream #0:0 (video): 1277 packets muxed (90691461 bytes);
Output stream #0:1 (audio): 1988 packets muxed (1017845 bytes);
Total: 3265 packets (91709306 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 0x7ff335e010e0] Statistics: 0 seeks, 5388 writeouts
[rtmp @ 0x7ff335c0d320] UnPublishing stream...
[rtmp @ 0x7ff335c0d320] Deleting stream...
[AVIOContext @ 0x7ff335e00fe0] Statistics: 91769226 bytes read, 0 seeks
[rtmp @ 0x7ff335e00360] Deleting stream...
from nginx-http-flv-module.
配置文件就上面贴的那个
from nginx-http-flv-module.
测试了一下,ffmpeg直接推服务器是没问题的。
不过我是ffmpeg推另一个服务器,另一个服务器的nginx自动push过来的,这种情况就播放不了了。stat页面能看到有流进来的。
from nginx-http-flv-module.
from nginx-http-flv-module.
Related Issues (20)
- Upgrade to nginx 1.24 auto_push causes looping signal 29 and signal 17 crash HOT 6
- Proxy Protocol Not Working HOT 2
- [bug] with stat info with multi config files HOT 6
- [bug] rtmp url stuck after a while HOT 6
- to big message error log HOT 4
- max_streams
- [bug] ffmpeg exiting after 9 seconds HOT 12
- variable 'nbufs' set but not used [-Werror,-Wunused-but-set-variable] HOT 4
- Why don't we provide a default compiled software package? HOT 2
- [question] http://example.com[:port]/dir/streamname.m3u8 unable to play HOT 4
- [bug] live: already publishing HOT 5
- ffmpeg [rtmp]: Cannot open connection tcp://127.0.0.1:1935?tcp_nodelay=0
- WriteN, RTMP send error 32(**bytes) HOT 2
- [bug] nginx reload causes lots of errors: 111: Connection refused and auto_push: connect failed in error log HOT 5
- unknown directive "rtmp" HOT 2
- Dynamic proxy pass HOT 1
- The clock rate during play video by HTTP-FLV is slower compared to the normal clock rate. HOT 1
- I have disabled gop cache,but the time of requesting for http-flv first frame is too long. HOT 3
- fls切片只有声音没有画面,vlc和浏览器播放都是如此 HOT 1
- [bug] Directory Permissions error when moving to nginx 1.26
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nginx-http-flv-module.