LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-22-2014, 02:34 PM   #1
mia_tech
Member
 
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245

Rep: Reputation: 16
trying to convert from flv to mp3


guys, I've downloaded a prebuild version of ffmpeg and I'm using it to convert flv to mp3; however, I'm getting errors
Code:
ffmpeg -vn -sn -i input.flv -acodec libmp3lame law4.mp3
ffmpeg version N-56794-g2e2a2d8 Copyright (c) 2000-2013 the FFmpeg developers
  built on Oct  1 2013 05:31:00 with gcc 4.6 (Debian 4.6.3-1)
  configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32 --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static' --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
  libavutil      52. 46.100 / 52. 46.100
  libavcodec     55. 33.101 / 55. 33.101
  libavformat    55. 18.104 / 55. 18.104
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 88.100 /  3. 88.100
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '48 laws of power by Robert Greene Law 04.flv':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    creation_time   : 2014-01-16 09:38:05
  Duration: 00:04:55.10, start: 0.000000, bitrate: 344 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 854x480, 341 kb/s, 29.97 tbr, 90k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2014-01-16 09:38:05
      handler_name    : VideoHandler
File 'law4.mp3' already exists. Overwrite ? [y/N] y
Output #0, mp3, to 'law4.mp3':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
Output file #0 does not contain any stream
 
Old 02-22-2014, 02:55 PM   #2
paziulek
Member
 
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106

Rep: Reputation: 11
get mediainfo and check the integrity of the flv, and all codecs used.
it seems like the ffmpeg does not recognize any audio stream, it has been compiled without support for the specific codec used in the flv container.
are you able to play the flv via mplayer? if yes, paste the output of

Code:
 mplayer  input.flv  -vo null -endpos 1
if the ffmpeg does not support the audio codec, either
1> get mencoder to demux the flv ( if mplayer works fine )
Code:
mencoder input.flv -of rawaudio -oac mp3lame -ovc copy -o audio.mp3
2> get avidemux via apt-get

3> recompile ffmpeg or mplayer/mencoder with the audio codec support
 
Old 02-22-2014, 05:47 PM   #3
mia_tech
Member
 
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by paziulek View Post
get mediainfo and check the integrity of the flv, and all codecs used.
it seems like the ffmpeg does not recognize any audio stream, it has been compiled without support for the specific codec used in the flv container.
are you able to play the flv via mplayer? if yes, paste the output of

Code:
 mplayer  input.flv  -vo null -endpos 1
if the ffmpeg does not support the audio codec, either
1> get mencoder to demux the flv ( if mplayer works fine )
Code:
mencoder input.flv -of rawaudio -oac mp3lame -ovc copy -o audio.mp3
2> get avidemux via apt-get

3> recompile ffmpeg or mplayer/mencoder with the audio codec support
apparently I don't have the codec for flv audio because mplayer is not playing the files, and like you said, it seems that ffmpeg it has been compiled without audio codec either.... how can I get the audio codec for ffmpeg and mplayer to play flv?

Code:
mplayer  "48 laws of power by Robert Greene Law 04.flv"  -vo null -endpos 1
MPlayer svn r34540 (Ubuntu), built with gcc-4.7 (C) 2000-2012 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing 48 laws of power by Robert Greene Law 04.flv.
libavformat version 53.21.1 (external)
Mismatching header version 53.19.0
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
VIDEO:  [H264]  854x480  24bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
Clip info:
 major_brand: dash
 minor_version: 0
 compatible_brands: iso6avc1mp41
 creation_time: 2014-01-16 09:38:05
Load subtitles in ./
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 53.35.0 (external)
Mismatching header version 53.32.2
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
Movie-Aspect is undefined - no prescaling applied.
VO: [null] 854x480 => 854x480 Planar YV12 
V: 295.1   0/  0 ??% ??% ??,?% 0 0 


Exiting... (End of file)
thanks

Last edited by mia_tech; 02-22-2014 at 05:49 PM.
 
Old 02-22-2014, 07:19 PM   #4
mia_tech
Member
 
Registered: Dec 2007
Location: FL, USA
Distribution: CentOS 5.3, Ubuntu 9.04
Posts: 245

Original Poster
Rep: Reputation: 16
according to my ffmpeg installation it supports Muxing and Demuxing for flv files

Code:
ffmpeg -formats | grep flv
ffmpeg version N-56794-g2e2a2d8 Copyright (c) 2000-2013 the FFmpeg developers
  built on Oct  1 2013 05:31:00 with gcc 4.6 (Debian 4.6.3-1)
  configuration: --prefix=/root/ffmpeg-static/32bit --arch=x86_32 --extra-cflags='-m32 -I/root/ffmpeg-static/32bit/include -static' --extra-ldflags='-m32 -L/root/ffmpeg-static/32bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
  libavutil      52. 46.100 / 52. 46.100
  libavcodec     55. 33.101 / 55. 33.101
  libavformat    55. 18.104 / 55. 18.104
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 88.100 /  3. 88.100
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
 DE flv             FLV (Flash Video)
 
Old 02-23-2014, 01:05 AM   #5
paziulek
Member
 
Registered: Mar 2009
Location: N.C.
Distribution: "gentoo|debian|arch"
Posts: 106

Rep: Reputation: 11
post the output of 'mediainfo' utility

and

get the mplayer source:
http://www.mplayerhq.hu/MPlayer/rele...apshot.tar.bz2

now, you might need to install 'git' ( if you do not have it already ) - it will pull ffmpeg source ( mplayer dependency )

once the snapshot extracted, enter the source directory and run:
# ./configure
# make clean
# make
# make install
the new mplayer will be installed in '/usr/local/bin/mplayer' so in order to ececute the new version you will need to enter the full path, or use uninstall mplayer via apt-get or aptitude...
also, there is a few of other codec packages, that do not come with mplayer:

faad - freeware Advanced Audio Decoder player
faad2-dbg - freeware Advanced Audio Decoder - debugging symbols
libfaad-dev - freeware Advanced Audio Decoder - development files
libfaad2 - freeware Advanced Audio Decoder - runtime files

libvorbis-dev - The Vorbis General Audio Compression Codec (development files)
libvorbis0a - The Vorbis General Audio Compression Codec (Decoder library)
libvorbisenc2 - The Vorbis General Audio Compression Codec (Encoder library)
libvorbisfile3 - The Vorbis General Audio Compression Codec (High Level API)

so if you still unable to use mplayer after recompiling, get these packages, re-run ./configure, and repeat all make steps...

being able to process a 'flv' container does not mean it will be able to play all the a/v content... you still need a player that has access to the codecs ( either internal via libavcodec or external ones used during the compilation process, or shared libraries )...
without knowing what type of codec is being used in the flv, it is sometimes not easy to guess... sometimes codecs used in a container are closed source/proprietary, mediainfo should be able to give you/us some idea...

Last edited by paziulek; 02-23-2014 at 01:09 AM.
 
Old 03-05-2014, 01:10 AM   #6
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Your file has no audio stream...
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert flv to mp3? rokitscintist Linux - Newbie 24 12-25-2014 08:01 PM
How to convert flv files? fireblade_spark Linux - Software 14 05-25-2013 02:22 AM
How to convert flv to ipod format? depam Linux - Software 1 10-25-2006 08:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:31 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