- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › HTML5 Video
hello everyone,
plz tell me which formts support video tag in html?? if it supports only mp4 so plz tell me there is any such script that is convert mp4 format to others format when admin upload a video.
thanx
http://html5doctor.com/the-video-element/
http://html5doctor.com/multimedia-troubleshooting/
I don’t know of any ‘script’ that will convert a video in one format to another…that’s something you would have to do yourself.
ok…
You can use ffmpeg for transcoding the videos into the different formats. Figuring out the correct command line parameters for your videos will require some extra work.
Here’s what I used for some Full-HD videos:
REM mp4 (H.264 / ACC)
"ffmpeg.exe" -i %1 -b:v 12000k -vcodec libx264 -vpre slow -vpre baseline -g 30 %~n1.mp4
REM webm (VP8 / Vorbis)
"ffmpeg.exe" -i %1 -codec:v libvpx -threads 4 -quality best -vb 12000k -qmin 20 -qmax 63 -acodec libvorbis -ab 190000 -f webm -g 30 %~n1.webm
REM ogv (Theora / Vorbis)
"ffmpeg.exe" -i %1 -b:v 12000k -vcodec libtheora -acodec libvorbis -ab 190000 -g 30 %~n1.ogv
REM jpeg (screenshot at 10 seconds)
"ffmpeg.exe" -i %1 -ss 00:10 -vframes 1 -r 1 -s 640x360 -f image2 %1.jpg
Put that code in a batch file (on Windows) und run that file with your video as a parameter, like so:
mp4converter.bat "path-to-video.mp4"
To exclude an output format, just put “REM” (without quotes) in front of the line.