(858) 586 7777 | About | Testimonials | Contact
vteams vteams vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
vteams vteams
  • How does it work?
    • Startup Process
    • Your First Day
  • Technologies
    • Hire PHP Developer
    • Hire App Developer
    • Hire JavaScript Developer
    • Hire ROR Developer
    • Hire IOS Developer
    • Hire .NET Developer
    • Hire AI Developer
    • Hire Robotics Engineer
  • Sample Budgets
  • Meet The Team
  • Experiments
  • Captain’s Log
  • Blog
Blog
  1. vteams
  2. Blog
  3. How To Create Dynamic MP4 Video Cards From Animated SWF Files
Jul 09

How To Create Dynamic MP4 Video Cards From Animated SWF Files

  • July 9, 2015

Greeting your users with specially designed video cards can strengthen the levels of loyalty they have with you. Designing a video card demands serious dedication and approach that would be ideal in terms of appealing to all the target users.You need to keep a good account for all the aesthetics as well as the technicalities involved in this process to make it the very best. Creating a video card specially in mp4 format from animated SWF files is a challenging task. Our Client need was to send mp4 video greeting cards to his users. This will be a user centric application where user will provide the text and images that will be shown in the mp4 video.

We provided him a solution that if he build his animations in SWF format with variables, then we can automate the whole process. The challenge came up to convert SWF files to mp4 videos along with the integrated dynamic variables.

We did research and came up with a partially unknown tool GNU Gnash. Its a SWF Player for Linux environments. This player also have support of passing dynamic variables. Gnash came up with a tool called dump-gnash which actually parse and save raw video and audio streams separately. We used the following command to create video and audio files:

1
dump-gnash -1 -D output_video.raw@30 -A output_audio.wav -P "FlashVars=title=Some Title" swf_file_with_variables.swf

Now we have two files called output_video.raw which is a raw video file, @30 convention is used to tell Gnash to use 30 frames per second. Other file we have output_audio.wav which is raw audio file.

Now we need to merge both audio and video files together to make mp4 file. For this, we have most popular ffmpeg. We used the following command to merge audio and video files:

1
ffmpeg -i output_audio.wav -f rawvideo -pix_fmt rgb32 -s:v 550x400 -r 30 -i output_video.raw -c:v libx264 -r 30 -b 160k -strict -2 output_video.mp4

Challenging part to merge both was using raw video format with ffmpeg. Our research leaded us to -strict -2 option which actually helps to use a raw video format.

  • Facebook
  • Twitter
  • Tumblr
  • Pinterest
  • Google+
  • LinkedIn
  • E-Mail

Comments are closed.

SEARCH BLOG

Categories

  • Blog (490)
  • Captain's Log (1)
  • Closure Reports (45)
  • Experiments (7)
  • How-To (56)
  • Implementation Notes (148)
  • Learn More (156)
  • LMS (8)
  • Look Inside (10)
  • Operations Log (12)
  • Programmer Notes (20)
  • R&D (14)
  • Rescue Log (4)
  • Testimonials (25)
  • Uncategorized (4)

RECENT STORIES

  • GitHub Actions- Automate your software workflows with excellence
  • Yii Framework – Accomplish Repetitive & Iterative Projects with Ease
  • A Recipe for CRM Software Development
  • Are Agile and DevOps the same?
  • The Data Scientist’s Toolset

ARCHIVES

In Short

With the vteams model, you bypass the middleman and hire your own offshore engineers - they work exclusively for you. You pay a reasonable monthly wage and get the job done without hassles, re-negotiations, feature counts or budget overruns.

Goals for 2020

  • Open development center in Australia
  • Complete and Launch the Robot
  • Structural changes to better address Clients' needs

Contact Us

Address: NEXTWERK INC.
6790 Embarcadero Ln, Ste 100,
Carlsbad, CA 92011, USA

Tel: (858) 586 7777
Email: fahad@nextwerk.com
Web: www.vteams.com

© 2020 vteams. All Rights Reserved.

Content Protection by DMCA.com