简体   繁体   中英

ffmpeg settings for converting to mp4 from ogg for HTML5 video

I'm trying to convert OVG to MP4 H.264 valid format for use in HTML5 video. I tryid this:

ffmpeg -i video_source_file.ogv -vcodec libx264 -vpre ipod640 -b 250k -bt 50k -acodec libfaac -ab 56k -ac 2 -s 480x320 video_out_file.mp4

But the generated format is invalid for Internet Explorer 9 and 10. Other H.264 videos works fine. VLC says that the generated video is H.264.

It only happens when I try to convert ogv/ogg valid videos to mp4 H.264.

I also tried many options in ffmpeg2theora, but it appears only to convert files to theora. I thought this might help, but I could not generate a valid H.264.

How to make it work?

It appears to work:

ffmpeg.exe -y -i in.ogv -vcodec libx264 -vpre libx264-lossless_max out.mp4

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM