LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-26-2009, 12:23 AM   #1
yonix
LQ Newbie
 
Registered: Jan 2009
Distribution: Debian/Gentoo
Posts: 11

Rep: Reputation: 1
mp3 to swf conversion


Hi,

I'm looking for a tool that can directly convert mp3 file to a swf file.
Tried ffmprg - 'ffmpeg -i master.mp3 -ar 22050 -ab 32 -f swf -y -vn new.swf', output is as follows:

Output #0, swf, to 'new.swf':
Stream #0.0: Audio: 0x0000, 22050 Hz, stereo, 0 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Unsupported codec for output stream #0.0

I found a way to perform this task using ffmpeg to convert the mp3 file to a wav file, and converting the wav into a swf file using swftools (wav2swf), although this is not a good option because the output swf file size is very big - for a 12mb input 320kbps stereo mp3 file, the swf file is 25mb.

Also downloaded a free direct mp3 to swf conversion software, which had an output swf file - with the same 12mb mp3 file - of ~400kb.

The requirements I have from the tool are:
1. Can be ran from the shell.
2. Direct conversion, or an indirect one that will produce a small output swf file.
3. Suport for multiple file conversion is a plus.

Thanks for your help,
YoniX.
 
Old 01-26-2009, 12:54 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,848

Rep: Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012Reputation: 2012
Your ffmpeg command works fine for me. Note that you must have a version of ffmpeg that can handle swf. The ones provided by many distros don't include the full range of codecs ffmpeg can support because of patent issues, etc. Run "ffmpeg -formats" to see what yours supports. If it doesn't have what you need, then you'll have to find a version that does, or compile your own.

Note also that .swf itself is just a container format, and the audio track embedded in it is still .mp3 (although reduced in bitrate and samplerate, from your command), so ffmpeg needs to have liblame support as well.

Finally, the bitrate syntax has changed for ffmpeg. It's now specified in bits-per-second, so you need to change it to "-ab 32k" to get the bitrate you want.
 
Old 06-29-2009, 03:42 AM   #3
yonix
LQ Newbie
 
Registered: Jan 2009
Distribution: Debian/Gentoo
Posts: 11

Original Poster
Rep: Reputation: 1
Thanks David for the quick reply and the help. You are correct, the packaged ffmpeg version is compiled without the swf support.

Compiling ffmpeg from source with the '--enable-decoder=adpcm_swf --enable-encoder=adpcm_swf' switches did the work for me.
 
Old 06-29-2009, 04:24 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
Are you sure you don't mean .flv instead of .swf ?
 
Old 06-29-2009, 07:39 AM   #5
yonix
LQ Newbie
 
Registered: Jan 2009
Distribution: Debian/Gentoo
Posts: 11

Original Poster
Rep: Reputation: 1
I ment swf, you can say it works also for flv, or flv in a swf container.
 
Old 06-29-2009, 07:53 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
Well try making an flv, then use a swf player ... that should work. I personally have never seen an swf audio file.
 
Old 06-29-2009, 08:16 AM   #7
yonix
LQ Newbie
 
Registered: Jan 2009
Distribution: Debian/Gentoo
Posts: 11

Original Poster
Rep: Reputation: 1
It has more sense using flv file, but I have a special reason (more like a demand) for using swf instead.

Thanks for the correct advice.

Last edited by yonix; 06-29-2009 at 08:18 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mp3 to swf conversion yonix Debian 3 06-29-2009 03:45 AM
need ffmpeg mp3 conversion help yajur Programming 18 07-20-2008 05:47 AM
.mp3 to .3gp conversion whitey4900 Linux - Software 1 05-28-2008 03:24 PM
CD > MP3 conversion General Linux - Software 4 04-30-2006 01:32 AM
mpc to mp3 conversion linmix Linux - Software 5 03-18-2005 04:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration