Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
fd0cdccc
Commit
fd0cdccc
authored
Mar 20, 2008
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DM: Use built-in priority for known codecs
Not every dailymotion video is available in vp6
parent
f38c4189
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
7 deletions
+18
-7
share/luaplaylist/dailymotion.lua
share/luaplaylist/dailymotion.lua
+18
-7
No files found.
share/luaplaylist/dailymotion.lua
View file @
fd0cdccc
...
...
@@ -42,22 +42,33 @@ function parse()
and resolutions:
/A@@spark||/B@@spark-mini||/C@@vp6-hd||/D@@vp6||/E@@h264
Not everybody can decode HD, not everybody has a 80x60 screen,
H264/MP4 is buggy , so i choose VP6
H264/MP4 is buggy , so i choose VP6
as the highest priority
Ideally, VLC would propose the different streams available, codecs
and resolutions (the resolutions are part of the URL)
For now we just built a list of preferred codecs : lowest value
means highest priority
]]
local pref = { ["
vp6
"]=0, ["
spark
"]=1, ["
h264
"]=2, ["
vp6
-
hd
"]=3, ["
spark
-
mini
"]=4 }
local available = {}
for n in string.gmatch(videos, "
[
^
|
]
+
") do
i = string.find(n, "
@@
")
if i then
video = string.sub( n, 0, i - 1)
codec = string.sub( n, i + 2 )
if video and codec and string.match(codec, "
vp6
") then
path = "
http
:
//
dailymotion
.
com
" .. video
break
end
available[string.sub(n, i+2)] = string.sub(n, 0, i-1)
end
end
local score = 666
local bestcodec
for codec,_ in pairs(available) do
if pref[codec] < score then
bestcodec = codec
score = pref[codec]
end
end
if bestcodec then
path = "
http
:
//
dailymotion
.
com
" .. available[bestcodec]
end
end
if string.match( line, "
<
meta
name
=
\
"description\"" )
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment