-
Notifications
You must be signed in to change notification settings - Fork 0
/
mplayer_seek_problem
182 lines (129 loc) · 6.4 KB
/
mplayer_seek_problem
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
实际时间: 04:15, 04:13
显示时间: A: 269.9 (04:29.8) of 4131.0 ( 1:08:51.0) 1.5% 感觉这个时间并不准确,有一定的缓冲。播放时间位置一直落后于这个显示时间。
04:20
ideer@ideer:/home/chenz/aMule/Incoming/MusiCD$ time mplayer -ao alsa LPCD45之等你等到我心痛精选.flac
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 Duo CPU T5750 @ 2.00GHz (Family: 6, Model: 15, Stepping: 13)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
/home/ideer/.fonts/STHeiti.ttf doesn't look like a bitmap font description, ignoring.
Cannot load bitmap font: /home/ideer/.fonts/STHeiti.ttf
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing LPCD45之等你等到我心痛精选.flac.
Audio file file format detected.
Clip info:
Album: LPCD45之等你等到我心痛精选
Artist: 张学友
==========================================================================
Forced audio codec: mad
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 858.9 kbit/60.86% (ratio: 107359->176400)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio decoder)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 264.2 (04:24.1) of 4131.0 ( 1:08:51.0) 1.5%
MPlayer interrupted by signal 2 in module: play_audio
real 4m13.190s
user 0m6.400s
sys 0m0.724s
手机计时 00:04:14:98s
说明实际歌曲长度在4:13左右,但是我们seek到253s,歌曲并没有结束
ideer@ideer:/home/chenz/aMule/Incoming/MusiCD$ time mplayer -ao alsa LPCD45之等你等到我心痛精选.flac
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 Duo CPU T5750 @ 2.00GHz (Family: 6, Model: 15, Stepping: 13)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
/home/ideer/.fonts/STHeiti.ttf doesn't look like a bitmap font description, ignoring.
Cannot load bitmap font: /home/ideer/.fonts/STHeiti.ttf
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing LPCD45之等你等到我心痛精选.flac.
Audio file file format detected.
Clip info:
Album: LPCD45之等你等到我心痛精选
Artist: 张学友
==========================================================================
Forced audio codec: mad
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 858.9 kbit/60.86% (ratio: 107359->176400)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio decoder)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 263.8 (04:23.8) of 4131.0 ( 1:08:51.0) 1.5%
MPlayer interrupted by signal 2 in module: play_audio
real 4m12.802s
user 0m6.520s
sys 0m0.864s
手机时间:00:04:12:59s
ideer@ideer:/home/chenz/aMule/Incoming/MusiCD$ time mplayer -ao alsa LPCD45之等你等到我心痛精选.flac
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 Duo CPU T5750 @ 2.00GHz (Family: 6, Model: 15, Stepping: 13)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
/home/ideer/.fonts/STHeiti.ttf doesn't look like a bitmap font description, ignoring.
Cannot load bitmap font: /home/ideer/.fonts/STHeiti.ttf
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing LPCD45之等你等到我心痛精选.flac.
Audio file file format detected.
Clip info:
Album: LPCD45之等你等到我心痛精选
Artist: 张学友
==========================================================================
Forced audio codec: mad
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 858.9 kbit/60.86% (ratio: 107359->176400)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio decoder)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 264.1 (04:24.0) of 4131.0 ( 1:08:51.0) 1.5%
MPlayer interrupted by signal 2 in module: play_audio
real 4m13.072s
user 0m6.384s
sys 0m0.760s
手机时间: 00:04:12:82
ideer@ideer:/home/chenz/aMule/Incoming/MusiCD$ time mplayer -ao alsa '黄凯芹 LPCD45.flac'
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 Duo CPU T5750 @ 2.00GHz (Family: 6, Model: 15, Stepping: 13)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
/home/ideer/.fonts/STHeiti.ttf doesn't look like a bitmap font description, ignoring.
Cannot load bitmap font: /home/ideer/.fonts/STHeiti.ttf
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
Playing 黄凯芹 LPCD45.flac.
Audio file file format detected.
Clip info:
Album: LPCD45之黄凯芹
Artist: 黄凯芹
==========================================================================
Forced audio codec: mad
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 835.8 kbit/59.23% (ratio: 104479->176400)
Selected audio codec: [ffflac] afm: ffmpeg (FFmpeg FLAC audio decoder)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 264.0 (04:24.0) of 4028.0 ( 1:07:08.0) 1.5%
MPlayer interrupted by signal 2 in module: play_audio
real 4m18.166s
user 0m6.864s
sys 0m0.872s
手机时间: 00:04:17:95
这个显示时间也许只是缓冲区内的时间,并不是实际已经播放的时间。seek操作可能是根据这个时间来进行,但是
这是错误的。但是绝对寻址不应该根据这个时间啊,困惑。
假设p1指向实际的播放位置,p2指向缓冲区中已经解码的位置,seek delta的结果应该是 p1 = p1 + delta,
而不是仅把delta之后的加到缓冲区中。先清空p1,然后另p1指向新的位置。
seek不但不能清空缓冲区,