[vlc-commits] commit: youtube.lua: add demux=avformat, ffmpeg for options (Ilkka Ollakka )

git at videolan.org git at videolan.org
Wed May 26 20:01:21 CEST 2010


vlc/vlc-1.1 | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Sun May 23 12:04:01 2010 +0300| [e1e74df198c8c008ac1033e09268c36ad1479330] | committer: Pierre Ynard 

youtube.lua: add demux=avformat,ffmpeg for options

This should help watching mp4-videos (&fmt=18 and 22 or something like that)
from youtube. ffmpeg for fallback for windows. Not idea about OS X side.
(cherry picked from commit fc5f04d8f6c4a79534d4530e4e15ab9a88deaeb5)

Signed-off-by: Pierre Ynard <linkfanel at yahoo.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=e1e74df198c8c008ac1033e09268c36ad1479330
---

 share/lua/playlist/youtube.lua |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 1f0b230..11f01fb 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -38,6 +38,7 @@ function probe()
     if vlc.access ~= "http" then
         return false
     end
+    options = {":demux=avformat,ffmpeg"}
     youtube_site = string.match( string.sub( vlc.path, 1, 8 ), "youtube" )
     if not youtube_site then
         -- FIXME we should be using a builtin list of known youtube websites
@@ -103,10 +104,10 @@ function parse()
             format = ""
         end
         if t then
-            return { { path = base_yt_url .. "get_video?video_id="..video_id.."&t="..t..format; name = name; description = description; artist = artist; arturl = arturl } }
+            return { { path = base_yt_url .. "get_video?video_id="..video_id.."&t="..t..format; name = name; description = description; artist = artist; arturl = arturl; options = options } }
         else
             -- This shouldn't happen ... but keep it as a backup.
-            return { { path = "http://www.youtube.com/v/"..video_id; name = name; description = description; artist = artist; arturl = arturl } }
+            return { { path = "http://www.youtube.com/v/"..video_id; name = name; description = description; artist = artist; arturl = arturl; options=options } }
         end
     else -- This is the flash player's URL
         if string.match( vlc.path, "title=" ) then
@@ -123,8 +124,8 @@ function parse()
         if not string.match( vlc.path, "t=" ) then
             -- This sucks, we're missing "t" which is now mandatory. Let's
             -- try using another url
-            return { { path = "http://www.youtube.com/v/"..video_id; name = name; arturl = arturl } }
+            return { { path = "http://www.youtube.com/v/"..video_id; name = name; arturl = arturl; options=options } }
         end
-        return { { path = "http://www.youtube.com/get_video.php?video_id="..video_id.."&t="..get_url_param( vlc.path, "t" )..format; name = name; arturl = arturl } }
+        return { { path = "http://www.youtube.com/get_video.php?video_id="..video_id.."&t="..get_url_param( vlc.path, "t" )..format; name = name; arturl = arturl; options=options } }
     end
 end



More information about the vlc-commits mailing list