While concatenating audio files with
ffmpeg -safe 0 -f concat
-segment_time_metadata 1
-i {m3u_file_name}
-vf select=concatdec_select
-af aselect=concatdec_select,aresample=async=1 {ogg_file_name}
I get the following output
ffmpeg version 3.4.8-0ubuntu0.2 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --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-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, concat, from 'fm3u.m3u':
Duration: N/A, start: -0.006500, bitrate: N/A
Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
Stream mapping:
Stream #0:0 -> #0:0 (opus (native) -> vorbis (libvorbis))
Press [q] to stop, [?] for help
Output #0, ogg, to 'fout.ogg':
Metadata:
encoder : Lavf57.83.100
Stream #0:0: Audio: vorbis (libvorbis), 48000 Hz, mono, fltp
Metadata:
encoder : Lavc57.107.100 libvorbis
[opus # 0x558b2c245400] Error parsing the packet header.
Error while decoding stream #0:0: Invalid data found when processing input
[opus # 0x558b2c245400] Error parsing the packet header.
Error while decoding stream #0:0: Invalid data found when processing input
[opus # 0x558b2c245400] Error parsing the packet header.
...
...
Error while decoding stream #0:0: Invalid data found when processing input
[opus # 0x558b2c245400] Error parsing the packet header.
Error while decoding stream #0:0: Invalid data found when processing input
size= 47kB time=00:00:10.84 bitrate= 35.2kbits/s speed=4.38x
video:0kB audio:42kB subtitle:0kB other streams:0kB global headers:3kB muxing overhead: 10.251080%
/fout.ogg
The final audio sounds good.
ffprobe on the 2 participating files looks like
# ffprobe <FILE>
ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --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-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, ogg, from 'f1.ogg':
Duration: 00:00:01.08, start: 0.000000, bitrate: 34 kb/s
Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
# ffprobe <FILE>
ffprobe version 3.4.8-0ubuntu0.2 Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --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-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, ogg, from 'f2.ogg':
Duration: 00:00:05.00, start: 0.000000, bitrate: 6 kb/s
Stream #0:0: Audio: vorbis, 48000 Hz, mono, fltp, 80 kb/s
Metadata:
ENCODER : Lavc57.107.100 libvorbis
What is the reason of the error?
As explained in this answer
"file-level concatenation (-f concat) requires all files in the listing to have the exact same codec parameters. "
In this case, the input files have codecs opus and vorbis.
To resolve the issue, I recreated some files (silence files) so they all have the same CODEC as the files I am mixing them with.
In particular, instead of creating them using:
ffmpeg -f lavfi -i anullsrc=r=48000:cl=mono -t 5.8 -c:a libvorbis silence-5.8.ogg
I use now (note libopus)
ffmpeg -f lavfi -i anullsrc=r=48000:cl=mono -t 5.8 -c:a libopus silence-5.8.ogg
And the "concat with ffmpeg" works without any problem.
I also tried
ffmpeg -f lavfi -i anullsrc=r=48000:cl=mono -t 5.8 -c:a opus silence-5.8.ogg
But that returns with
[opus # 0x5607f1765900] The encoder 'opus' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
[opus # 0x5607f1765900] Alternatively use the non experimental encoder 'libopus'.
So, libopus works just fine (no need for opus)
Related
I have a simple gif. I am not in general familiar with FFmpeg commands so I assume it's just my syntax being wrong, but what I'm using is straight from an answer here so I thought it would work.
I'm trying to add a delay on the last frame of my gif.
ffmpeg -i out.gif -vf tpad=stop_mode=clone:stop_duration=2 out2.gif
But I'm getting this when I try it:
ffmpeg version 3.4.11-0ubuntu0.1 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
configuration: --prefix=/usr --extra-version=0ubuntu0.1 --toolchain=hardened - -libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enabl e-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-lib caca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreet ype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --en able-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enabl e-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-li bsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora -- enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enabl e-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --e nable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enabl e-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-f rei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Input #0, gif, from 'out.gif':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: gif, bgra, 780x530, 6 fps, 15 tbr, 100 tbn, 100 tbc
Stream mapping:
Stream #0:0 -> #0:0 (gif (native) -> gif (native))
Press [q] to stop, [?] for help
[AVFilterGraph # 0x5609c471d520] No such filter: 'tpad'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!
I'm trying to decode 2 Dolby-E audio streams simultaneously.
ffmpeg -non_pcm_mode copy -i C:\vlc-record.ts -map 0:3 -map 0:4 -c:a pcm_s24le -f s24le - | ffplay -
Using -map 0:3 it works for one at a time but when I add the second one -map 0:4 it only process the first one and there is just one stream on my dolby_e output pipe.
Is there a way to create a two streams multicanal non-pcm output from 2 Dolbys PCM streams ?
I tried to find a solution with named pipe but it seems like windows command line doesn't accept this. I also tried to merge the PCM streams but then it says Invalid data found when processing input.
I can't make it with 2 pass because I'll be using it with udp live video streams.
ffmpeg version 2022-03-07-git-e645a1ddb9-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 22.100 / 57. 22.100
libavcodec 59. 22.100 / 59. 22.100
libavformat 59. 17.103 / 59. 17.103
libavdevice 59. 5.100 / 59. 5.100
libavfilter 8. 27.100 / 8. 27.100
libswscale 6. 5.100 / 6. 5.100
libswresample 4. 4.100 / 4. 4.100
libpostproc 56. 4.100 / 56. 4.100
ffplay version 2022-03-07-git-e645a1ddb9-full_build-www.gyan.dev Copyright (c) 2003-2022 the FFmpeg developers
built with gcc 11.2.0 (Rev7, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 22.100 / 57. 22.100
libavcodec 59. 22.100 / 59. 22.100
libavformat 59. 17.103 / 59. 17.103
libavdevice 59. 5.100 / 59. 5.100
libavfilter 8. 27.100 / 8. 27.100
libswscale 6. 5.100 / 6. 5.100
libswresample 4. 4.100 / 4. 4.100
libpostproc 56. 4.100 / 56. 4.100
Input #0, mpegts, from 'C:\vlc-record.ts':
Duration: 00:00:15.76, start: 42530.445511, bitrate: 31505 kb/s
Program 1
Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn
Stream #0:1: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:2: Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
Stream #0:3: Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s
Stream #0:4: Audio: s302m (BSSD / 0x44535342), stereo, s32 (20 bit), 2304 kb/s
Stream mapping:
Stream #0:3 -> #0:0 (s302m (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
Output #0, s24le, to 'pipe:':
Metadata:
encoder : Lavf59.17.103
Stream #0:0: Audio: pcm_s24le, 48000 Hz, stereo, s32 (20 bit), 2304 kb/s
Metadata:
encoder : Lavc59.22.100 pcm_s24le
[dolby_e # 0000026b16da0640] Stream has 2 programs (configuration 0), channels will be output in native order.
Input #0, s337m, from 'pipe:':
Duration: N/A, bitrate: N/A
Stream #0:0: Audio: dolby_e, 44800 Hz, 7.1, fltp
[dolby_e # 0000026b16d7ca80] Stream has 2 programs (configuration 0), channels will be output in native order.
1.25 M-A: 0.000 fd= 0 aq= 292KB vq= 0KB sq= 0B f=0/0
av_interleaved_write_frame(): Broken pipe
Error writing trailer of pipe:: Broken pipe
size= 1451kB time=00:00:05.20 bitrate=2286.3kbits/s speed=3.07x
video:0kB audio:1462kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Error closing file pipe:: Broken pipe
Conversion failed!
I've got some code that outputs rawvideo to ffmpeg via pipe, which then overlays a png over it. If the code exits with an error, ffmpeg keeps going forever, I don't know how to stop it :( Any ideas? Here's an example:
set -o pipefail
(echo "error!!"; exit 1) | \
ffmpeg -f rawvideo -c:v rawvideo -s 1280x720 -pix_fmt bgra -i - \
-i my_icon.png \
-filter_complex "[0][1]overlay=50:50" \
out.mp4
Note ffmpeg DOES show an error message, but still does not stop, stuck in 'frame 0' forever, with a strange time attribute e.g. time:-577014:32:22.77:
[rawvideo # 0x563fc94427c0] Packet too small (8)
Error while decoding stream #0:0: Invalid data found when processing input
Finishing stream 0:0 without any data written to it.:32:22.77 bitrate= -0.0kbits/s speed=N/A
frame= 0 fps=0.0 q=0.0 size= 0kB time=-577014:32:22.77 bitrate= -0.0kbits/s speed=N/A
ffmpeg version information as requested in comments:
ffmpeg version 3.4.2-2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 7 (Ubuntu 7.3.0-16ubuntu2)
configuration: --prefix=/usr --extra-version=2 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --enable-gpl --disable-stripping --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-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --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-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Here is the command I used and the output when I try and parse the .wav file into 30-second clips:
C:\Users\hmkur>ffmpeg -i C:\Users\hmkur\Desktop\Python\Transcribing_Audio\source\valve.wav -f segment -segment_time 30 -c copy parts/out%09d.wav
ffmpeg version git-2019-11-05-c54268c Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9.2.1 (GCC) 20191010
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 35.101 / 56. 35.101
libavcodec 58. 60.100 / 58. 60.100
libavformat 58. 34.101 / 58. 34.101
libavdevice 58. 9.100 / 58. 9.100
libavfilter 7. 66.100 / 7. 66.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
[wav # 0000023133098a00] Discarding ID3 tags because more suitable tags were found.
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'C:\Users\hmkur\Desktop\Python\Transcribing_Audio\source\valve.wav':
Metadata:
title : valve
encoder : Lavf58.20.100 (libsndfile-1.0.24)
Duration: 00:06:47.20, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
[segment # 00000231334d18c0] Opening 'parts/out000000000.wav' for writing
[segment # 00000231334d18c0] Failed to open segment 'parts/out000000000.wav'
Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Last message repeated 1 times
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.