{"id":220,"date":"2011-06-07T02:14:30","date_gmt":"2011-06-07T02:14:30","guid":{"rendered":"http:\/\/hosting-marketers.com\/news\/?p=220"},"modified":"2012-01-18T09:40:35","modified_gmt":"2012-01-18T09:40:35","slug":"using-ffmpeg-to-create-a-single-thumbnail-image-from-a-red5-recorded-flv-file","status":"publish","type":"post","link":"https:\/\/hosting-marketers.com\/news\/2011\/06\/07\/using-ffmpeg-to-create-a-single-thumbnail-image-from-a-red5-recorded-flv-file\/","title":{"rendered":"Using ffmpeg to create a single thumbnail image from a red5 recorded flv file"},"content":{"rendered":"<p>Below is a simple php code to manipulate with ffmpeg and create a thumbnail image from a recorded flv file. Assuming that we used oflaDemo to record the video and we want the image to be the frame on the 4th second of the video:<\/p>\n<p>&lt;?php<\/p>\n<p>\/\/Set video flv path<br \/>\n$videoFilePath = &#8220;\/usr\/local\/red5\/webapps\/oflaDemo\/streams\/9.flv&#8221;;<\/p>\n<p>\/\/Set Image path<br \/>\n$videoImageFilePath = &#8220;\/home\/username\/public_html\/test\/test.jpg&#8221;;<\/p>\n<p>\/\/Set time<br \/>\n$time = &#8217;00:00:04&#8242;;<\/p>\n<p>\/\/Execute ffmpeg command<br \/>\nexec(&#8220;\/usr\/local\/bin\/ffmpeg -i $videoFilePath -an -ss &#8221; . $time . &#8221; -an -r 1 -s qcif -vframes 1 -y $videoImageFilePath &#8220;);<\/p>\n<p>?&gt;<\/p>\n<p>Check if exec is enabled on your account, in most of our servers it is disabled, contact support to have it enable in your account, this is done by adding a php.ini file to your account.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Below is a simple php code to manipulate with ffmpeg and create a thumbnail image from a recorded flv file. Assuming that we used oflaDemo to record the video and we want the image to be the frame on the 4th second of the video: &lt;?php \/\/Set video flv path $videoFilePath = &#8220;\/usr\/local\/red5\/webapps\/oflaDemo\/streams\/9.flv&#8221;; \/\/Set Image [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2],"tags":[62],"class_list":["post-220","post","type-post","status-publish","format-standard","hentry","category-hosting-marketers-news","tag-red5-and-ffmpeg"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p9Yxzd-3y","jetpack-related-posts":[{"id":170,"url":"https:\/\/hosting-marketers.com\/news\/2010\/08\/26\/red5-and-ffmpeg\/","url_meta":{"origin":220,"position":0},"title":"red5 and ffmpeg","author":"Admin","date":"August 26, 2010","format":false,"excerpt":"One of our customers asked if he could stream through the ffmpeg folder. FFmpeg is a software which converts video files in different formats to video files in flv format this videos are then streamed through a swf player just like the streaming of red5 videos, which are also on\u2026","rel":"","context":"In &quot;Hosting Marketers News&quot;","block_context":{"text":"Hosting Marketers News","link":"https:\/\/hosting-marketers.com\/news\/category\/hosting-marketers-news\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65,"url":"https:\/\/hosting-marketers.com\/news\/2008\/07\/09\/ffmpeg-hosting-to-support-your-video-site\/","url_meta":{"origin":220,"position":1},"title":"FFmpeg hosting to support your video site","author":"Admin","date":"July 9, 2008","format":false,"excerpt":"FFmpeg hosting is meant to support the web sites that display their contents in the form of video files. FFmpeg hosting is required to transfer the video files created with the help of scripting languages such as Phpmotion, You tube etc to .flv format to display the videos in the\u2026","rel":"","context":"In &quot;Hosting Marketers News&quot;","block_context":{"text":"Hosting Marketers News","link":"https:\/\/hosting-marketers.com\/news\/category\/hosting-marketers-news\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":162,"url":"https:\/\/hosting-marketers.com\/news\/2010\/02\/13\/how-to-install-the-latest-ffmpeg-mplayer-mencoder-ffmpeg-php-on-centos-server\/","url_meta":{"origin":220,"position":2},"title":"How To Install FFmpeg, Mplayer, Mencoder, FFmpeg-PHP on a CentOS server","author":"Admin","date":"February 13, 2010","format":false,"excerpt":"I tried first to use the installer of ScriptMantra but for some reason there were errors sometimes the Liba52, sometimes the Mplayer were not installed, so I just gave up and used the autoinstaller just to remove all traces of ffmpeg on the server, then I used the yum to\u2026","rel":"","context":"In &quot;Hosting Marketers News&quot;","block_context":{"text":"Hosting Marketers News","link":"https:\/\/hosting-marketers.com\/news\/category\/hosting-marketers-news\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":105,"url":"https:\/\/hosting-marketers.com\/news\/2009\/07\/02\/alojamento-de-sites-our-new-european-ffmpeg-hosting\/","url_meta":{"origin":220,"position":3},"title":"Alojamento de Sites &#8211; Our New European FFmpeg Hosting","author":"Admin","date":"July 2, 2009","format":false,"excerpt":"Alojamento FFMpeg Hoje em dia existem imensas empresas de alojamento de sites, no entanto a percentagem de empresas que fornecem o servi\u00c3\u00a7o de alojamento de p\u00c3\u00a1ginas din\u00c3\u00a2micas, ainda n\u00c3\u00a3o fornecem alojamento com suporte ffmpeg. Um alojamento com suporte ffmpeg \u00c3\u00a9 hoje em dia a primeira escolha para quem procura criar\u2026","rel":"","context":"In &quot;Hosting Marketers News&quot;","block_context":{"text":"Hosting Marketers News","link":"https:\/\/hosting-marketers.com\/news\/category\/hosting-marketers-news\/"},"img":{"alt_text":"Alojamento ffmpeg","src":"https:\/\/i0.wp.com\/hosting-marketers.com\/news\/wp-content\/uploads\/2009\/07\/ffmpeg.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":127,"url":"https:\/\/hosting-marketers.com\/news\/2009\/10\/21\/installing-red5-the-simple-way\/","url_meta":{"origin":220,"position":4},"title":"Installing red5, the simple way!","author":"Admin","date":"October 21, 2009","format":false,"excerpt":"It is not working any more, some files have been changed and our installer is now outdated, soon we will fix the issue. January 2010. The following steps are intended to automate the installation of Red 5 versions 0.5 , 0.6.3 and 0.7.0 . I know there is now 0.8\u2026","rel":"","context":"In &quot;Hosting Marketers News&quot;","block_context":{"text":"Hosting Marketers News","link":"https:\/\/hosting-marketers.com\/news\/category\/hosting-marketers-news\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":201,"url":"https:\/\/hosting-marketers.com\/news\/2010\/12\/30\/getting-event-cue-points-to-work-with-red5-0-8-and-red5-0-9-1\/","url_meta":{"origin":220,"position":5},"title":"Getting Event Cue Points to work with Red5 0.8 and Red5 0.9.1","author":"Admin","date":"December 30, 2010","format":false,"excerpt":"I've written a flash app (in AS3) that streams video to a red5 server (over RMTP of course) and embeds event cue points into the stream. The red5 server is using the OFLA demo that comes with red5, which converts the streams to FLV files. I then have another flash\u2026","rel":"","context":"In &quot;RTMP and video streaming&quot;","block_context":{"text":"RTMP and video streaming","link":"https:\/\/hosting-marketers.com\/news\/category\/rtmp-and-video-streaming\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/posts\/220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/comments?post=220"}],"version-history":[{"count":8,"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/posts\/220\/revisions"}],"predecessor-version":[{"id":222,"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/posts\/220\/revisions\/222"}],"wp:attachment":[{"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/media?parent=220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/categories?post=220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hosting-marketers.com\/news\/wp-json\/wp\/v2\/tags?post=220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}