LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 08-16-2012, 01:29 AM   #1
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 431
Blog Entries: 32

Rep: Reputation: 3
lame only converts halfway


Hi, I am trying to use lame to convert a wave file to mp3 file:
Code:
root:# /mnt/main/script/mmsconvert.sh
MPlayer SVN-r32634-4.4.4 (C) 2000-2010 MPlayer Team
160 audio & 349 video codecs
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick

Playing /mnt/main/2012.08.05_08.00.02.asf.
ASF file format detected.
[asfheader] Audio stream found, -aid 1
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16002->192000)
Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
==========================================================================
[AO PCM] File: /tmp/tmp.wav (WAVE)
PCM: Samplerate: 48000Hz Channels: Stereo Format s16le
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).
AO: [pcm] 48000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:1687069.0 (468:37:49.0) of 1844674428928.0 (512409563:35:28.0)  0.5% 


Exiting... (End of file)
LAME 3.98.4 32bits (http://www.mp3dev.org/)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Resampling:  input 48 kHz  output 24 kHz
Using polyphase lowpass filter, transition band: 10935 Hz - 11226 Hz
Encoding /tmp/tmp.wav to /mnt/main/stream/young/2012.08.05_08.00.02.mp3
Encoding as 24 kHz j-stereo MPEG-2 Layer III (12x)  64 kbps qval=7
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA 
 86566/147564 (59%)|    1:36/    2:44|    1:43/    2:55|   21.518x|    1:12 
--------------------------------------------24:23------------------------------
   kbps        LR    MS  %     long switch short %
   64.0        0.7  99.3        90.6   5.5   3.9
Writing LAME Tag...done
ReplayGain: -2.6dB
destination file: /mnt/main/stream/young/2012.08.05_08.00.02.mp3
But a one hour file of wave is only converted for 35min~
No errors seem to pop up, I wonder how I can get a full conversion.
Thanks,
Ted
 
Old 08-16-2012, 11:34 AM   #2
sungchoiok
Member
 
Registered: Oct 2010
Posts: 30

Rep: Reputation: 1
Hi,

What is this "mmsconvert.sh"? I would like to see the contents of that.

Also, these line in the debug output caught my eye:
Quote:
Encoding /tmp/tmp.wav to /mnt/main/stream/young/2012.08.05_08.00.02.mp3
[AO PCM] File: /tmp/tmp.wav (WAVE)
Are you sure /tmp/tmp.wav is what you want to convert to the *.mp3 file? (I don't know--it just might be (:

Last edited by sungchoiok; 08-16-2012 at 11:36 AM.
 
1 members found this post helpful.
Old 08-16-2012, 01:43 PM   #3
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 431

Original Poster
Blog Entries: 32

Rep: Reputation: 3
Sorry, I didn't realize I forgot to post the script and stuff:
Code:
LPATH="/mnt/main/media/stream"

for file in "$LPATH/young/"*".asf" ; do
	fname="${file##*/}"
	fname="${fname%.*}"
	asf2mp3 "$file" "$LPATH/young/$fname.mp3"
	#rm -f $file
	if [ -e "$LPATH/young/$fname.mp3" ] ; then
		echo "destination file: $LPATH/young/$fname.mp3"
	fi
done
I am trying to convert stream rips of mms streams to mp3 thru wav midway. asf2mp3 is a function i made and placed in /usr/bin
Code:
# constant variables:
tmp="/tmp/tmp.wav"

if [ "$1" == "-help" ] || [ "$1" == "-h" ] || [ "$1" == "help" ] ; then
	echo "Usage: asf2mp3 <input file> [output file]
-help           		-h	help for this help file
-version			-V	check the version of Asf2Mp3
-required			-r	check for required installs
-verbose			-v	output details (verbose) feature not yet activated
-quiet            		-q	quiet mode feature not yet activated";
elif [ "$1" == "-V" ] || [ "$1" == "-version" ] ; then
	echo "Asf2Mp3 version 1.3.1 All Rights with Ted"
elif [ "$1" == "-r" ] || [ "$1" == "-required" ] ; then
	echo "Required installs are mplayer and lame"
else
	# this script converts asf to mp3 file formats, script requires mplayer and lame to be working simultaneously:
	mplayer "$1" -novideo -vc dummy -ao "pcm:file=$tmp"
	lame -b 64 "$tmp" "$2"
	rm -f "$tmp"
fi
Directory looks like this, (i've moved it to media, and changed the paths in the script respectively):
Code:
ted:$ cd young
vector://mnt/main/media/stream/young
ted:$ ls
2012.08.05_08.00.02.mp3  2012.08.16_00.30.01.mp3  2012.08.17_00.00.01.asf
2012.08.16_00.27.11.mp3  2012.08.16_01.00.01.mp3  2012.08.17_01.00.01.asf
Thanks,
Ted
 
Old 08-16-2012, 03:22 PM   #4
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 431

Original Poster
Blog Entries: 32

Rep: Reputation: 3
Thanks, in the /tmp/ folder, you made me realize I ran out of disk space:
Code:
ted:$ df
Filesystem      1K-blocks      Used  Available Use% Mounted on
/dev/sda1         3842376   3472856     174332  96% /
tmpfs              119296         0     119296   0% /dev/shm
/dev/sda3        72591092   2067016   66836632   3% /mnt/main
//NAS/main     1953512444 241848640 1711663804  13% /mnt/share/NAS/main
How do I clean the files that I deleted?
Thanks,
Ted
 
  


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
Halfway to openvpn dgermann Linux - Networking 24 09-13-2008 05:50 PM
LXer: OggConvert makes Ogg converts (and converts to Oggs) LXer Syndicated Linux News 0 12-22-2007 06:00 AM
A possible lame Multi media lame thread a_c_g_t Fedora 3 08-07-2007 02:59 PM
Installed LAME, command 'lame' works but lame's not in any program directories! ayteebee Linux - Software 8 05-24-2006 05:48 PM
darkice with lame support can't find lame h2gofast Debian 4 03-17-2006 11:20 AM

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

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