phz76 / rtmp Goto Github PK
View Code? Open in Web Editor NEWRTMP Server , RTMP Pusher , RTMP Client
RTMP Server , RTMP Pusher , RTMP Client
如题, 大神请教一下这里是怎么算的, 有相关参考资料么, 谢谢!
Line 108 in ce297b6
The code has a bug here
支持265的设备越来越多了,请问有支持265的计划么?
ffmpeg version 3.4.4-0ubuntu0.18.04.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, h264, from 'test.h264':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1280x720, 25 fps, 25 tbr, 1200k tbn, 50 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> flv1 (flv))
Press [q] to stop, [?] for help
Output #0, flv, to 'rtmp://127.0.0.1/live/stream':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Video: flv1 (flv) ([2][0][0][0] / 0x0002), yuv420p, 1280x720, q=2-31, 200 kb/s, 25 fps, 1k tbn, 25 tbc
Metadata:
encoder : Lavc57.107.100 flv
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
av_interleaved_write_frame(): Connection reset by peer
[flv @ 0x5618c42ad2c0] Failed to update header with correct duration.
[flv @ 0x5618c42ad2c0] Failed to update header with correct filesize.
frame= 2 fps=0.0 q=2.0 Lsize= 155kB time=00:00:00.04 bitrate=30912.4kbits/s speed=0.107x
video:168kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!
dean@dean:~/workspace/s32v/rtmp-push$
如题,后续Server端是否会更新下音频相关的的例子呢,比如AAC的
测试发现,时间长了音频和视频不同步,随着时间增加,音频会越来越快
https://www.hlstester.com/, this site can play rtmp protocol, but I cannot play the stream using zhe project.
ffmpeg推流到该服务器,然后用vlc播放,音视频不同步
=================================================================
==7051==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60c0000000bf at pc 0x7f6faac4466e bp 0x7f6fa6a739c0 sp 0x7f6fa6a73168
READ of size 2 at 0x60c0000000bf thread T1
#0 0x7f6faac4466d (/usr/lib/x86_64-linux-gnu/libasan.so.4.0.0+0x5166d)
#1 0x7f6faa772406 in std::__cxx11::basic_string<char, std::char_traits, std::allocator >::basic_string(char const*, std::allocator const&) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x127406)
#2 0x55edcc84f5a6 in xop::AmfDecoder::decodeObject(char const*, int, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, xop::AmfObject, std::hash<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, xop::AmfObject> > >&) src/xop/amf.cpp:115
#3 0x55edcc84ec1d in xop::AmfDecoder::decode(char const*, int, int) src/xop/amf.cpp:34
#4 0x55edcc86fe34 in xop::RtmpConnection::HandleInvoke(xop::RtmpMessage&) src/xop/RtmpConnection.cpp:206
#5 0x55edcc86f861 in xop::RtmpConnection::HandleMessage(xop::RtmpMessage&) src/xop/RtmpConnection.cpp:146
#6 0x55edcc86f651 in xop::RtmpConnection::HandleChunk(xop::BufferReader&) src/xop/RtmpConnection.cpp:117
#7 0x55edcc86f218 in xop::RtmpConnection::OnRead(xop::BufferReader&) src/xop/RtmpConnection.cpp:68
#8 0x55edcc86e03e in operator() src/xop/RtmpConnection.cpp:51
#9 0x55edcc880ea0 in _M_invoke /usr/include/c++/7/bits/std_function.h:302
#10 0x55edcc8263a6 in std::function<bool (std::shared_ptrxop::TcpConnection, xop::BufferReader&)>::operator()(std::shared_ptrxop::TcpConnection, xop::BufferReader&) const /usr/include/c++/7/bits/std_function.h:706
#11 0x55edcc822c8b in xop::TcpConnection::HandleRead() src/net/TcpConnection.cpp:83
#12 0x55edcc8218cf in operator() src/net/TcpConnection.cpp:14
#13 0x55edcc823dfd in _M_invoke /usr/include/c++/7/bits/std_function.h:316
#14 0x55edcc829771 in std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706
#15 0x55edcc82e264 in xop::Channel::HandleEvent(int) src/net/Channel.h:76
#16 0x55edcc8351df in xop::EpollTaskScheduler::HandleEvent(int) src/net/EpollTaskScheduler.cpp:94
#17 0x55edcc82807e in xop::TaskScheduler::Start() src/net/TaskScheduler.cpp:50
#18 0x55edcc847b50 in void std::__invoke_impl<void, void (xop::TaskScheduler::)(), xop::TaskScheduler>(std::__invoke_memfun_deref, void (xop::TaskScheduler::&&)(), xop::TaskScheduler&&) /usr/include/c++/7/bits/invoke.h:73
#19 0x55edcc845ec0 in std::__invoke_result<void (xop::TaskScheduler::)(), xop::TaskScheduler>::type std::__invoke<void (xop::TaskScheduler::)(), xop::TaskScheduler>(void (xop::TaskScheduler::&&)(), xop::TaskScheduler&&) /usr/include/c++/7/bits/invoke.h:95
#20 0x55edcc84a8be in decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (xop::TaskScheduler::)(), xop::TaskScheduler> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (/home/gzzhang/develop/CodingNet/StreamDev/android_msvoip/libraries/nexhome_rtmp/src/main/jni/NexHomeRtmpServer/rtmp_server_main+0x698be)
#21 0x55edcc84a829 in std::thread::_Invoker<std::tuple<void (xop::TaskScheduler::)(), xop::TaskScheduler> >::operator()() (/home/gzzhang/develop/CodingNet/StreamDev/android_msvoip/libraries/nexhome_rtmp/src/main/jni/NexHomeRtmpServer/rtmp_server_main+0x69829)
#22 0x55edcc84a78d in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (xop::TaskScheduler::)(), xop::TaskScheduler> > >::_M_run() (/home/gzzhang/develop/CodingNet/StreamDev/android_msvoip/libraries/nexhome_rtmp/src/main/jni/NexHomeRtmpServer/rtmp_server_main+0x6978d)
#23 0x7f6faa7086de (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbd6de)
#24 0x7f6faa9db6da in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
#25 0x7f6faa16361e in __clone (/lib/x86_64-linux-gnu/libc.so.6+0x12161e)
0x60c0000000bf is located 0 bytes to the right of 127-byte region [0x60c000000040,0x60c0000000bf)
allocated by thread T1 here:
#0 0x7f6faacd3608 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.4.0.0+0xe0608)
#1 0x55edcc89210f in xop::RtmpChunk::ParseChunkHeader(xop::BufferReader&) src/xop/RtmpChunk.cpp:101
#2 0x55edcc89181a in xop::RtmpChunk::Parse(xop::BufferReader&, xop::RtmpMessage&) src/xop/RtmpChunk.cpp:27
#3 0x55edcc86f61a in xop::RtmpConnection::HandleChunk(xop::BufferReader&) src/xop/RtmpConnection.cpp:114
#4 0x55edcc86f218 in xop::RtmpConnection::OnRead(xop::BufferReader&) src/xop/RtmpConnection.cpp:68
#5 0x55edcc86e03e in operator() src/xop/RtmpConnection.cpp:51
#6 0x55edcc880ea0 in _M_invoke /usr/include/c++/7/bits/std_function.h:302
#7 0x55edcc8263a6 in std::function<bool (std::shared_ptrxop::TcpConnection, xop::BufferReader&)>::operator()(std::shared_ptrxop::TcpConnection, xop::BufferReader&) const /usr/include/c++/7/bits/std_function.h:706
#8 0x55edcc822c8b in xop::TcpConnection::HandleRead() src/net/TcpConnection.cpp:83
#9 0x55edcc8218cf in operator() src/net/TcpConnection.cpp:14
#10 0x55edcc823dfd in _M_invoke /usr/include/c++/7/bits/std_function.h:316
#11 0x55edcc829771 in std::function<void ()>::operator()() const /usr/include/c++/7/bits/std_function.h:706
#12 0x55edcc82e264 in xop::Channel::HandleEvent(int) src/net/Channel.h:76
#13 0x55edcc8351df in xop::EpollTaskScheduler::HandleEvent(int) src/net/EpollTaskScheduler.cpp:94
#14 0x55edcc82807e in xop::TaskScheduler::Start() src/net/TaskScheduler.cpp:50
#15 0x55edcc847b50 in void std::__invoke_impl<void, void (xop::TaskScheduler::)(), xop::TaskScheduler>(std::__invoke_memfun_deref, void (xop::TaskScheduler::&&)(), xop::TaskScheduler&&) /usr/include/c++/7/bits/invoke.h:73
#16 0x55edcc845ec0 in std::__invoke_result<void (xop::TaskScheduler::)(), xop::TaskScheduler>::type std::__invoke<void (xop::TaskScheduler::)(), xop::TaskScheduler>(void (xop::TaskScheduler::&&)(), xop::TaskScheduler&&) /usr/include/c++/7/bits/invoke.h:95
#17 0x55edcc84a8be in decltype (__invoke((_S_declval<0ul>)(), (_S_declval<1ul>)())) std::thread::_Invoker<std::tuple<void (xop::TaskScheduler::)(), xop::TaskScheduler> >::_M_invoke<0ul, 1ul>(std::_Index_tuple<0ul, 1ul>) (/home/gzzhang/develop/CodingNet/StreamDev/android_msvoip/libraries/nexhome_rtmp/src/main/jni/NexHomeRtmpServer/rtmp_server_main+0x698be)
#18 0x55edcc84a829 in std::thread::_Invoker<std::tuple<void (xop::TaskScheduler::)(), xop::TaskScheduler> >::operator()() (/home/gzzhang/develop/CodingNet/StreamDev/android_msvoip/libraries/nexhome_rtmp/src/main/jni/NexHomeRtmpServer/rtmp_server_main+0x69829)
#19 0x55edcc84a78d in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (xop::TaskScheduler::)(), xop::TaskScheduler> > >::_M_run() (/home/gzzhang/develop/CodingNet/StreamDev/android_msvoip/libraries/nexhome_rtmp/src/main/jni/NexHomeRtmpServer/rtmp_server_main+0x6978d)
#20 0x7f6faa7086de (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbd6de)
Thread T1 created by T0 here:
#0 0x7f6faac2ad2f in __interceptor_pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.4.0.0+0x37d2f)
#1 0x7f6faa708994 in std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_deletestd::thread::_State >, void (*)()) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xbd994)
#2 0x55edcc8440b7 in xop::EventLoop::Loop() src/net/EventLoop.cpp:67
#3 0x55edcc843960 in xop::EventLoop::EventLoop(unsigned int) src/net/EventLoop.cpp:25
#4 0x55edcc808eb8 in NexHomeRtmpServer::NexHomeRtmpServer(int) /home/gzzhang/develop/CodingNet/StreamDev/android_msvoip/libraries/nexhome_rtmp/src/main/jni/NexHomeRtmpServer/rtmp_server_core.cpp:38
#5 0x55edcc8094f4 in rtmp_server_create /home/gzzhang/develop/CodingNet/StreamDev/android_msvoip/libraries/nexhome_rtmp/src/main/jni/NexHomeRtmpServer/rtmp_server_core.cpp:63
#6 0x55edcc808863 in main /home/gzzhang/develop/CodingNet/StreamDev/android_msvoip/libraries/nexhome_rtmp/src/main/jni/NexHomeRtmpServer/rtmp_server_main.c:40
#7 0x7f6faa063c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib/x86_64-linux-gnu/libasan.so.4.0.0+0x5166d)
Shadow bytes around the buggy address:
0x0c187fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c187fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c187fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c187fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c187fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
=>0x0c187fff8010: 00 00 00 00 00 00 00[07]fa fa fa fa fa fa fa fa
0x0c187fff8020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07
0x0c187fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c187fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c187fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c187fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==7051==ABORTING
I'm publishing aac file to rtmp server but I don't know what is audio_specific_config
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.