LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 02-13-2016, 09:53 PM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Extract audio from mp4


Trying to extract audio from mp4.

It does not play.

Does mplayer not work on all mp4s ?

Quote:
# mplayer -dumpaudio -dumpfile RhinestoneCowboy.mp3 Rhinestone_Cowboy.mp4
MPlayer 1.1-4.8.2 (C) 2000-2012 MPlayer Team

Playing Rhinestone_Cowboy.mp4.
libavformat version 54.6.100 (internal)
libavformat file format detected.
[lavf] stream 0: video (vp8), -vid 0
[lavf] stream 1: audio (vorbis), -aid 0
VIDEO: [VP80] 640x360 0bpp 1000.000 fps 0.0 kbps ( 0.0 kbyte/s)
dump: 3151167 bytes written to 'RhinestoneCowboy.mp3'.
Core dumped

Exiting... (End of file)
 
Old 02-14-2016, 12:35 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
To extract audio in mp3 format from a video mp4:
Code:
ffmpeg -i yourvideofile.flv -acodec copy youraudiofile.mp3
You need to install ffmpeg first.
Mplayer plays audio and video, if your doesn't something is wrong with either the file or the configuration.

Hope that helps. Goodluck.
 
Old 02-14-2016, 02:41 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,945

Rep: Reputation: 7324Reputation: 7324Reputation: 7324Reputation: 7324Reputation: 7324Reputation: 7324Reputation: 7324Reputation: 7324Reputation: 7324Reputation: 7324Reputation: 7324
core dumped means something went wrong. So I do not expect usable result.
From the other hand you may try to use the tool Super (which works on windows, and it has a gui to select/click what you want.)
 
Old 02-14-2016, 07:13 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
I think core dumped is a mplayer joke. Source has vorbis audio, giving it mp3 extension won't do much good.
 
Old 02-14-2016, 07:16 AM   #5
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
ffmpeg does not work either.

Quote:
# ffmpeg -i Rhinestone_Cowboy.mp4 -acodec copy Rhinestone.mp3
ffmpeg version 2.2.16 Copyright (c) 2000-2015 the FFmpeg developers
built on Oct 8 2015 14:32:29 with gcc 4.8.2 (GCC)
configuration: --prefix=/usr --libdir=/usr/lib --enable-libmp3lame --enable-libx264 --enable-libfaac --enable-pthreads --enable-small --enable-postproc --enable-libvorbis --enable-gpl --enable-shared --enable-nonfree --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-debug --enable-bzlib --enable-zlib --enable-libspeex --enable-version3 --enable-runtime-cpudetect --enable-x11grab --enable-libschroedinger --enable-libtheora --enable-libxvid --enable-swscale --enable-libvpx
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, matroska,webm, from 'Rhinestone_Cowboy.mp4':
Metadata:
encoder : Google
Duration: 00:03:26.76, start: 0.000000, bitrate: 705 kb/s
Stream #0:0: Video: vp8, yuv420p, 640x360, SAR 1:1 DAR 16:9, 1k fps, 29.97 tbr, 1k tbn, 1k tbc (default)
Stream #0:1: Audio: vorbis, 44100 Hz, stereo, fltp (default)
[mp3 @ 0x975a500] Invalid audio stream. Exactly one MP3 audio stream is required.
Output #0, mp3, to 'Rhinestone.mp3':
Metadata:
encoder : Lavf55.33.100
Stream #0:0: Audio: vorbis, 44100 Hz, stereo (default)
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Conversion failed!
 
Old 02-14-2016, 08:02 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Install mediainfo and give us 'mediainfo Rhinestone_Cowboy.mp4;' output?
 
Old 02-14-2016, 09:24 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
OP is interested in audio, both mplayer and ffmpeg tell us it is vorbis, it needs to be recoded if OP wants mp3. What is the output of
Code:
file RhinestoneCowboy.mp3
(The RhinestoneCowboy.mp3 from initial post.)
 
Old 02-14-2016, 08:40 PM   #8
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
file output.

Quote:
# file RhinestoneCowboy.mp3
RhinestoneCowboy.mp3: data
 
Old 02-14-2016, 08:46 PM   #9
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Quote:
Originally Posted by unSpawn View Post
Install mediainfo and give us 'mediainfo Rhinestone_Cowboy.mp4;' output?
I can't find a mediainfo package for Slacko.
 
Old 02-16-2016, 07:55 PM   #10
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
I had to go to Windows to do the conversion.

http://www.mp4-mp3.org/mp4-to-mp3.html
 
Old 02-16-2016, 08:13 PM   #11
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
That's crazy. Please do me a favor, I'm curious now. Please download this file and run file utility on it. What does it tell?

Code:
file 01.mp3
 
Old 02-16-2016, 08:21 PM   #12
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
Here is the output.

Quote:
01.mp3: Ogg data, Vorbis audio, stereo, 44100 Hz, ~128000 bps, created by: Xiph.Org libVorbis I (1.1.0 RC1)
audacity-2.1-slacko_5.6.sfs: Squashfs filesystem, little endian, version 4.0, 30452682 bytes, 250 inodes, blocksize: 131072 bytes, created: Sun Dec 28 03:42:33
 
Old 02-16-2016, 08:26 PM   #13
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Beats me. Your command was correct with one minor discrepancy - the extension should have been ogg, not mp3.
Code:
mplayer -dumpaudio -dumpfile RhinestoneCowboy.ogg Rhinestone_Cowboy.mp4
 
Old 02-16-2016, 09:24 PM   #14
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Original Poster
Rep: Reputation: 169Reputation: 169
According to here, it can extract mp3s too.

http://www.cyberciti.biz/faq/linux-u...online-stream/
 
Old 02-16-2016, 09:46 PM   #15
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Yes it can extract mp3, but if the source is vorbis then to get mp3 you need not only to extract but also convert, mplayer -dumpaudio extracts only. So your output was supposed to be an ogg file, not sure how mplayer managed to screw it up because of incorrect extension you gave to it, generally Linux applications do not care about extensions, maybe mplayer is an exception.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
mp4 files - video but no audio Cammigirl Linux - Software 9 05-25-2016 01:42 AM
[SOLVED] Best way to extract AAC from mp4 losslessly KickMeElmo Linux - Software 10 03-22-2014 12:10 PM
mp4 audio issues in Mandriva using MPlayer ixhabbaba Linux - Software 4 09-14-2008 02:54 AM
MP4 with Xine.. I have video but no audio darkone66669 Linux - Software 1 03-04-2008 05:37 AM
Audio in mp4 format: your experiences with FAAC hansalfredche Linux - Software 0 01-28-2008 04:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy

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