ffmpeg, the flashvideo module and testing locally on Windows
We like using the FlashVideo module in some of our Drupal installations, as being able to transcode submitted videos via ffmpeg is pretty sweet. However, as you may know — testing this locally on Windows can be a difficult task, as setting up ffmpeg locally can be somewhat enigmatic to say the least. Right now I’ve only tested this method on XP (I ‘m stubborn and haven’t, erm, “upgraded ” to Vista yet), so anyone who can confirm it works on Vista — please! I don’t see why it wouldn’t, though, as it’s really just an executable file. [Works for me on Vista! -Ed.] Just FYI — I’m running Apache (using the great XAMPP distribution) locally for testing purposes. I don’t think this matters too much, but wanted to throw it in there. I’ve opted to not cover how to install and configure FlashVideo, as there is good documentation available for that here. This tutorial is focused on installing ffmpeg locally, so you can test workflow, etc on your machine before you go to staging on a live server (which ideally will already be configured with ffmpeg). First of all, you need to find windows binaries for ffmpeg. The one I’m using came from http://ffdshow.faireal.net/mirror/ffmpeg/. I just downloaded the most recent archive in the list. Decompress the archive somewhere inside your Drupal installation folder. I make sure to exclude it when on commit to a live server, cause its pretty useless once you go live on a linux box or what-have-you. I guess being lazy and leaving it in wont hurt anything, but its sloppy! Assuming you already have the FlashVideo module installed, lets work on the global FlashVideo settings first: admin/settings/flashvideo/edit/global First things first, check the box to “Convert videos immediately”. I don’t really know why you’d ever not want to do this, but I guess there’s a case. If you don’t want to check this box, just make sure you run cron after you submit a node w/ a FlashVideo, to see if it worked. Now, obviously there are a plethora of other options to choose from, all which are covered in the docs, so follow those to do whatever it is you’re doing, and we’re going to jump directly to the ffmpeg settings. Scroll down and open the FFMPEG settings group. The first thing you’ll see is the ffmpeg command. The one that is set by default doesn’t exactly work properly (or didn’t for me), so I recommend starting with what I’m using:
-i @input -f flv -acodec libmp3lame -ar 22050 -ab 64k -ac 1 @outputas far as I remember, the thumbnail command was good to go, but just in case, here’s mine:
-y -i @input -vframes 1 -ss @thumbtime -an -vcodec mjpeg -f rawvideo -s "@thumbsize" @outputNext, you should enter the path to your ffmpeg executable. I extracted it to a folder off my installation called ffmpeg, so mine looks like this:
ffmpeg\ffmpeg.exeThen I set up the output folders. I prefer to set the paths relative to the Drupal root (so I dont have to change this later), so mine are just set to files/original and files/converted, respectively. Hit save configuration and go back to the main FlashVideo admin page: admin/settings/flashvideo. Enable FlashVideo for whatever content types you want, tweak all your other settings and try adding a node with a video. On submit, the files should convert and end up in the folders you specified. Doesn’t work? Double check your path to ffmpeg and your conversion commands. Make sure your new node has the [video] tag somewhere in the body. If everything seems in order, there’s one last way to troubleshoot. Go back to your global settings and tick the box for “Log Conversion Data” and save your settings. Open up phpmyadmin (or whatever you feel like using to browse your mysql db) and look for the table ffmpeg_data. Browse the table and you should see a row for every time you submitted a content type that tried to run a conversion. Choose a row and look at the fields. input_file and output_file should show the filename of what you’re trying to convert including path (relative to the Drupal root). Now drop down to a command prompt and change to the directory you decompressed ffmpeg to. Try running ffmpeg with the command you specified in the configuration, with the input and output files replaced with what you found in the db (make sure you adjust the path to be accurate, Drupal runs ffmpeg from it’s root). A test case for me looked like this:
C:\drupal_site\ffmpeg>ffmpeg -i ../files/original/Test.mov -f flv -acodec libmp3lame -ar 22050 -ab 64k -ac 1 ../files/converted/Test.flvIf anything goes wrong, you should see an error message. If this is the case, sorry I couldn’t help. At least now you’ll have something to stick into Google. Now, worth mentioning is that when you go live you must remember to change the ffmpeg path to wherever the binary resides on your server. You can ask your admin where it is if you dont know, but for my server, I change the path to /usr/local/bin/ffmpeg. This posting doesn’t really cover you if you’re looking to set up ffmpeg-php, however Lorenzo Gangi already has you covered on this one, and it works for me.
Submitted by canary on Sat, 05/31/2008 - 2:42am
Tags in Tags
- Philly arts and culture reporters share tips on how to get great press coverage
- Blog post: Outside(r) Art
- Philly arts organizations take on social media fads: A short history
- Entrepreneurship and Risk-Taking in Arts Organizations
- A Look Ahead This Month
- Philly's Top Broadcasters Weigh In: What Makes the Evening News?
- Top 10 Philadelphia Arts and Culture Orgs on Pinterest
- Be a Belieber in marketing your arts organization to teenagers
- Top Arts Marketing Resources for 2014
- The Constant Grammarian: Three Grammar Resolutions You'll Want to Keep in 2014
- 2014: The Year Ahead
- ICYMI: Getting meta on social media, and other November reading
- Making Spirits Bright: Canary’s Holiday Favorites
- Canary Promotion Wins Two Awards from the PRSA!
- ICYMI: What would you do if you were banned from Twitter?
- Messaging in a Bottle: How to Tell a Compelling “Story of Us”
- The Hot Topic of Crowdfunding for Conservation
- ICYMI: Where we've been this fall, and where we're going
- Canary Guest Blogs for Americans for the Arts: A Holistic Approach to Communications
- PR in the Age of Shortening: Should we join ’em if we can’t beat ’em?
- Megan Wendell on Keystone Edge: Growth, inspiration and putting the arts first
- Canary in Harrisburg for the Launch of Pennsylvania’s Top 10 Endangered Artifacts
- Canary News: Fall Arts Bounty, Winning at the Geek Awards, Social Media Tips
- Playing Favorites: Where to find the Canary staff at the 2013 Fringe Festival
- Weekend Wrap Up: Great Press for Mauckingbird and Puppet Festival (r)Evolution
- More Than Words: Bringing Audiences Into the Moment with Instagram
- ICYMI: What We're Reading This Summer
- 6 Ways Twitter Can Help Sell Tickets (Part 2)
- 6 Ways Twitter Can Help Sell Tickets (Part 1)
- Adventures in Pittsburgh: How cultural storytelling can invigorate a city
- ICYMI: What Caught Our Attention in May
- The Constant Grammarian, Part 3: Thou Art Banished
- Spring 2013 Newsletter: What Kind of Leader Are You?
- Crowdsourcing: How Honesty Moves Us Forward
- So You’ve Hired a Communications Team – Now What?
- ICYMI: What Caught Our Attention in April
- Third Time’s the Charm: Congratulations to the 43 winners of the 2013 Knight Arts Challenge!
- Five Signs It’s Time to Hire a Communications Firm
- Stop Wasting Money: How to Stretch Your Facebook Ad Dollars
- ICYMI: What Caught Our Attention in March
- Take readers behind the scenes — even while you're setting the stage: A content marketing strategy for arts organizations
- Faces of PRSA Philly: The Canary edition
- Connecting Organically: How PR drives SEO results
- The Future of Cultural Journalism: Inspiration, Innovation and Proactivity
- What’s the future of cultural journalism? How can art connect communities?
- Canary Goes Global: World-class culture in the City of Brotherly Love
- Cultural Moments of 2012: Megan's Picks
- Cultural Moments of 2012: Rose's Picks
- Cultural Moments of 2012: Carolyn's Picks
- A Better Barrymore? Theatre Philadelphia: A Celebration! gave the arts community a much-needed boost at just the right moment.
- Internship Alert: Canary Promotion is hiring PR/Marketing interns this fall!
- Philly 101 Wrap Party @ Frankford Hall: What You Wish You Knew, Now You Know
- The Constant Grammarian, Part 1: Seven Words and Phrases You Didn’t Know You Didn’t Know
- Canary Promotion Newsletter: Summer 2012
- Insight into Insights: Reach Your Goals With the Right Facebook Campaign
- Insight into Insights: Reach Your Goals With the Right Facebook Campaign
- Congratulations to the 2012 Knight Arts Challenge Philadelphia winners!
- Rediscover Public Art with Fairmount Park Art Association
- 5 Things You Can Do For Your Small Business Right Now
- Canary Promotion Welcomes Carolyn Huckabay of Philadelphia City Paper as Public Relations Associate
- 10 years, a bounty of art, and a job that still thrills me
- Young Voices Were On the Minds of TEDxPhilly Speakers
- Festivals, Public Art, Drama & Dracula: What We're Working On This Season
- Plenty to see this weekend as DesignPhiladelphia winds down. Stop by Not A Vacant Lot!
- 6 Tips for Getting Press-Perfect Photos
- Knight Foundation and NEA Seek New Models for Arts Journalism
- Live Arts Festival Tickets On Sale Now!
- With Facebook Ads, It's All About the Timing.
- We're hiring: PR & Marketing Coordinator position available
- The Value of Intangible Goods. How Donating Your Knowledge Makes a Difference.
- The Cultural Engagement Index, Why Audience Participation Matters
- Congratulations to all of the Knight Arts Challenge Philadelphia 2011 Winners!
- A mural party at the Rosenbach, a frank conversation with Maurice Sendak & the musically inspired “Grace Notes”
- Canary Promotion Newsletter: Spring 2011
- Spring is in the air! The Canary office gets spruced up for Spring.
- Our PIFA Picks: A Cultural Playground in April
- 6 Essentials for Successfully Working with the Media
- Woodmere Art Museum Opens Five New Exhibitions
- Spring Break at Live Arts Brewery - A Laboratory for Research and Development
- Connecting With Your Community Through Facebook Ads
- Ars Nova Workshop presents Fieldwork, “A jazz power trio for the new century” (NPR)
- Put A Bird On It!
- Final Days to See John Folinsbee and American Modernism at the Woodmere
- 7 Ways to Improve Your PR Writing
- Sometimes these Canaries need their creative-beauty sleep
- Young Voices High School Monologue Festival On Stage at The Adrienne Theater This Week
- The Associated Press, NPR, Philadelphia Inquirer & New York Times are all talking about the Rosenbach's Sendak Mural
- John Folinsbee and American Modernism Lecture Series at Woodmere Art Museum
- Our Favorite Cultural Moments of 2010: Megans' Picks
- Our Favorite Cultural Moments of 2010: TEDxPhilly
- Our favorite cultural moments of 2010: Flash Opera, The Return of the Cultural Flash Mob to Philadelphia
- Our 2010 Year in Review
- We're taking a holiday break!
- Rescue Your Blog with an Editorial Calendar
- Philadelphia’s got talent, United States Artists Knight Fellows announced
- Holiday Shop at Woodmere Art Museum
- Ladies Rock Camp - the perfect gift for the ladies in your life
- Museum Without Walls: AUDIO the subject of national Associated Press story
- Chester County Historical Society Launches Social Media Campaign
- The Rosenbach Museum & Library announced today news of stunning new portraiture acquisitions
- Woodmere Art Museum Upcoming Community Events
- Theater showcase by & for youth in Philadelphia touches on big issues at the right time
- TEDxPhilly, November 18, 2010 at the Kimmel Center.
- Canary clients have "Big Vision" says City Paper - We Agree!
- Spooky. Canary's tips for Halloween-themed events in Philly
- Coming Up: opportunities to get your Knight Arts Challenge questions answered
- Mayor Nutter, Arts Community Celebrate Knight Arts Challenge Philadelphia Launch
- Coming Oct. 5: Knight Foundation brings new support to the arts in Philadelphia
- Have you heard? The Philadelphia Live Arts Festival and Philly Fringe is taking over!
- Two thumbs up for Mauckingbird's revamped queer "A Midsummer Night's Dream"
- How creative PR & marketing work together to draw in new audiences
- Museum Without Walls™: AUDIO wins Philadelphia Magazine BEST of PHILLY 2010 Award!
- The Rosenbach's new 'Dreadful Things Happen' exhibition reviewed in today's Inquirer
- Philadelphia Weekly “Picks for Best Theater This Year” Includes Five Canary Client Mentions!
- Canary News: Announcing some changes & new opportunities
- We're Looking for PR/Marketing Interns for the Fall!
- Fringe Fest Sideshow: Opportunity for Philly Fringe Artists & Fans
- Today, Celebrate Bloomsday with the Rosenbach Museum & Library at Trinity Center for Urban Life
- Museum Without Walls™: AUDIO Program Officially Launches at LOVE Park
- Thursday, June 10th, Fairmount Park Art Association launches the groundbreaking Museum Without Walls™: AUDIO program in LOVE Park!
- The Wilma Theater's U.S. Premiere of "Leaving" Opens TONIGHT!
- Drupaldelphia Wrap-Up
- Canary client Swim Pony Performing Arts will host Philadelphia's next large-scale improv event!
- The 2010 Philadelphia Live Arts Festival + Philly Fringe Line-up is Announced!
- Google Chrome - Search Any Site from the Address Bar
- The New York Times reviews Philagrafika 2010, a Canary PR client!
- displaying location fields in a view
- Happy 200th Birthday, Edgar!: Brat Productions Celebrates with One-of-a-kind Theatrical Haunted House
- safari clips div when using anchor tags
- Philadelphia: Where the Wild Things Are + Sendak Mania at the Rosenbach
- string parsing code to get url from image tag
- Philadelphia Live Arts Festival & Philly Fringe Opens Today!
- Pig Iron Theatre Company's Welcome to Yuba City
- We're hiring! FT Publicity & Marketing Assistant
- Replace Taxonomy pages w/ Embed Views
- Embed Views
- creating a style for every n-th item in a list
- incremental classes when grouping multiple cck values in views
- Custom CCK Formats
- Blueprint Grid Overlay in the Browser
- Grid Nirvana - How to Easily Incorporate Blueprint into Photoshop
- running cron.php from crontab
- redirect traffic from a subdomain to the root
- Theming a page by arbitrary content types
- Bloomsday Gives Joyceans a Reason to Love Philadelphia
- Get the path to a Drupal module or theme
- IE doesn't load stylesheets / IE doesn't load conditional comment stylesheets
- IE6 PNG Fix
- Watch nEW Festival Artist Interviews on StreetTalkin.com
- Add a custom ID to menu items based on the text in the link
- Even out different date fields across content types
- Embed Views2 blocks w/ PHP
- EmField Error: "Sorry, you need to install flash to see this content."
- Views2: Find the first NID from another view to use as an argument
- Watch WHYY: Experience Philadelphia Young Playwrights
- delete .svn folders from the cli
- Convert string to CSS friendly text
- Display taxonomy terms from one vocabulary id
- Web Design and Drupal Internship Available
- DrupalCon DC as a mind map
- Canary at DrupalCon DC
- Canary Promotion + Design seeks Web Designer/Developer
- PR/Marketing Internship Opening
- custom jQuery accordion menu function for drupal primary menu
- South Street offers empty storefronts to artists
- Client Testimonial: Neil Baldwin
- DrupalCamp Philly
- memory error: Fatal error: Allowed memory size of ...
- Complaint Choir on CBS 3!
- The 6 Dangerous Fallacies of Social Media
- Inaugural BarCamp Philly to be held November 8
- Treehouse of Horror: Canary Pumpkins Rule the Night
- First Person Festival
- calibrate your monitor
- Val Emmich, Little Daggers
- Ben Franklin persists
- Rock 'n' Roll at The Wilma Theater
- Sarah Palin and Hillary Clinton on SNL
- Help Elect Barack Obama. We can't afford to lose this.
- Connecting to MYSQL via terminal
- Live Arts Festival & Philly Fringe: in print, online & on the air
- Live Arts Festival’s Kate Watson-Wallace talks Car in PW cover story
- Take the A List Apart Survey for People Who Make Websites
- White Screen of Death [WSOD] on form Submit
- find and delete files in ssh
- Mauckingbird's R&J in the Inquirer
- Girls Rock Camp on MTV
- Classic Towns of Greater Philadelphia
- Philly's New Culture Chief
- First Person Impressions
- Mayor Nutter announces Arts & Culture Office
- split arrays into two for multiple columns
- Placing the contents of a block in any location
- Free your content of PHP: Moving PHP code out of blocks, views and nodes
- How to Call Attention to Yourself
- Ben Franklin & Betsy Ross Wedding
- Delete nodes programatically through Drupal
- Backup/Restore MySQL via SSH if you can't access phpmyadmin
- Drupal user guides
- Clean URLs on IIS
- Why good design matters
- Bloomsday at the Rosenbach today!
- ffmpeg, the flashvideo module and testing locally on Windows
- Browser detection in PHP
- Drupal Meetup at Canary Recap
- Sendak on Sendak on Video
- adding the servername to site5 nameservers
- clean urls on site5 before the domain is active
- Creating email addresses on Site5
- Vote Early, Vote Obama
- Views Theming Wizard output incorrect
- remotely connect to mysql server - Site5
- File permissions
- wait for full page to load (not just the DOM) when resizing elements with jquery
- Emulate word-wrap in Mozilla Firefox
- 500 Internal Server Error upon uploading site to Site5
- Lost Weekend: SXSWi 2008
- MYSQL ERROR: "MySQL server has gone away"
- Day One at SXSW
- SXSW Marathon, or, Will We Really Get to All 30 Panels?
- My loony bun is fine, Benny Lava.
- Dispatches from Google chat: Jon Stewart strikebuster edition.
- The Museum of Baby Heads
- WING TIPS: Canary's Favorite Things - Cool Gifts for the Holidays
- Best Potential Client Inquiry Ever
- White Board: Stinky
- Just a few vacation photos
- machines machines machines... featured on FOX Philadelphia!
- How to talk to the media
- Cold Rock The Auction Block
- Where the Wild Things Are
- Take the Chekhov Lizardbrain Challenge
- I leave for SXSW this week
- Anton Chekhov is Taking Over Philadelphia
- Snow Days
- The Hoohah Monologues
- It's the Arts, stupid
- Little Fat Man Who Sold His Soul
- Wing Tip - Tour the UK
- Image Makeover with Paul Mecurio
- Happy Birthday, Megan!
- PhillyHistory.org on Phawker.com
- Doin' the Wife Swap Rock
- Canary on Breakthruradio
- New Play Festival site online
- Michael Cera - Impossible is the Opposite of Possible
- Canaryist, Part Two
- A John Dorian Christmas, or, You're a Good Man, JD
- December Wing Tips
- Donate to a music community friend
- Media Darling
- Will It Blend?
- I've obviously had hundreds of girlfriends.
- His Dark Materials musings in this week's Philadelphia City Paper
- Paris by night
- Canary Nabs Philadelphia City Paper Choice Award
- Live Arts/Philly Fringe recap, Sept. 9-16
- Live Arts/Philly Fringe recap, Sept. 5-8
- Amnesia Curiosa
- Proper Manners and Haunting Houses
- Still Unknown
- Dark times in trucks and the old west
- Cheerleaders, strippers and puppets, oh my!