{{newin|[[0.10.0]]|100|type=function}}
Creates a new drawable [[Video]]. Currently only Ogg Theora video files are supported.
{{newobjectnotice}}

== Function ==
=== Synopsis ===
<source lang="lua">
video = love.graphics.newVideo( filename )
</source>
=== Arguments ===
{{param|string|filename|The file path to the Ogg Theora video file.}}
=== Returns ===
{{param|Video|video|A new Video.}}

== Function ==
=== Synopsis ===
<source lang="lua">
video = love.graphics.newVideo( videostream )
</source>
=== Arguments ===
{{param|VideoStream|videostream|A video stream object.}}
=== Returns ===
{{param|Video|video|A new Video.}}

== Function ==
{{newin|[[11.0]]|110|type=variant}}
=== Synopsis ===
<source lang="lua">
video = love.graphics.newVideo( filename, settings )
</source>
=== Arguments ===
{{param|string|filename|The file path to the Ogg Theora video file (or [[VideoStream]]).}}
{{param|table|settings|A table containing the following fields:}}
{{subparam|boolean|audio (false)|Whether to try to load the video's audio into an audio [[Source]]. If not explicitly set to true or false, it will try without causing an error if the video has no audio.}}
{{subparam|number|dpiscale ([[love.graphics.getDPIScale]]())|The DPI scale factor of the video.}}
=== Returns ===
{{param|Video|video|A new Video.}}

== Function ==
{{newinoldin|[[0.10.0]]|100|[[11.0]]|110|type=variant}}
=== Synopsis ===
<source lang="lua">
video = love.graphics.newVideo( filename, loadaudio )
</source>
=== Arguments ===
{{param|string|filename|The file path to the Ogg Theora video file.}}
{{param|boolean|loadaudio (nil)|Whether to try to load the video's audio into an audio [[Source]]. If not explicitly set to true or false, it will try without causing an error if the video has no audio.}}
=== Returns ===
{{param|Video|video|A new Video.}}

== Function ==
{{newinoldin|[[0.10.0]]|100|[[11.0]]|110|type=variant}}
=== Synopsis ===
<source lang="lua">
video = love.graphics.newVideo( videostream, loadaudio )
</source>
=== Arguments ===
{{param|VideoStream|videostream|A video stream object.}}
{{param|boolean|loadaudio (nil)|Whether to try to load the video's audio into an audio [[Source]]. If not explicitly set to true or false, it will try without causing an error if the video has no audio.}}
=== Returns ===
{{param|Video|video|A new Video.}}

== Examples ==
Load and play a video.
<source lang="lua">
function love.load()
    video = love.graphics.newVideo("myvideo.ogv")
    video:play()
end

function love.draw()
    love.graphics.draw(video, 0, 0)
end
</source>

== See Also ==
* [[parent::love.graphics]]
* [[Constructs::Video]]
* [[love.graphics.draw]]
[[Category:Functions]]
[[Sub-Category::Object Creation| ]]
{{#set:Description=Creates a new [[Video]].}}

== Other Languages ==
{{i18n|love.graphics.newVideo}}