[RELEASE] PseudoTV Addon: Virtual EPG and TV Channel Surfing Script - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151) +----- Forum: PseudoTV / PseudoTV Live (https://forum.kodi.tv/forumdisplay.php?fid=231) +----- Thread: [RELEASE] PseudoTV Addon: Virtual EPG and TV Channel Surfing Script (/showthread.php?tid=90738) Pages:
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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
|
- zepfan - 2011-02-10 jtucker1972 Wrote:Same here. Ember really screwed up my movie library. Weird thing is that runtime is set to min for most. Sometime you get 141 min | 160 min (premiere cut). But since I've scrapped my movies with Ember, XBMC no longer updates the streamdetails table which is where PseudoTV gets the durations from. So I get the No duration error when trying to load the channel. I even tried the playlist trick but it would just sit there and not update the durations.I'm not going to stop you, because I may be wrong, but I've tried editing out the runtime/duration from some nfo's and it just shows as blank. It could do it differently with ember though. - jtucker1972 - 2011-02-10 zepfan Wrote:I'm not going to stop you, because I may be wrong, but I've tried editing out the runtime/duration from some nfo's and it just shows as blank. It could do it differently with ember though. I am deleting all my nfo's and starting over. Since this is a clean import I want to experiment to figure out what the best way is. There doesn't seem to be a definitive answer. How does XBMC update the streamdetails data? When? During scanning of new content? During playlist viewing? I have more questions than answers at the moment. - zepfan - 2011-02-10 During scraping I believe. - jtucker1972 - 2011-02-10 zepfan Wrote:During scraping I believe. Here's my current test. 1. Deleted all nfo files. (this forces XBMC to scrape the movie information) 2. Deleted MyVideos34.db. (ensure I have a empty video data to start) 3. Scanned for new content 4. Waited for XBMC to scan threw several movies. 5. Verified in log that it had successfully scraped the movies from imdb 6. Used sqlite browser to view the streamdetails table. No records added. So, based on this test, the streamdetails are not added during the scrape, at least not with imdb scraping. I also tested with using TheMovieDB as the scraping source. Still nothing. I then opened my utility-all-movies playlist and it populated the streamdetails table. So, what ever XBMC code is behind the playlist window is populating the data we need for PseudoTV. If we could find the code that does that, then it shouldn't be a big deal to update streamdetails on the fly when needed or pull the information directly in the same method the playlist does. - Sranshaft - 2011-02-10 jtucker1972 Wrote:Here's my current test. Have you made sure you've told XBMC to grab that information? Go to Settings > Video > File Lists and check to see if extract thumbnails and video information is checked. If it isn't enabled, XBMC will only pull that information the first time you play the video. I can't understand why this setting isn't enabled out of the box as it leads to problems exactly like this. Actually, I believe this could be the reason a lot of people are having so many duration-related troubles. - steppedup - 2011-02-10 Regarding randomization of the playlists - you can ensure that you'll get randomization of playlists by turning on Shuffle.... Play a video, go to Now Playing screen, go to the options page (left-side if confluence), and Shuffle on. - jtucker1972 - 2011-02-10 Sranshaft Wrote:Have you made sure you've told XBMC to grab that information? Go to Settings > Video > File Lists and check to see if extract thumbnails and video information is checked. Yes. It is enabled in my XBMC so that is not the issue. I've traced where in the source code XBMC gets and inserts the streamdetails data. It's in the C++ source file VideoDatabase.cpp. I haven't seen where these could be called via api, but that's where they are. Trying to find more information on the XBMC development API, but looks like the wiki is down. - jtucker1972 - 2011-02-10 steppedup Wrote:Regarding randomization of the playlists - you can ensure that you'll get randomization of playlists by turning on Shuffle.... Wouldn't this just tell the player to pick a random file in the playlist? PseudoTV takes the output of the playlist and builds the m3u file which gets played in the order they appear in the m3u. So, not sure this is the answer. Either way, I would want the ability to program my channel to either randomized the list of video files I pass it or play them in the order I sent. - Sranshaft - 2011-02-10 jtucker1972 Wrote:Yes. It is enabled in my XBMC so that is not the issue. Sorry, I thought you had an issue with XBMC not populating the database with the video stream details. Without that setting enable it won't populate the database until the video is first played. I'm not sure that PseudoTV really needs the extra overhead having to deal with things that should be / are in the core of XBMC. If you have the setting enabled and it is still not populating the database then that definitely is a bug and should be brought to the attention of the devs. - jtucker1972 - 2011-02-10 Sranshaft Wrote:Sorry, I thought you had an issue with XBMC not populating the database with the video stream details. Without that setting enable it won't populate the database until the video is first played. To be clear, the setting is enabled, but the streamdetails data is not being populated when new content is being scanned in. I will do one more test to capture screens, etc. If it still behaves this way, I will report it as a bug then. Do you know where it is documented that enabling the "Extract thumbnails and video information" feature will populate streamdetails table when you scan in new content? I agree with you that Jason should not have to work around this. I've spent a personal day digging into it for my own edification. Too bad they didn't add an api call for this as well. - Sranshaft - 2011-02-10 Well, I haven't been able to find any concrete documentation but one would assume that is where it would happen. At least, that is where I would put it if I was programming the scanner (save on read/write to disk, far easier to just fire everything off at once, etc) but I have been known to be wrong. Perhaps it fires off on a separate thread after the scanning is complete. I have been able to come across a single thread started last year regarding problems with extracting video info for files on network shares. Some questions to help narrow down some things before classifying it as a bug. Are your files local or on a NAS / server? Which OS are you using? If Windows and using a network, are you using mapped drives or smb? What format are your video files in? ISOs and DVD Video_TS files need to be played first before the information is extracted. The same goes for rar files as well I believe. I'll let you know if I happen to find anything else. - jtucker1972 - 2011-02-10 Sranshaft Wrote:Well, I haven't been able to find any concrete documentation but one would assume that is where it would happen. At least, that is where I would put it if I was programming the scanner (save on read/write to disk, far easier to just fire everything off at once, etc) but I have been known to be wrong. Perhaps it fires off on a separate thread after the scanning is complete. They are are on a NAS with mapped drives. I posted a topic in general support forum as well. If not, I know the steps it would take to build a utility to do it. ffmpeg and sqlite library. 1. sqlite to determine which file ids don't have durations in streamdetails 2. loop though each file id and get path to video file 3. call ffmpeg -i <path to video filename> 4. parse out duration and other video information 5. convert to duration to seconds 6. insert into streamdetails 7. move to next file id Something like that. - Sranshaft - 2011-02-10 That doesn't sound too hard though I would use something simple like Microsoft.DirectX.AudioVideoPlayback to get the duration if that is all you're after. It's already included in any Windows installation and returns the duration in seconds automatically. If you're after the codec, resolution and audio properties then I would use MediaInfo over ffmpeg. MediaInfo is what XBMC uses to extract the video information so it's safe to assume the same details would be returned. In fact, I already have a method coded in C# that does this already. I would just need to marry that with a call to SQLite. Code: using System; - jtucker1972 - 2011-02-10 From the log I thought it XBMC used ffmpeg. I guess I am still hoping there is a way to do this from within a python script so it can occur in the background within the XBMC architecture. I know Jason is looking into something like this, but he's been quiet so not sure where he is at in the process. It's just driving me nuts that someone has to go through playlists and wait to have durations calculated. Code: 18:05:16 T:7568 M:1809375232 DEBUG: CThumbExtractor::DoWork - trying to extract filestream details from video file S:\FreeAgent Drive\Movies [SD] [G]\2001 A Space Odyssey (1968) [SD] [G]\2001 A Space Odyssey (1968) [SD] [G].avi BTW, sweet C# code. The SQLite adapter is located at http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki. - Jason102 - 2011-02-10 Nothing to report. Looking at a couple of different possibilities at the moment. If I have some real progress, don't worry I'll mention it. |