Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting mp4 to ogv error in bitrate #174

Closed
noppanit opened this issue May 26, 2015 · 8 comments
Closed

Converting mp4 to ogv error in bitrate #174

noppanit opened this issue May 26, 2015 · 8 comments

Comments

@noppanit
Copy link

I'm trying to convert mp4 to ogv and I got this error

16:56:55 web.1    | MoviePy error: FFMPEG encountered the following error while writing file /var/folders/c9/q6q270nn7pjbpv24w9rtdmr40000gn/T/a676055a8a13c907fe3bdedde85027.ogv:
16:56:55 web.1    |
16:56:55 web.1    |  Invalid encoder type 'libvorbis'
16:56:55 web.1    |
16:56:55 web.1    |
16:56:55 web.1    | The video export failed, possibly because the bitrate you specified was too high or too low for the video codec.

Is there anyway i could solve or debug this?

@Zulko
Copy link
Owner

Zulko commented May 26, 2015

can you paste your code ?

@noppanit
Copy link
Author

Sorry. Here's my code

                video_from_mp4 = VideoFileClip(mp4_file)
                video_from_mp4.write_videofile(filename_to_convert, codec=codec[ext])

@noppanit
Copy link
Author

The codec I choose is libvorbis

@noppanit
Copy link
Author

@Zulko
Copy link
Owner

Zulko commented May 26, 2015

I think the problem is that libvorbis is for audio files. Try:

 video_from_mp4.write_videofile(filename_to_convert, codec='libtheora')

If you want the sound to be ogg:

 video_from_mp4.write_videofile(filename_to_convert, codec='libtheora', audio_codec='libvorbis')

@noppanit
Copy link
Author

Thanks for all your fast reply. I really appreciate it.

However, I have another problem if I encode the video with codec mpeg4 it works on Safari but not on Chrome and ogv with codec libtheora doesn't work on FF. Do you have any suggestions that I can have all the videos to work for <video> tag in HTML5?

@keikoro
Copy link
Collaborator

keikoro commented Feb 25, 2017

@noppanit As this is quite old: did you manage to solve the problem? Did Zulko's tips help you solve the original problem?

@noppanit
Copy link
Author

It did solve my original problem. Thanks! I'm closing the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants