Moviepy - TypeError: Can't convert 'bytes' object to str implicitly
<pre><code>from moviepy.editor import *
clip = VideoFileClip("vid.mov")
clip.write_videofile("movie.mp4")
</code></pre>

<p>^ Gives the error </p>

<pre><code>TypeError: Can't convert 'bytes' object to str implicitly.
</code></pre>

<p>It prints "Building video movie.mp4" and "Writing audio in movieTEMP_MPY_wvf_snd.mp3" normally.</p>

<p>I am using python 3.2 with Raspian Wheezy.
What is wrong? Surely it should be a simple program...</p>

<p>EDIT:
If you add audio = false to the write_videofile parameters, it works fine. The problem is somewhere in the audio.</p>

<p>As per <a href="https://github.com/Zulko/moviepy/issues/330" rel="nofollow">this</a> answer, the issue was that there is an error in the moviepy script which generates an incorrect error output. The correct output indicates that I had not install the libmp3lame codec when I installed ffmpeg, so it could not write audio. See <a href="http://stackoverflow.com/questions/40021623/installing-libmp3lame-to-work-with-ffmpeg-on-raspberry-pi/40022016#40022016">this question</a> for details on how to correctly install ffmpeg with aforementioned codec.</p>

python raspberry-pi raspbian moviepy