UDP组播TS流,ffplay能够正常播放,VLC不能播放(有声音无图像),请教下怎么回事?

ldahual 2017-03-16 04:49:32
基于tstool实现了将音视频流和成TS流的功能,通过UDP组播。ffplay可以正常播放,VLC却不能播,没图像,声音正常。VLC的输出log如下。请教下这是怎么回事?
引用
core debug: adding item `udp://224.0.1.2:7838/' ( udp://@224.0.1.2:7838/ )
core debug: processing request item: udp://224.0.1.2:7838/, node: null, skip: 0
core debug: rebuilding array of current - root 播放列表
core debug: rebuild done - 4 items, index 3
core debug: starting playback of the new playlist item
core debug: resyncing on udp://224.0.1.2:7838/
core debug: udp://224.0.1.2:7838/ is at 3
core debug: creating new input thread
core debug: Creating an input for 'udp://224.0.1.2:7838/'
core debug: requesting art for udp://224.0.1.2:7838/
core debug: looking for meta fetcher module matching "any": 1 candidates
core debug: meta ok for (null), need to fetch art
core debug: using timeshift granularity of 50 MiB, in path 'C:\Users\TCB\AppData\Local\Temp'
core debug: `udp://@224.0.1.2:7838/' gives access `udp' demux `' path `@224.0.1.2:7838/'
core debug: specified demux `any'
core debug: creating demux: access='udp' demux='any' location='@224.0.1.2:7838/' file='\\@224.0.1.2:7838\'
core debug: looking for access_demux module matching "udp": 12 candidates
core debug: no access_demux modules matched
core debug: creating access 'udp' location='@224.0.1.2:7838/', path='\\@224.0.1.2:7838\'
core debug: looking for access module matching "udp": 21 candidates
udp debug: opening server=:0 local=224.0.1.2:7838
core debug: net: opening 224.0.1.2 datagram port 7838
core debug: looking for meta fetcher module matching "any": 1 candidates
lua debug: Trying Lua scripts in C:\Users\TCB\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\fetcher
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\fetcher\tvrage.luac
lua debug: Trying Lua scripts in C:\Users\TCB\AppData\Roaming\vlc\lua\meta\fetcher
lua debug: Trying Lua scripts in D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\fetcher
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\fetcher\tvrage.luac
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\fetcher\tvrage.luac
core debug: no meta fetcher modules matched
core debug: searching art for udp://224.0.1.2:7838/
core debug: looking for art finder module matching "any": 2 candidates
core debug: using access module "udp"
core debug: Using block method for AStream*
core debug: starting pre-buffering
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\fetcher\tvrage.luac
lua debug: Trying Lua scripts in C:\Users\TCB\AppData\Roaming\vlc\lua\meta\art
core debug: no meta fetcher modules matched
lua debug: Trying Lua scripts in D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art
core debug: searching art for udp://224.0.1.2:7838/
core debug: looking for art finder module matching "any": 2 candidates
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua scripts in C:\Users\TCB\AppData\Roaming\vlc\lua\meta\art
lua debug: Trying Lua scripts in D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\00_musicbrainz.luac
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\01_googleimage.luac
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\00_musicbrainz.luac
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\01_googleimage.luac
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\02_frenchtv.luac
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\01_googleimage.luac
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\02_frenchtv.luac
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\03_lastfm.luac
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\02_frenchtv.luac
lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\03_lastfm.luac
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\03_lastfm.luac
core debug: no art finder modules matched
core debug: art not found for udp://224.0.1.2:7838/
lua debug: skipping script (unmatched scope) D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\art\03_lastfm.luac
core debug: no art finder modules matched
core debug: art not found for udp://224.0.1.2:7838/
qt4 debug: IM: Setting an input
core debug: received first data after 15 ms
core debug: prebuffering done 3760 bytes in 0s - 244 KiB/s
core debug: looking for stream_filter module matching "any": 6 candidates
core debug: no stream_filter modules matched
core debug: looking for stream_filter module matching "record": 6 candidates
core debug: using stream_filter module "record"
core debug: creating demux: access='udp' demux='any' location='@224.0.1.2:7838/' file='\\@224.0.1.2:7838\'
core debug: looking for demux module matching "any": 66 candidates
ts debug: Force Seek Per Percent: PCR's not found,
ts debug: PATCallBack called
ts debug: new PAT ts_id=1 version=0 current_next=1
ts debug: * number=1 pid=102
ts debug: PMTCallBack called
ts debug: new PMT program number=1 version=0 pid_pcr=104
ts debug: * es pid=104 type=27 fcc=h264
core debug: selecting program id=1
ts info: MPEG-4 descriptor not found for pid 0x67 type 0xf
ts debug: * es pid=103 type=15 fcc=mp4a
core debug: using demux module "ts"
core debug: looking for decoder module matching "any": 43 candidates
avcodec debug: CPU flags: 0x0107d3db
avcodec debug: trying to use direct rendering
avcodec debug: allowing 4 thread(s) for decoding
avcodec debug: avcodec codec (H264 - MPEG-4 AVC (part 10)) started
avcodec debug: using frame thread mode with 4 threads
core debug: using decoder module "avcodec"
core debug: looking for packetizer module matching "any": 23 candidates
core debug: using packetizer module "packetizer_h264"
core debug: looking for decoder module matching "any": 43 candidates
core debug: using decoder module "faad"
core debug: looking for packetizer module matching "any": 23 candidates
packetizer_mpeg4audio debug: running MPEG4 audio packetizer
packetizer_mpeg4audio debug: no decoder specific info, must be an ADTS or LOAS stream
core debug: using packetizer module "packetizer_mpeg4audio"
ts debug: DEMUX_SET_GROUP 0 0000000000000000
...全文
3361 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ccacba168 2017-06-01
  • 打赏
  • 举报
回复
我也遇到同样的问题,不知道怎么解决
ldahual 2017-03-16
  • 打赏
  • 举报
回复
补全log
引用
core debug: looking for meta reader module matching "any": 2 candidates lua debug: Trying Lua scripts in C:\Users\TCB\AppData\Roaming\vlc\lua\meta\reader lua debug: Trying Lua scripts in D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\reader lua debug: Trying Lua playlist script D:\Program Files\VideoLAN\vlc-2.2.4\lua\meta\reader\filename.luac core debug: no meta reader modules matched core debug: `udp://@224.0.1.2:7838/' successfully opened ts warning: first packet for pid=104 cc=0xf core debug: Buffering 0% ts warning: first packet for pid=103 cc=0x1 core debug: Buffering 4% packetizer_mpeg4audio debug: detected ADTS format core debug: Buffering 8% packetizer_mpeg4audio info: AAC channels: 1 samplerate: 48000 faad warning: decoded zero sample core debug: reusing audio output directsound debug: Opening DirectSound Audio Output packetizer_h264 warning: waiting for SPS/PPS directsound debug: Windows speaker config: Stereo and stream has 2 channels, using 2 channels core debug: output 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes core debug: looking for audio volume module matching "any": 2 candidates core debug: using audio volume module "float_mixer" core debug: input 'f32l' 48000 Hz Stereo frame=1 samples/8 bytes core debug: looking for audio filter module matching "scaletempo": 14 candidates scaletempo debug: format: 48000 rate, 2 nch, 4 bps, fl32 scaletempo debug: params: 30 stride, 0.200 overlap, 14 search scaletempo debug: 1.000 scale, 1440.000 stride_in, 1440 stride_out, 1152 standing, 288 overlap, 672 search, 2400 queue, fl32 mode core debug: using audio filter module "scaletempo" core debug: conversion: 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo core debug: conversion pipeline complete core debug: conversion: 'f32l'->'f32l' 48000 Hz->48000 Hz Stereo->Stereo core debug: conversion pipeline complete core debug: looking for audio resampler module matching "any": 3 candidates core debug: using audio resampler module "samplerate" core debug: End of audio preroll core debug: Buffering 12% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 16% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 20% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 24% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 28% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 32% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 36% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 40% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 44% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 48% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 52% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 56% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 60% packetizer_h264 warning: waiting for SPS/PPS core debug: Buffering 64% packetizer_h264 warning: waiting for SPS/PPS packetizer_h264 warning: waiting for SPS/PPS packetizer_h264 debug: found NAL_SPS (sps_id=0) packetizer_h264 debug: found NAL_PPS (pps_id=0 sps_id=0) core debug: Buffering 68% core debug: Buffering 72% avcodec debug: available hardware decoder output format 61 (dxva2_vld) avcodec debug: available software decoder output format 12 (yuvj420p) core debug: looking for hw decoder module matching "none": 1 candidates core debug: no hw decoder modules matched core debug: Buffering 76% core debug: looking for text renderer module matching "any": 2 candidates freetype debug: Using Arial as font from file C:\WINDOWS\Fonts\arial.ttf freetype debug: Using Courier New as mono-font from file C:\WINDOWS\Fonts\cour.ttf freetype debug: using fontsize: 2 core debug: using text renderer module "freetype" core debug: looking for video filter2 module matching "any": 58 candidates swscale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality) core debug: using video filter2 module "swscale" core debug: looking for video filter2 module matching "any": 58 candidates yuvp debug: YUVP to YUVA converter core debug: using video filter2 module "yuvp" core debug: Deinterlacing available core debug: deinterlace 0, mode blend, is_needed 0 core debug: Opening vout display wrapper core debug: looking for vout display module matching "any": 11 candidates direct3d debug: creating Vout EventThread direct3d debug: Win32VoutCreateWindow core debug: looking for vout window hwnd module matching "qt4,any": 3 candidates qt4 debug: requesting video window... qt4 debug: Video was requested 0, 0 core debug: using vout window hwnd module "qt4" direct3d debug: created video sub-window direct3d debug: Vout EventThread running direct3d debug: disabling screen saver direct3d debug: Direct3d Device: Intel(R) HD Graphics Family 32902 2582 11 core debug: Buffering 80% core debug: VoutDisplayEvent 'resize' 1296x759 window direct3d warning: trying surface pixel format: YV12 direct3d debug: selected surface pixel format is YV12 direct3d debug: Using D3DTEXF_LINEAR for minification direct3d debug: Using D3DTEXF_LINEAR for magnification direct3d debug: Direct3D scene created successfully direct3d debug: Direct3D device adapter successfully initialized core debug: using vout display module "direct3d" core debug: original format sz 1280x738, of (0,0), vsz 1280x720, 4cc J420, sar 1:1, msk r0x0 g0x0 b0x0 core debug: removing module "freetype" core debug: looking for text renderer module matching "any": 2 candidates core debug: VoutDisplayEvent 'resize' 1300x670 window freetype debug: Using Arial as font from file C:\WINDOWS\Fonts\arial.ttf freetype debug: Using Courier New as mono-font from file C:\WINDOWS\Fonts\cour.ttf freetype debug: using fontsize: 2 core debug: using text renderer module "freetype" avcodec warning: plane 0 not aligned avcodec warning: disabling direct rendering core debug: Buffering 84% core debug: Buffering 88% core debug: Buffering 92% core debug: Buffering 96% core debug: Buffering 100% core debug: Stream buffering done (1040 ms in 948 ms) core debug: Decoder wait done in 0 ms core warning: playback too late (95916): up-sampling core debug: auto hiding mouse cursor core debug: auto hiding mouse cursor core warning: playback too early (-44302): down-sampling core debug: resampling stopped (drift: -44560 us) core warning: playback too early (-43560): down-sampling core debug: resampling stopped (drift: 706 us) core debug: auto hiding mouse cursor core debug: auto hiding mouse cursor core debug: auto hiding mouse cursor core debug: auto hiding mouse cursor core debug: auto hiding mouse cursor
一、 编译安装VLC 使用vlc-1.0.5.tar.bz2 + live555-2010.01.tar.gz export MYDIR=/root/lf 将live555-2010.01.tar.gz和vlc-1.0.5.tar.bz2放置在$MYDIR下 cd $MYDIR (一) 编译liveMedia tar xvfz live555-2010.01.tar.gz cd live ./genMakefiles linux make (二) 安装libdvbpsi rpm -hiv libdvbpsi-0.1.7-1.el4.rf.i386.rpm rpm -hiv libdvbpsi-devel-0.1.7-1.el4.rf.i386.rpm 需要什么rpm可到http://apt.sw.be/redhat/el4/en/i386/rpmforge/RPMS/中下载 (三) 编译VLC 1. configure ./configure --prefix=/usr --enable-debug --disable-avcodec --disable-hal --disable-avformat --disable-swscale --disable-a52 --disable-x11 --disable-sdl --disable-fribidi --disable-dbus --disable-libgcrypt --disable-gnutls --disable-remoteosd --disable-skins2 --disable-qt4 --disable-libxml2 --disable-lua --disable-xcb --disable-alsa --disable-v4l2 --disable-qt --enable-run-as-root --enable-live555 --with-live555-tree=$MYDIR/live --disable-mad --disable-postproc --enable-dvbpsi --enable-x264 2. make 3. 出现错误error: syntax error before "vlc_spinlock_t": ../include/vlc_threads.h:240: error: syntax error before "vlc_spinlock_t" …… make[4]: *** [control/libvlc_la-vlm.lo] Error 1 make[4]: Leaving directory `/root/lf/vlc-1.0.5/src' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/root/lf/vlc-1.0.5/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/root/lf/vlc-1.0.5/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/lf/vlc-1.0.5' make: *** [all] Error 2 通过以下命令解决: sed -e 's/define\s*_POSIX_SPIN_LOCKS\s*/define _POSIX_SPIN_LOCKS -1 \/\/ wrong: /g' -i /usr/include/bits/posix_opt.h 4. 重试make出现error: `AFS_SUPER_MAGIC' undeclared: file.c:52:28: linux/magic.h: No such file or directory file.c: In function `IsRemote': file.c:141: error: `AFS_SUPER_MAGIC' undeclared (first use in this function) file.c:141: error: (Each undeclared identifier is reported only once file.c:141: error: for each function it appears in.) file.c:142: error: `CODA_SUPER_MAGIC' undeclared (first use in this function) file.c:143: error: `NCP_SUPER_MAGIC' undeclared (first use in this function) file.c:144: error: `NFS_SUPER_MAGIC' undeclared (first use in this function) file.c:145: error: `SMB_SUPER_MAGIC' undeclared (first use in this function) make[5]: *** [libaccess_file_plugin_la-file.lo] Error 1 make[5]: Leaving directory `/root/lf/vlc-1.0.5/modules/access' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/root/lf/vlc-1.0.5/modules/access' make[3]: *** [all] Error 2 make[3]: Leaving directory `/root/lf/vlc-1.0.5/modules/access' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/root/lf/vlc-1.0.5/modules' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/lf/vlc-1.0.5' make: *** [all] Error 2 将下面的magic.h文件复制到/usr/include/linux/目录下 5. make install 6. 检查 vlc -l | grep access_output access_output_udp UDP stream output access_output_http HTTP stream output access_output_file File stream output access_output_dummy Dummy stream output access_output_rtmp RTMP stream output vlc -l | grep dvbpsi mux_ts TS muxer (libdvbpsi) (四) 进行RTSP To TS转码:  不经视音频重编码的直接转码: vlc rtsp://172.17.0.219:8554/1 --sout '#standard{access=http, mux=ts, dst=172.17.0.100:1234}' 注:黑体部分为本机IP和端口,不能是127.0.0.1 vlc rtsp://172.17.0.219:8554/1 --sout '#duplicate{dst="std{access=udp, mux=ts, dst=172.17.1.116:1234}"}' vlc rtsp://172.17.0.219:8554/1 --sout '#duplicate{dst="std{access=http, mux=ts, dst=172.17.0.100:1234}"}' 二、 视音频重编码的VLC编译安装 (一) 需要编译安装ffmpeg ./configure --prefix=/usr --enable-libfaac --enable-libx264 --enable-pthreads --disable-ffserver --disable-ffplay --enable-gpl --enable-nonfree [root@localhost ffmpeg-0.6.7]# make common.mak:28: *** unterminated call to function `foreach': missing `)'. Stop. 出现上面错误需要更新Make版本,使用make-3.81.tar.gz ./configure --prefix=/usr;make;make install In file included from libavdevice/v4l.c:33: /usr/include/linux/videodev.h:56: error: syntax error before "ulong" /usr/include/linux/videodev.h:72: error: syntax error before '}' token 编辑/usr/include/linux/videodev.h第56行,把ulong改为 unsigned long (二) 编译VLC ./configure --prefix=/usr --enable-debug --enable-avcodec --disable-hal --disable-avformat --disable-swscale --disable-a52 --disable-x11 --disable-sdl --disable-fribidi --disable-dbus --disable-libgcrypt --disable-gnutls --disable-remoteosd --disable-skins2 --disable-qt4 --disable-libxml2 --disable-lua --disable-xcb --disable-alsa --disable-v4l2 --disable-qt --enable-run-as-root --enable-live555 --with-live555-tree=$MYDIR/live --disable-mad --disable-postproc --enable-dvbpsi --enable-x264 没有--enable-avcodec运行VLC转码会出现"cannot find video decoder"的错误。 (三) 进行RTSP To TS转码: vlc tcp://172.17.0.199:7799 --sout '#duplicate{dst="transcode{venc=x264{profile=baseline},vcodec=h264,acodec=mpga,vb=644,ab=56}:std{access=udp,mux=ts,dst=172.17.0.219:1234}"}' 使用VLC转时,不要激活转码 可正常工作的选项: :sout=#http{mux=ts,dst=:8080/1} :sout-keep :sout=#udp{mux=ts,dst=172.17.1.116:1234} :sout-keep http://www.videolan.org/doc/videolan-howto/en/ch09.html ffmpeg -i "rtsp://172.17.0.219:8554/1" -acodec libfaac -vcodec libx264 -vpre default -f mpegts -async 1 udp://127.0.0.1:3344 ./configure --prefix=/usr --enable-libfaac --enable-libx264 --enable-pthreads --disable-ffserver --disable-ffplay --enable-gpl --enable-nonfree 转码 ffmpeg -i "rtsp://172.17.0.219:8080/1" -acodec libfaac -vcodec libx264 -vpre default -f mpegts -async 1 udp://172.17.0.219:3344

2,553

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧