I've tried all sorts of parameters with ffmpeg to make this work, but they all result in a staticy audio file as a result.
some of what i've tried are:
ffmpeg -i file.wma file.wav
ffmpeg -sameq -i file.wma file.wav
ffmpeg -i file.wma -ar 44100 -ac 1 -ab 64000 file.wav
ffmpeg -i file.wma -vn 64000 file.wav
Here's a link to the audio file:
(Removed broken link)
It is working with ffmpeg -i Untitled.wma Untitled.wav for me, using ffmpeg from the Ubuntu repositories.
Version output:
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.2, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.1-1ubuntu1.2 --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 Sep 16 2011 17:04:18, gcc: 4.4.3
FFmpeg SVN-r0.5.1-4:0.5.1-1ubuntu1.2
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
Maybe it helps.
Use Mplayer to convert wma to wav
mplayer -ao pcm:file-name-in-wav.wav file-name-in-wma.wma
or
Use FFMpeg
ffmpeg -i myfile.wma myfile.wav
Related
Every time I run this script it doesn't work. I get the output bash: command not found
I ran bash -x to see what was the problem but I don't understand the errors
bash -x mp3towav.sh
+ for f in '*.mp3'
+ ffmpeg -i '' -acodec pcm_s16le -ac 1 -ar .wav
ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Trailing options were found on the commandline.
: No such file or directory
script is this
1 #!/bin/bash
2 for f in *.mp3; do ffmpeg -i "$file" -acodec pcm_s16le -ac 1 -ar "${file%.mp3}".wav;done
when running the corrected code provided I still get an error of:
ffmpeg version 3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Trailing options were found on the commandline.
Input #0, mp3, from 'hiraeth [ep].mp3':
Duration: 00:23:39.36, start: 0.025057, bitrate: 128 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 128 kb/s
Metadata:
encoder : LAME3.99r
Side data:
replaygain: track gain - -4.100000, track peak - unknown, album gain - unknown, album peak - unknown,
At least one output file must be specified
The solution is of course in the comment by codeforester:
#!/bin/bash
for file in *.mp3; do
ffmpeg -i "$file" -acodec pcm_s16le -ac 1 -ar 44100 "${file%.mp3}".wav
done
(added 44100 per comment LordNeckbeard)
Some hints:
1) if you split your script over multiple lines, it becomes easier to spot errors like this.
2) Don't focus too much on the errors when running bash -x; it gives the on the output the commands. That what it is for. In this case:
+ ffmpeg -i '' -acodec pcm_s16le -ac 1 -ar .wav
The conclusion from this line is that ffmpeg is run with '' as input file and .wav as output.
I have a custom heroku buildpack that is installing ffmpeg, libvorbis, etc.
When I run ffmpeg I get the following output:
FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.3 --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 Jan 24 2013 19:42:59, gcc: 4.4.3
At least one output file must be specified
I'm trying to convert mp4 audio to webm audio.
Here is the command I am using:
~/public/audio $ ffmpeg -i sample.mp3 sample.webm
And the output:
FFmpeg version SVN-r0.5.9-4:0.5.9-0ubuntu0.10.04.3, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --extra-version=4:0.5.9-0ubuntu0.10.04.3 --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 Jan 24 2013 19:42:59, gcc: 4.4.3
Input #0, mp3, from 'sample.mp3':
Duration: 00:00:01.56, start: 0.000000, bitrate: 76 kb/s
Stream #0.0: Audio: mp3, 24000 Hz, stereo, s16, 64 kb/s
Unable to find a suitable output format for 'sample.webm'
This works fine on my OSX install, but on Ubuntu 14.04 I'm getting these errors.
What do I need to do so .webm files can be the destination?
When i run this command i get an error. If i run without the pipe, it works.
With Pipe
cat mymovie.m4v | ffmpeg -i pipe:0 -an -analyzeduration 1000000 -f image2 -vf
"select='eq(pict_type,PICT_TYPE_I)'" -vsync vfr 'public/files/thumb%04d.png'
Without Pipe (Works)
ffmpeg -i mymovie.m4v -an -analyzeduration 2147483647 -probesize 2147483647 -f image2 -vf
"select='eq(pict_type,PICT_TYPE_I)'" -vsync vfr 'public/files/thumb%04d.png'
Output
ffmpeg version 2.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Apr 10 2014 17:50:46 with Apple LLVM version 5.1 (clang-503.0.38)
(based on LLVM 3.4svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2
--enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree
--enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang
--host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame
--enable-libxvid --enable-libfreetype --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-librtmp --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-libvo-aacenc --enable-libass --enable-ffplay --enable-libspeex
--enable-libschroedinger --enable-libfdk-aac --enable-libopus --enable-frei0r
--enable-libopenjpeg --extra-cflags='-
I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 '
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
libavresample 1. 2. 0 / 1. 2. 0
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7fd87b80f000] stream 0, offset 0x2c: partial file
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7fd87b80f000] Could not find codec parameters for stream 0
(Video: h264 (avc1 / 0x31637661), 1280x720, 3310 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
pipe:0: could not find codec parameters
I have tried setting (link)
-analyzeduration100 -probesize 10000000
-analyzeduration 2147483647 -probesize 2147483647
Still didn't work.
MP4 container is not the best choice for piping. The muxer that made the MP4 file may place certain info at the end of the file. This info is required for proper demuxing, but is not immediately available if using a pipe. However, you have a few options:
Don't use a pipe
I don't know why you need to use a pipe in the first place. Just use the file as a normal input:
ffmpeg -i input.mp4 ...
Don't use MP4
If you must use a pipe then consider using some other container such as .mkv or .ts for your input.
Re-mux your MP4 then pipe
If you must use MP4 then one method is to re-arrange the moov atom so it is at the beginning of the file:
ffmpeg -i input.mp4 -c copy -movflags +faststart output.mp4
I have a simple http server for incoming MPEG stream and I'm trying to stream video from another machine on the same network. It works using ffmpeg like this
ffmpeg -f video4linux2 -i /dev/video0 -f mpeg1video http://myaddress.com:port
But from one specific computer ffmpeg refuses to stream and I can't find out why. All I can get is this output:
ffmpeg version 0.7.8, Copyright (c) 2000-2011 the FFmpeg developers
built on Sep 16 2012 09:30:22 with gcc 4.5.3
configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib
--mandir=/usr/share/man --enable-shared --cc=i686-pc-linux-gnu-gcc
--disable-static --enable-gpl --enable-postproc --enable-avfilter
--disable-stripping --disable-debug --disable-doc --disable-network
--disable-vaapi --disable-ffplay --disable-vdpau --disable-indev=v4l
--disable-indev=oss --disable-indev=jack --disable-outdev=oss
--disable-altivec --disable-avx --cpu=atom --enable-hardcoded-tables
libavutil 50. 43. 0 / 50. 43. 0
libavcodec 52.123. 0 / 52.123. 0
libavformat 52.111. 0 / 52.111. 0
libavdevice 52. 5. 0 / 52. 5. 0
libavfilter 1. 80. 0 / 1. 80. 0
libswscale 0. 14. 1 / 0. 14. 1
libpostproc 51. 2. 0 / 51. 2. 0
Your ffmpeg build is compiled with --disable-network which I assume is the problem.
I am trying to encode my video using ffmpeg. I have taken output of each frame as a separate image and then I'm joining them into a video using ffmpeg. I compiled ffmpeg from source.
This is the command I used and the errors I keep running into!
---:/media/New Volume/temp$ ffmpeg -f image2 -i image%1d.png -vcodec libx264 \
-preset ultrafast -crf 15 output.mp4
ffmpeg version git-2012-03-24-2571506 Copyright (c) 2000-2012 the FFmpeg developers
built on Mar 24 2012 03:47:02 with gcc 4.6.1
configuration: --enable-gpl --enable-libfaac --enable-libmp3lame \
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora \
--enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3 \
--enable-x11grab
libavutil 51. 44.100 / 51. 44.100
libavcodec 54. 12.100 / 54. 12.100
libavformat 54. 2.100 / 54. 2.100
libavdevice 53. 4.100 / 53. 4.100
libavfilter 2. 65.102 / 2. 65.102
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 7.100 / 0. 7.100
libpostproc 52. 0.100 / 52. 0.100
// ERORRS::
[png # 0xa4d5120] Missing png signature
[image2 # 0xa4ceb00] decoding for stream 0 failed
[image2 # 0xa4ceb00] Could not find codec parameters (Video: png)
image%1d.png: could not find codec parameters
It's having an error reading your image frames.
Do they open correctly with other software? Are they named image1.png, image2.png, etc.?