Skip to content

Video editing with Python

modified max duration error for better understanding

Kapil Kumar10049248a178
diff --git a/moviepy/video/io/html_tools.py b/moviepy/video/io/html_tools.py
index 1c644c9d..acc251a8 100644
--- a/moviepy/video/io/html_tools.py
+++ b/moviepy/video/io/html_tools.py
@@ -138,9 +138,10 @@ def html_embed(clip, filetype=None, maxduration=60, rd_kwargs=None,
duration = ffmpeg_parse_infos(filename)['duration']
if duration > maxduration:
- raise ValueError("The duration of video %s (%.1f) exceeds the 'max_duration' "%(filename, duration)+
- "attribute. You can increase 'max_duration', "
- "but note that embedding large videos may take all the memory away !")
+ raise ValueError("The duration of video %s (%.1f) exceeds the 'maxduration' "%(filename, duration)+
+ "attribute. You can increase 'maxduration', by passing 'maxduration' parameter"
+ "to ipython_display function."
+ "But note that embedding large videos may take all the memory away !")
with open(filename, "rb") as f:
data= b64encode(f.read()).decode("utf-8")
@@ -216,4 +217,4 @@ def ipython_display(clip, filetype=None, maxduration=60, t=None, fps=None,
clip = clip.to_ImageClip(t)
return HTML2(html_embed(clip, filetype=filetype, maxduration=maxduration,
- center=center, rd_kwargs=rd_kwargs, **html_kwargs))
\ No newline at end of file
+ center=center, rd_kwargs=rd_kwargs, **html_kwargs))