用VLC读取MpegTs文件的问题

时间:2011-05-31 13:59:15

标签: video mpeg2-ts

我为mpegts编写了一个编码器,我正在尝试使用VLC播放它,但是VLC无法播放我的文件。 我的编码器看起来很好,因为它正确地写入PAT,PMT表,视频数据。 请问有谁可以帮助我,可能是什么主要问题?

这是我从VLC获得的日志:

main debug: processing request item Record.mpg node Playlist skip 0
main debug: resyncing on Record.mpg
main debug: Record.mpg is at 0
main debug: starting new item
main debug: creating new input thread
main debug: Creating an input for 'Record.mpg'
main debug: thread (input) created at priority 1 (../.././src/input/input.c:214)
main debug: thread started
main debug: using timeshift granularity of 50 MiB
main debug: using timeshift path 'C:\DOCUME~1\User\LOCALS~1\Temp'
main debug: `file:///E:/RecordFiles/Record.mpg' gives access `file' demux `' path `E:\RecordFiles\Record.mpg'
main debug: creating demux: access='file' demux='' path='E:\RecordFiles\Record.mpg'
main debug: looking for access_demux module: 2 candidates
main debug: no access_demux module matching "file" could be loaded
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: creating access 'file' path='E:\RecordFiles\Record.mpg'
main debug: looking for access module: 2 candidates
filesystem debug: opening file `E:\RecordFiles\Record.mpg'
main debug: using access module "filesystem"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: Using AStream*Stream
main debug: pre buffering
main debug: received first data after 0 ms
main debug: pre-buffering done 1024 bytes in 0s - 1000000 KiB/s
main debug: looking for stream_filter module: 2 candidates
main debug: no stream_filter module matching "any" could be loaded
main debug: TIMER module_need() : 3.000 ms - Total 3.000 ms / 1 intvls (Avg 3.000 ms)
main debug: looking for stream_filter module: 1 candidate
main debug: using stream_filter module "stream_filter_record"
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: creating demux: access='file' demux='' path='E:\RecordFiles\Record.mpg'
main debug: looking for demux module: 50 candidates
ts debug: pid[16] unknown
ts debug: pid[32] unknown
qt4 debug: IM: Setting an input
ts debug: eof ?
main debug: using demux module "ts"
main debug: TIMER module_need() : 67.000 ms - Total 67.000 ms / 1 intvls (Avg 67.000 ms)
main debug: looking for a subtitle file in E:\RecordFiles\
ts debug: DEMUX_SET_GROUP 0 00000000
main debug: looking for meta reader module: 2 candidates
lua debug: Trying Lua scripts in C:\Documents and Settings\User\Application Data\vlc\lua\meta\reader
lua debug: Trying Lua scripts in C:\Program Files\VideoLAN\VLC\lua\meta\reader
lua debug: Trying Lua playlist script C:\Program Files\VideoLAN\VLC\lua\meta\reader\filename.lua
main debug: no meta reader module matching "any" could be loaded
main debug: TIMER module_need() : 0.000 ms - Total 0.000 ms / 1 intvls (Avg 0.000 ms)
main debug: `file:///E:/RecordFiles/Record.mpg' successfully opened
ts debug: eof ?
main debug: EOF reached
main debug: finished input
ts debug: pid list:
ts debug:   - pid[0] seen
ts debug:   - pid[16] seen
ts debug:   - pid[32] seen
ts debug:   - pid[8191] seen
main debug: removing module "ts"
main debug: removing module "stream_filter_record"
main debug: removing module "filesystem"
main debug: dead input
main debug: thread ended
main debug: thread times: real 0m0.078125s, kernel 0m0.046875s, user 0m0.031250s
main debug: changing item without a request (current 0/1)
main debug: nothing to play
qt4 debug: IM: Deleting the input
main debug: TIMER input launching for 'Record.mpg' : 70.000 ms - Total 70.000 ms / 1 intvls (Avg 70.000 ms)

1 个答案:

答案 0 :(得分:1)

我不清楚,但我确实看到两个未知的pids,VLC认为没有任何关系。因此,如果实际存在于TS中,可能可播放的数据包将被忽略,因为它无法将pid与解码器相关联。查找传输流查看器程序,并将您的TS与其他已知工作进行比较,寻找差异。