vlc通过http播放mp4文件的问题
使用vlc通过http协议播放mp4文件是遇到下面的问题:
1. vlc通过access_http不断seek,导致播放不流畅,特别网络不好的情况下
2. 有时候音频卡住,有时候视音频都卡住
其中问题1应该是主要原因,导致了问题2的出现。
测试视频:
http://221.6.14.54/test.mp4
vlc日志输出主要部分(不断seek):
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=164526
access_http debug: stream size=202203,pos=37677,remaining=164526
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
main debug: Buffering 91%
access_http debug: trying to seek to 9845
main debug: net: connecting to 192.168.1.209 port 88
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=192358
access_http debug: stream size=202203,pos=9845,remaining=192358
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
main debug: Buffering 100%
access_http debug: trying to seek to 39725
main debug: net: connecting to 192.168.1.209 port 88
main debug: no usable vout present, spawning one
main debug: looking for text renderer module: 2 candidates
freetype debug: Building font databases.
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=162478
access_http debug: stream size=202203,pos=39725,remaining=162478
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
access_http debug: trying to seek to 9845
main debug: net: connecting to 192.168.1.209 port 88
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=192358
access_http debug: stream size=202203,pos=9845,remaining=192358
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
main debug: Stream buffering done (1300 ms in 66 ms)
freetype debug: Took 346000 microseconds
freetype debug: Using Arial as font from file C:/WINDOWS/fonts/arial.ttf
freetype debug: using fontsize: 2
main debug: using text renderer module "freetype"
main debug: TIMER module_need() : 348.000 ms - Total 348.000 ms / 1 intvls (Avg 348.000 ms)
main debug: looking for video filter2 module: 18 candidates
swscale debug: 32x32 chroma: YUVA -> 16x16 chroma: YUVA with scaling using Bicubic (good quality)
main debug: using video filter2 module "swscale"
main debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
main debug: looking for video filter2 module: 18 candidates
yuvp debug: YUVP to YUVA converter
main debug: using video filter2 module "yuvp"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: window size: 384x288
main debug: Deinterlacing available
main debug: deinterlace 0, mode blend, is_needed 0
main debug: looking for video output module: 1 candidate
vout_wrapper debug: Opening vout display wrapper
main debug: looking for vout display module: 8 candidates
directx debug: creating Vout EventThread
directx debug: DirectXCreateWindow
main debug: looking for vout window hwnd module: 3 candidates
qt4 debug: requesting video...
qt4 debug: Video was requested 0, 0
qt4 debug: embedded video ready (handle 00020912)
main debug: using vout window hwnd module "qt4"
main debug: TIMER module_need() : 87.000 ms - Total 87.000 ms / 1 intvls (Avg 87.000 ms)
directx debug: created video sub-window
directx debug: Vout EventThread running
directx debug: disabling screen saver
directx debug: directx-device:
directx debug: DirectXEnumCallback: Mobile Intel(R) 4 Series Express Chipset Family, \\.\DISPLAY1
directx debug: selecting Mobile Intel(R) 4 Series Express Chipset Family, \\.\DISPLAY1
directx debug: screen dimensions (0x0,1280x800)
directx debug: DirectDraw Capabilities: overlay=1 yuvoverlay=1 can_deinterlace_overlay=1 colorkey=1 stretch=1 bltfourcc=1
main debug: VoutDisplayEvent 'resize' 392x315 window
directx debug: DirectXUpdateRects image_dst_clipped coords: 198,171,590,465
directx debug: DirectXUpdateRects image_src_clipped coords: 0,0,352,288
directx debug: YUV overlay surface created successfully
main debug: using vout display module "directx"
main debug: TIMER module_need() : 126.000 ms - Total 126.000 ms / 1 intvls (Avg 126.000 ms)
main debug: using video output module "vout_wrapper"
main debug: TIMER module_need() : 126.000 ms - Total 126.000 ms / 1 intvls (Avg 126.000 ms)
main debug: got 1 direct buffer(s)
main debug: pic render sz 352x288, of (0,0), vsz 352x288, 4cc I420, sar 12:11, msk r0x0 g0x0 b0x0
main debug: pic in sz 352x288, of (0,0), vsz 352x288, 4cc I420, sar 12:11, msk r0x0 g0x0 b0x0
main debug: pic out sz 352x288, of (0,0), vsz 352x288, 4cc I420, sar 12:11, msk r0x0 g0x0 b0x0
main debug: direct render, mapping render pictures 0-23 to system pictures 1-24
avcodec debug: using direct rendering
main debug: End of video preroll
main debug: Received first picture
main debug: Decoder buffering done in 452 ms
access_http debug: trying to seek to 39725
main warning: buffer is 62000 late, triggering upsampling
main debug: net: connecting to 192.168.1.209 port 88
main warning: timing screwed, stopping resampling
main warning: buffer is 111750 late, triggering upsampling
main debug: VoutDisplayEvent 'resize' 384x288 window
directx debug: DirectXUpdateRects image_dst_clipped coords: 198,161,582,449
directx debug: DirectXUpdateRects image_src_clipped coords: 0,0,352,288
main debug: Post-processing available
main warning: vlc_object_find_name(postproc) is not safe!
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=162478
access_http debug: stream size=202203,pos=39725,remaining=162478
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
access_http debug: trying to seek to 9845
main debug: net: connecting to 192.168.1.209 port 88
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=192358
main debug: VoutDisplayEvent 'resize' 427x288 window
access_http debug: stream size=202203,pos=9845,remaining=192358
directx debug: DirectXUpdateRects image_dst_clipped coords: 219,161,603,449
directx debug: DirectXUpdateRects image_src_clipped coords: 0,0,352,288
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
access_http debug: trying to seek to 40764
main debug: net: connecting to 192.168.1.209 port 88
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=161439
access_http debug: stream size=202203,pos=40764,remaining=161439
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
access_http debug: trying to seek to 10357
main debug: net: connecting to 192.168.1.209 port 88
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=191846
access_http debug: stream size=202203,pos=10357,remaining=191846
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
access_http debug: trying to seek to 40764
main debug: net: connecting to 192.168.1.209 port 88
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=161439
access_http debug: stream size=202203,pos=40764,remaining=161439
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
access_http debug: trying to seek to 10357
main debug: net: connecting to 192.168.1.209 port 88
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=191846
access_http debug: stream size=202203,pos=10357,remaining=191846
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
access_http debug: trying to seek to 40764
main debug: net: connecting to 192.168.1.209 port 88
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=161439
access_http debug: stream size=202203,pos=40764,remaining=161439
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
access_http debug: trying to seek to 10357
main debug: net: connecting to 192.168.1.209 port 88
main debug: connection succeeded (socket = 1700)
access_http debug: protocol 'HTTP' answer code 206
access_http debug: Server: Apache/2.2.3 (Red Hat)
access_http debug: this frame size=191846
access_http debug: stream size=202203,pos=10357,remaining=191846
access_http debug: Connection: close
access_http debug: Content-Type: text/plain; charset=zh-CN
期待牛人帮忙!
ps. csdn帖子字数限制的厉害。log不能完整写入。试试上面的测试视频就能得到log了