I'm writing a python GUI for ffmpeg. When calling ffmpeg via subprocess it runs fine as long as the command is like
subprocess.Popen([ffmpeg_converter,
'-i',file,
target_file
])
But when I do the same call with ffmpeg arguments it fails with
"At least one output file must be specified":
option_string = '-q:a 4'
subprocess.Popen([ffmpeg_converter,
'-i',file,
option_string,
target_file
])
It even recognizes the options but does not see the target file. I even replaced the actual target file with someting simple like "test.mp3" but still the same error. Any ideas? (I'm on windows with python 3.3.)
The complete console output is:
ffmpeg version N-57781-g0610d6e Copyright (c) 2000-2013 the FFmpeg developers
built on Nov 1 2013 18:01:35 with gcc 4.8.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 49.100 / 52. 49.100
libavcodec 55. 40.101 / 55. 40.101
libavformat 55. 20.105 / 55. 20.105
libavdevice 55. 5.100 / 55. 5.100
libavfilter 3. 90.100 / 3. 90.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Trailing options were found on the commandline.
Input #0, flac, from 'c:\script\python\testdata\source\01. Es geht los.flac':
Metadata:
ARTIST : Olivia Trummer Trio
TITLE : Es geht los
ALBUM : Westwind
DATE : 2008
track : 01
GENRE : Jazz
COMMENT : EAC FLAC -8
Duration: 00:06:27.25, bitrate: 834 kb/s
Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
At least one output file must be specified
I think you need to pass -q:a 4 as separate values -q:a, 4.
Try this:
subprocess.Popen([ffmpeg_converter,
'-i',file,
'-q:a', '4'
target_file
])
You are passing your option string as one argument instead of two.
Related
I use MediaRecorder to record the audio from the browser and then upload it to my server (ARM-based Linux machine - AWS Lambda Function, if it matters). Based on the browser type, I get either an MP4 file (for the Safari browser) OR a WEBM file (for every other browser) from the MediaRecorder. The audio is converted to Base64 string and posted to my server with FFMPEG.
MediaRecorder implementation
const audioStream = await navigator.mediaDevices.getUserMedia(mediaConstraints);
const MediaRecorder = window['MediaRecorder'];
const mimeType = MediaRecorder.isTypeSupported('audio/webm') ? 'audio/webm' : 'audio/mp4';
const recordingFileExtension = MediaRecorder.isTypeSupported('audio/webm') ? 'webm' : 'mp4';
mediaRecorder = new MediaRecorder(audioStream, { mimeType });
mediaRecorder.ondataavailable = convertBlobAndUploadChunk;
mediaRecorder.start(30 * 1000); // timeslice needs to be in ms
// When user stops recording
mediaRecorder.stop();
audioStream.getTracks().forEach( t => { t.stop(); });
// To convert the audio blob to string
function convertBlobToBase64(blob) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(blob);
reader.onload = () => {
const tmpStr = reader.result.toString();
resolve(tmpStr.substring(tmpStr.indexOf('base64,') + 7));
};
reader.onerror = error => reject(error);
});
}
let blobCount = 0;
async function convertBlobAndUploadChunk(blobEvent) {
if (!blobEvent.data || blobEvent.data.size === 0) return;
blobCount++;
const recordData = JSON.stringify({
M: {
blobCount,
//some other meta data
},
D: await convertBlobToBase64(audioBlob),
});
await angularHttpClient.post(apiUrl, recordData, new HttpHeaders({
'Content-Type': 'application/json',
'x-api-key': apiKey,
})).toPromise();
}
On my server, I convert the WEBM/MP4 file to an MP3 file for better cross-browser compatibility and to enable scrubbing.
Backend Lambda Implementation
const FFMpegCommand = require('fluent-ffmpeg'); // v2.1.2
new FFMpegCommand()
.input(originalFile)
.on('end', (error, stdOut, stdError) => {
if (error) {
console.error(error);
}
})
.save(convertedFile);
This works perfectly fine 99.9% of the time but FFMPEG throws one of the following errors for 0.1% of the time:
Error 1: Invalid data found when processing input
error reading header
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the
FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7232f40] could not find corresponding trex (id 1)
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7232f40] could not find corresponding track id 0
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7232f40] trun track id unknown, no tfhd was found
[mov,mp4,m4a,3gp,3g2,mj2 # 0x7232f40] error reading header
/tmp/long-filename-of-140chars-to-keep-files-unique.mp4: Invalid data found when processing input
EBML Header parsing failed
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[matroska,webm # 0x7595f40] Format matroska,webm detected only with low score of 1, misdetection possible!
[matroska,webm # 0x7595f40] EBML header parsing failed
/tmp/long-filename-of-140chars-to-keep-files-unique.webm: Invalid data found when processing input
No specific details
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
/tmp/long-filename-of-140chars-to-keep-files-unique.webm: Invalid data found when processing input
Error 2: Output file #0 does not contain any stream
ffmpeg version 4.4-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8 (Debian 8.3.0-6)
configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-libgme --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libdav1d --enable-libxvid --enable-libzvbi --enable-libzimg
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
[mpegts # 0x5d19f40] Format mpegts detected only with low score of 2, misdetection possible!
[mpegts # 0x5d19f40] Could not detect TS packet size, defaulting to non-FEC/DVHS
Input #0, mpegts, from '/tmp/long-filename-of-140chars-to-keep-files-unique.webm':
Duration: N/A, bitrate: N/A
Output #0, mp3, to '/tmp/long-filename-of-140chars-to-keep-files-unique.mp3':
Output file #0 does not contain any stream
Thanks for reading, any help/suggestion is highly appreciated.
It's a little tricky to debug this without more code but I think Brad is on to something, sounds like the data isn't complete or mangled.
If it is corrupted data being ingested then you might want to consider putting something before the conversion to ensure that it is valid.
As a proof of concept I created this Dockerfile:
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y ffmpeg
COPY valid.sh /valid.sh
RUN chmod 755 valid.sh
ENTRYPOINT [ "/valid.sh" ]
and created a file called valid.sh:
#!/bin/bash
export INPUT_FILE
export OUTPUT_FILE
echo Looking for ${INPUT_FILE} exporting to $OUTPUT_FILE
/usr/bin/ffmpeg -v error -i /input/${INPUT_FILE} -f null - 2>errors.log
if [[ $(cat errors.log) ]]; then
echo "Errors found! Source video isn't valid."
exit 1
fi
/usr/bin/ffmpeg -i /input/${INPUT_FILE} -vn -ab 128k -ar 44100 -y /output/${OUTPUT_FILE};
To run it:
docker build -t test ./
docker run -it --env INPUT_FILE=broken.webm --env OUTPUT_FILE=test123.mp3 --rm --name test -v C:/Users/me/Desktop/example:/input -v C:/Users/me/Desktop/output:/output test:latest
If the webm file is invalid it returns:
Looking for broken.webm exporting to test123.mp3
Errors found! Source video isn't valid.`
... otherwise:
Looking for working.webm exporting to test123.mp3
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100
Input #0, matroska,webm, from '/input/working.webm':
Metadata:
encoder : http://sourceforge.net/projects/yamka
creation_time : 2010-05-20T12:00:13.000000Z
Duration: 00:01:57.70, start: 0.000000, bitrate: 582 kb/s
Stream #0:0(eng): Video: vp8, yuv420p(progressive), 540x360, SAR 1:1 DAR 3:2, 23.98 fps, 23.98 tbr, 1k tbn, 1k tbc (default)
Stream #0:1(eng): Audio: vorbis, 44100 Hz, mono, fltp (default)
Stream mapping:
Stream #0:1 -> #0:0 (vorbis (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to '/output/test123.mp3':
Metadata:
TSSE : Lavf58.76.100
Stream #0:0(eng): Audio: mp3, 44100 Hz, mono, fltp, 128 kb/s (default)
Metadata:
encoder : Lavc58.134.100 libmp3lame
size= 1840kB time=00:01:57.71 bitrate= 128.1kbits/s speed= 209x
video:0kB audio:1840kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.024520%
I am attempting to add audio to a MP4 file using ffmpeg at a specific time, eventually I also want the audio to only play until a certain point, so if you can help with that also that would be great, otherwise if you can just assist me in figuring out what is causing this error.
The arguments I use
-y "E:\Documents\Content Bar/Photo Booth\PhotosDrop\2018-05-15 14-01-16OUT.mp4" -itsoffset -i "E:\Downloads\wetransfer-250b26\05 Call of Love.mp3" -map 0:0 -map 1:0 -c:v copy -shortest "E:\Documents\Content Bar\Photo Booth\PhotosDrop\2018-05-15 14-01-16OUTOUT.mp4"
This results in the following error:
ffmpeg version N-81646-gc19da0c Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 29.100 / 55. 29.100
libavcodec 57. 55.101 / 57. 55.101
libavformat 57. 48.103 / 57. 48.103
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 62.100 / 6. 62.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100
Output #0, mp4, to 'E:\Documents\Content Bar/Photo Booth\PhotosDrop\2018-05-15 14-01-16OUT.mp4':
Output file #0 does not contain any stream
Okay so I figured it out using the following command
-i "E:\Documents\Content Bar/Photo Booth\PhotosDrop\2018-05-15 14-01-16OUT.mp4" -i "E:\Downloads\wetransfer-250b26\05 Call of Love.mp3" -filter_complex "[1]atrim=end=20,asetpts=PTS-STARTPTS[aud1];[aud1]adelay=6000|6000[aud];[0][aud]amix" -c:v copy out.mp4
So, I have a directory full of files named motor_animate_000.gif, motor_animate_001.gif, etc.
I run:
ffmpeg -r 30 -i motor_animate_%03d.gif -r 30 motor.mpg
I expect to get a file called motor.mpg, but instead I get the usual bunch of printout, ending with:
motor_animate_%03d.gif: No such file or directory
What? This worked in Ubuntu 14.04, but doesn't work now. What I'm doing appears to be consistent with the ffmpeg man page. I'm now officially clueless. Thanks in advance.
Here's what I get when I try the alternate suggested below:
tim#Servo:~/Documents/Movies/dcmotor/animation$ ffmpeg -f image2 -framerate 30 -i motor_animate_%03d.gif motor.mpg
ffmpeg version 2.8.10-0ubuntu0.16.04.1 Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
[image2 # 0x20bd420] Could not find codec parameters for stream 0 (Video: none, none): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
motor_animate_%03d.gif: could not find codec parameters
Input #0, image2, from 'motor_animate_%03d.gif':
Duration: 00:00:04.03, start: 0.000000, bitrate: N/A
Stream #0:0: Video: none, none, 30 fps, 30 tbr, 30 tbn, 30 tbc
No decoder for stream #0:0, filtering impossible
Error opening filters!
The gif demuxer does not support a series of input files. You'll need to manually tell it to use the image file demuxer instead:
ffmpeg -f image2 -framerate 30 -i motor_animate_%03d.gif motor.mpg
The image file demuxer uses -framerate instead of -r.
You don't need to declare frame rate twice if you want to output to be the same as the input, so I removed the output -r.
I want decode the wma type file use the FFmpeg,
compiled it with options
--enable-decoder=wmav1 --enable-decoder=wmav2, --enable-encoder=wmav1, --enable-encoder=wmav2 --enable-demuxer=xwma
and the source code i use it like this:
av_register_all();
//avcodec_register_all();
if ((ret = avformat_open_input(&fmt_ctx, src_filename, 0, 0)) < 0) {
LOG("Could not open source file %s, ret:%d", src_filename, ret);
return;
}
if ((ret = avformat_find_stream_info(fmt_ctx, 0)) < 0) {
LOG("Could not find stream information---ret:%d", ret);
return;
}
and avformat_find_stream_info fail with ret:-541478725
and add ffmpeg -i <inputfile> commandline log:
D:\Downloads\ffmpeg-static\bin>ffmpeg.exe -i ring.wma
ffmpeg version N-76684-g1fe82ab Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
--enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --
enable-lzma --enable-decklink --enable-zlib
libavutil 55. 6.100 / 55. 6.100
libavcodec 57. 15.100 / 57. 15.100
libavformat 57. 14.100 / 57. 14.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 15.100 / 6. 15.100
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.101 / 2. 0.101
libpostproc 54. 0.100 / 54. 0.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, asf, from 'ring.wma':
Metadata:
WMFSDKNeeded : 0.0.0.0000
DeviceConformanceTemplate: L3
WMFSDKVersion : 11.0.6001.7001
IsVBR : 0
PeakValue : 18081
AverageLevel : 1915
Duration: 00:00:07.80, start: 0.000000, bitrate: 206 kb/s
Stream #0:0: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 2 channels, fltp,
192 kb/s
any tips?
And which option must be include when i want to decode a special type file?
thank you.
You need --enable-demuxer=asf. xwma is a fringe format which isn't really used very much, wma audio is typically packed in the asf container. These files will still have the '.wma' extension.
Assume current directory contains files in .bmp format, named IMG_0000.bmp, IMG_0001.bmp, and so on. I need to make avi file from them, threating them as a frames. FFmpeg gives me an error, and i could not understand what is wrong. I've got following error message:
D:\WORK\MyFrames>"C:\Users\Den\Downloads\ffmpeg-latest-win32-static\ffmpeg-201 30928-git-c461265-win32-static\bin\ffmpeg.exe" -i d:\WORK\MyFrames\IMG_%4d.bmp
-r 4 -vcodec h264 -y out.avi
ffmpeg version N-56715-gc461265 Copyright (c) 2000-2013 the FFmpeg developers built on Sep 28 2013 18:02:00 with gcc 4.8.1 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aa
cenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavp
ack --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
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
[image2 # 022cfa60] Could find no file with path 'd:\WORK\MyFrames\IMG_%4d.bmp
' and index in the range 0-4
d:\WORK\Serega28-3\IMG_%4d.bmp: No such file or directory
the error message say that ffmpeg cannot find your input file sequence.
how are they numbered ? if they are named 'IMG_0001.bmp' etc... you have to use:
fmpeg.exe" -r 4 -i d:\WORK\MyFrames\IMG_%04d.bmp -vcodec h264 -y out.avi