LinuxQuestions.org
Help answer threads with 0 replies.
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 11-06-2010, 02:00 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
mp4 to flv using ffmpeg on Ubuntu server 10.04


I am doing a conversion of mp4 to flv on a GUI less server where I have only SSH access.( I tried winff and X forwarding that had hanged while doing this conversion so winff is not possible for me)

I do not have any idea of the
codecs,bitrate of this mp4 video.
Some one had converted from an m4v to mp4 and then uploaded this on the server.

When I tried converting on command line
as follows

Code:
ffmpeg -i stats_estimation.mp4 out.flv
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Mar  4 2010 12:41:55, gcc: 4.4.3

Seems stream 0 codec frame rate differs from container frame rate: 29.94 (5000/167) -> 44.92 (539/12)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'stats_estimation.mp4':
  Duration: 02:47:05.56, start: 0.000000, bitrate: 237 kb/s
    Stream #0.0(eng): Video: h264, yuv420p, 320x240, 44.92 tbr, 14.97 tbn, 29.94 tbc
    Stream #0.1(eng): Audio: aac, 32000 Hz, stereo, s16
Output #0, flv, to 'out.flv':
    Stream #0.0(eng): Video: flv, yuv420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 44.92 tbc
    Stream #0.1(eng): Audio: adpcm_swf, 32000 Hz, stereo, s16, 64 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
[adpcm_swf @ 0xa4ef60]Sample rate must be 11025, 22050 or 44100
Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
I have above error.
I checked this page
http://www.ffmpeg.org/ffmpeg-doc.html
but I could not understand much.
Can some one help to figure out what should I be doing to get this video to flv in this case?
The OS is Ubuntu 10.04 64 bit server edition and
aptitude install winff
was what I had used to get ffmpeg or any thing else.
 
Old 11-06-2010, 10:24 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
What you need to know is in the last two lines of the output.
Code:
[adpcm_swf @ 0xa4ef60]Sample rate must be 11025, 22050 or 44100
Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
The sample rate of the input file audio, 32000Hz, is not an accepted value for swf audio. You need to resample it. Try adding -ar 44100, or one of the other values listed, to the command.
 
1 members found this post helpful.
Old 11-08-2010, 04:51 AM   #3
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
This did not gave me error but what happened at the end is I lost the sound completely the video came.



Code:
ffmpeg -i stats_estimation.mp4 -ar 22050 -acodec libmp3lame -ab 32K -r 25 -vcodec flv out.flv
again gave me error
http://pastebin.com/enKdM9u
Code:
Unknown encoder 'libmp3lame'
So I did
Code:
sudo aptitude install libmp3lame
 libmp3lame0
Which happened successfully then I tried
again
Quote:
ffmpeg -i stats_estimation.mp4 -ar 22050 -acodec libmp3lame -ab 32K -r 25 -vcodec flv out.flv
.
.
.
Unknown encoder 'libmp3lame'
The same error.

Last edited by tkmsr; 11-08-2010 at 07:44 AM.
 
Old 11-08-2010, 08:02 AM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Your version of ffmpeg doesn't have liblame support enabled. If it were, there'd be an entry saying --enable-libmp3lame in the configuration line. I'm going to guess you're using your distro's default version, which won't have anything included that's encumbered by patents or other intellectual property restrictions.

You can get a fully-enabled version for Debian from the debian-multimedia repositories, and from Medibuntu for the Ubuntu family. I'm not sure about other distros.
 
  


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] no thumbnail for flv file though present for mpg,avi & mp4 files sumeet inani Ubuntu 7 05-07-2010 04:53 AM
[SOLVED] Convert flv to dvd w/ ffmpeg agrestic Linux - General 6 10-18-2009 11:05 PM
ffmpeg ogg to flv conversion inquisitiveme Linux - Newbie 1 03-10-2009 02:52 PM
Trying to convert from flv to mp4 (for iPod) using mencoder. alkos333 Slackware 6 11-03-2007 02:36 PM
how do i convert wmv to flv using ffmpeg? farmerjoe Linux - Software 0 11-15-2005 02:20 PM

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

All times are GMT -5. The time now is 12:07 PM.

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