Puppy This forum is for the discussion of Puppy Linux.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
02-13-2016, 09:53 PM
#1
Senior Member
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374
Rep:
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)
02-14-2016, 12:35 AM
#2
Senior Member
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669
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.
02-14-2016, 02:41 AM
#3
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,945
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.)
02-14-2016, 07:13 AM
#4
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661
Rep:
I think core dumped is a mplayer joke. Source has vorbis audio, giving it mp3 extension won't do much good.
02-14-2016, 07:16 AM
#5
Senior Member
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374
Original Poster
Rep:
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!
02-14-2016, 08:02 AM
#6
Moderator
Registered: May 2001
Posts: 29,415
Install mediainfo and give us 'mediainfo Rhinestone_Cowboy.mp4;' output?
02-14-2016, 09:24 AM
#7
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661
Rep:
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.)
02-14-2016, 08:40 PM
#8
Senior Member
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374
Original Poster
Rep:
file output.
Quote:
# file RhinestoneCowboy.mp3
RhinestoneCowboy.mp3: data
02-14-2016, 08:46 PM
#9
Senior Member
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374
Original Poster
Rep:
Quote:
Originally Posted by
unSpawn
Install mediainfo and give us 'mediainfo Rhinestone_Cowboy.mp4;' output?
I can't find a mediainfo package for Slacko.
02-16-2016, 07:55 PM
#10
Senior Member
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374
Original Poster
Rep:
I had to go to Windows to do the conversion.
http://www.mp4-mp3.org/mp4-to-mp3.html
02-16-2016, 08:13 PM
#11
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661
Rep:
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?
02-16-2016, 08:21 PM
#12
Senior Member
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374
Original Poster
Rep:
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
02-16-2016, 08:26 PM
#13
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661
Rep:
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
02-16-2016, 09:24 PM
#14
Senior Member
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374
Original Poster
Rep:
02-16-2016, 09:46 PM
#15
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661
Rep:
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.
All times are GMT -5. The time now is 11:10 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News