We already saw how to convert one video. Let's create another video, but this time we are going to define which segment of the video we want to convert, rather than converting the whole video.
1. In the
listing_7_02.cfm
template, add the following lines of code so that the template code now looks like this:<cfsetting requesttimeout="600"> <cfvideo action="convert" source="bbb_trailer_iphone.m4v" destination="trailer.flv"> <cfvideo action="convert" source="bbb_trailer_iphone.m4v" destination="clip.flv" start="19s" max="3s">
2. When we run the code by going to
http://localhost:8888/Chapter_7/listing_7_02.cfm
and look in the folder, you will see we have atrailer.flv
file and aclip.flv
file. The clip was created by stating when we wanted the conversion to start, and the number of seconds we wanted to convert (thestart="19s"
andmax="3s"
attributes).3. Awesome! We have now created our clips.
4. Let's get some info from...