I am using openwrt 21.2.3 and mpd on it. I have compile mpd full and libffmpeg full as well as ffmpeg-full packages.
But my mpd wont load ffmpeg as decoder. Also tried to force it by adding decoder { plugin “ffmpeg” enabled “no” }” line to /etc/mpd.conf
below is my mpd.conf
log_file "syslog"
bind_to_address "127.0.0.1"
bind_to_address "192.168.1.16"
input {
plugin "curl"
}
audio_output {
type "alsa"
name "sun4icodec"
device "plug:dmix"
mixer_control "Power Amplifier"
}
decoder {
plugin "ffmpeg"
enabled "yes"
}
the mpd --version output is as follows
Music Player Daemon 0.21.26 (v21.02.3)
Copyright 2003-2007 Warren Dukes <warren.dukes#gmail.com>
Copyright 2008-2018 Max Kellermann <max.kellermann#gmail.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Database plugins:
simple proxy upnp
Storage plugins:
local curl
Decoders plugins:
[mad] mp3 mp2
[vorbis] ogg oga
[oggflac] ogg oga
[flac] flac
[opus] opus ogg oga
[faad] aac
[pcm]
Filters:
Tag plugins:
id3tag
Output plugins:
shout null fifo pipe alsa pulse httpd recorder
Encoder plugins:
null opus wave flac
Input plugins:
file alsa curl mms
Playlist plugins:
extm3u m3u pls xspf asx rss soundcloud flac cue embcue
Protocols:
file:// alsa:// http:// https:// mms:// mmsh:// mmst:// mmsu://
Other features:
epoll iconv inotify ipv6 tcp un
ideally it should have something like this
Decoders plugins:
[dsdiff] dff
[dsf] dsf
[ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve
[pcm]
Filters:
here are logs from mpd deamon
Output of ffmpeg command
Mon Jul 25 09:40:30 2022 daemon.err mpd[1969]: exception: Error in /etc/mpd.conf line 17; Unknown tokens after '{'
Mon Jul 25 09:44:23 2022 daemon.debug mpd: vorbis: Xiph.Org libVorbis 1.3.7
Mon Jul 25 09:44:23 2022 daemon.debug mpd: opus: libopus 1.3.1-fixed
Mon Jul 25 09:44:23 2022 daemon.debug mpd: curl: version 7.82.0
Mon Jul 25 09:44:23 2022 daemon.debug mpd: curl: with mbedTLS/2.16.12
ffmpeg version 4.3.3 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 8.4.0 (OpenWrt GCC 8.4.0 r16554-1d4dea6d4f)
configuration: --enable-cross-compile --cross-prefix=arm-openwrt-linux-muslgnueabi- --arch=arm --cpu=cortex-a7 --target-os=linux --prefix=/usr --pkg-config=pkg-config --enable-shared --enable-static --enable-pthreads --enable-zlib --disable-doc --disable-debug --disable-lzma --disable-vaapi --disable-vdpau --disable-outdevs --disable-runtime-cpudetect --enable-lto --enable-vfp --enable-neon --enable-vfp --disable-x86asm --enable-hardcoded-tables --enable-gpl --enable-version3 --enable-nonfree --disable-swscale --disable-everything --enable-encoder=ac3 --enable-encoder=jpegls --enable-encoder=mpeg1video --enable-encoder=mpeg2video --enable-encoder=pcm_s16be --enable-encoder=pcm_s16le --enable-encoder=png --enable-encoder=vorbis --enable-encoder=zlib --enable-decoder=aac --enable-decoder=ac3 --enable-decoder=alac --enable-decoder=amrnb --enable-decoder=amrwb --enable-decoder=ape --enable-decoder=flac --enable-decoder=jpegls --enable-decoder=mp2 --enable-decoder=mp3 --enable-decoder=mpeg1video --enable-decoder=mpeg2video --enable-decoder=mpeg4 --enable-decoder=mpegvideo --enable-decoder=mpc7 --enable-decoder=mpc8 --enable-decoder=pcm_s16be --enable-decoder=pcm_s16le --enable-decoder=png --enable-decoder=vorbis --enable-decoder=wavpack --enable-decoder=wmav1 --enable-decoder=wmav2 --enable-decoder=zlib --enable-muxer=ac3 --enable-muxer=mp3 --enable-muxer=mp4 --enable-muxer=mpeg1video --enable-muxer=mpeg2video --enable-muxer=mpegts --enable-muxer=ogg --enable-muxer=rtp --enable-demuxer=aac --enable-demuxer=ac3 --enable-demuxer=amr --enable-demuxer=ape --enable-demuxer=avi --enable-demuxer=flac --enable-demuxer=matroska --enable-demuxer=mov --enable-demuxer=mp3 --enable-demuxer=mpegps --enable-demuxer=mpegts --enable-demuxer=mpegvideo --enable-demuxer=mpc --enable-demuxer=mpc8 --enable-demuxer=ogg --enable-demuxer=rm --enable-demuxer=rtsp --enable-demuxer=rtp --enable-demuxer=sdp --enable-demuxer=wav --enable-demuxer=wv --enable-parser=aac --enable-parser=flac --enable-parser=ac3 --enable-parser=mpegaudio --enable-parser=mpeg4video --enable-parser=mpegvideo --enable-protocol=file --enable-protocol=http --enable-protocol=icecast --enable-protocol=pipe --enable-protocol=rtp --enable-protocol=tcp --enable-protocol=udp --enable-decoder=adpcm_ima_wav --enable-decoder=adpcm_ima_qt --enable-decoder=adpcm_ms --enable-libfdk-aac --enable-encoder=libfdk_aac --enable-libmp3lame --enable-encoder=libmp3lame --enable-libopus --enable-decoder=libopus --enable-encoder=libopus --enable-libshine --enable-encoder=libshine --disable-postproc
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswresample 3. 7.100 / 3. 7.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...
If you pulled the binary and did not compile it by yourself the one who complied the binary might not have set the argument -Dffmpeg=enabled.
This results in mpd just ignoring the related part in the config-file.
(Also there seems to be no use for enabled="yes". It only disables it with "no")
I tried downloading a video with youtube-dl with 3gp format. When I try to play it on VLC or any other application it doesn't play. This is the output I get when trying to download it again.
youtube-dl https://youtu.be/lVFq__mrmlQ -f worst -v
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['https://youtu.be/lVFq__mrmlQ', '-f', 'worst', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.14
[debug] Python version 3.6.5 (CPython) - Linux-4.15.0-29-generic-x86_64-with-Ubuntu-18.04-bionic
[debug] exe versions: ffmpeg 3.4.2-2, ffprobe 3.4.2-2, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] lVFq__mrmlQ: Downloading webpage
[youtube] lVFq__mrmlQ: Downloading video info webpage
[youtube] lVFq__mrmlQ: Extracting video information
[debug] Invoking downloader on 'https://r4---sn-h5q7dnee.googlevideo.com/videoplayback?signature=5432A7990BB3336616E21753F1D53171D09CBC31.B98E84CF0C51F39C613F53311128CD9E7A3872EA&c=WEB&lmt=1514133618343257&key=yt6&itag=17&fvip=3&mn=sn-h5q7dnee%2Csn-h5q7knes&mm=31%2C29&pl=24&mime=video%2F3gpp&id=o-AKWLZ7MpY1ip3PlxZJ7vXBY-jDqbVpUeI_Bls_o_g-GV&ipbits=0&requiressl=yes&ip=90.174.4.0&gir=yes&mt=1532653244&ms=au%2Crdu&dur=18470.684&initcwndbps=1011250&ei=S29aW5SjH4bIVseNkfgE&expire=1532674987&mv=m&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&clen=195336027&source=youtube&ratebypass=yes'
[download] Heroes of Might and Magic III - No Might 1v7 FFA (200%)-lVFq__mrmlQ.3gp has already been downloaded
[download] 100% of 186.29MiB
I tried converting it with ffmpeg, but I get the following message:
ffmpeg -i Heroes\ of\ Might\ and\ Magic\ III\ -\ No\ Might\ 1v7\ FFA\ \(200%\)-lVFq__mrmlQ.3gp Heroes\ of\ Might\ and\ Magic\ III\ -\ No\ Might\ 1v7\ FFA\ \(200%\)-lVFq__mrmlQ.mp4
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
[mov,mp4,m4a,3gp,3g2,mj2 # 0x562e75c728c0] Could not find codec parameters for stream 0 (Video: mpeg4 (mp4v / 0x7634706D), none, 221 kb/s): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Heroes of Might and Magic III - No Might 1v7 FFA (200%)-lVFq__mrmlQ.3gp':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: isommp42
creation_time : 2017-12-24T16:43:17.000000Z
Duration: 05:07:50.68, bitrate: 84 kb/s
Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), none, 221 kb/s, 30 fps, 30 tbr, 15360 tbn, 15360 tbc (default)
Metadata:
creation_time : 2017-12-24T16:43:17.000000Z
handler_name : IsoMedia File Produced by Google, 5-11-2011
Output #0, mp4, to 'Heroes of Might and Magic III - No Might 1v7 FFA (200%)-lVFq__mrmlQ.mp4':
Output file #0 does not contain any stream
With this information, I don't know how to proceed. I already tried ffmpeg with the max analyzeduration and probesize and it still doesn't work. Any ideas?
EDIT: added list of formats youtube-dl detected.
youtube-dl -F https://youtu.be/lVFq__mrmlQ
[youtube] lVFq__mrmlQ: Downloading webpage
[youtube] lVFq__mrmlQ: Downloading video info webpage
[youtube] lVFq__mrmlQ: Extracting video information
[info] Available formats for lVFq__mrmlQ:
format code extension resolution note
249 webm audio only DASH audio 71k , opus # 50k, 108.83MiB
250 webm audio only DASH audio 85k , opus # 70k, 142.71MiB
171 webm audio only DASH audio 119k , vorbis#128k, 228.14MiB
140 m4a audio only DASH audio 145k , m4a_dash container, mp4a.40.2#128k, 279.77MiB
251 webm audio only DASH audio 152k , opus #160k, 280.97MiB
160 mp4 256x144 144p 114k , avc1.4d400c, 30fps, video only, 91.12MiB
278 webm 256x144 144p 153k , webm container, vp9, 30fps, video only, 176.00MiB
133 mp4 426x240 240p 258k , avc1.4d4015, 30fps, video only, 188.39MiB
242 webm 426x240 240p 261k , vp9, 30fps, video only, 366.78MiB
243 webm 640x360 360p 528k , vp9, 30fps, video only, 751.54MiB
134 mp4 640x360 360p 758k , avc1.4d401e, 30fps, video only, 539.15MiB
244 webm 854x480 480p 896k , vp9, 30fps, video only, 1.43GiB
135 mp4 854x480 480p 1441k , avc1.4d401f, 30fps, video only, 1.40GiB
247 webm 1280x720 720p 1798k , vp9, 30fps, video only, 3.03GiB
136 mp4 1280x720 720p 2673k , avc1.4d401f, 30fps, video only, 2.86GiB
302 webm 1280x720 720p60 2907k , vp9, 60fps, video only, 5.10GiB
298 mp4 1280x720 720p60 4626k , avc1.4d4020, 60fps, video only, 4.11GiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2# 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
43 webm 640x360 medium , vp8.0, vorbis#128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2# 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2#192k (best)
The one that got downloaded was number 17.
You passed in -f worst. As the name indicates, -f worst will get you the worst video format, with horrible quality and very little support in many applications, including ffmpeg. In short, you got what you asked for.
To get a better file, ask for something else. For instance, if you just want audio (much smaller than picture for most videos), pass in -x.
If you want the best video quality, simply omit -f worst.
If your device can only play a certain resolution (say 300px width), pass in -f 'bestvideo[width<=300]+bestadio/best[width<=300]'.
If your disk space per video is the limit (e.g. 5GB), pass in -f best[filesize<=5GB].
If your device can only play certain formats, specify that format, with acodec, vcodec, container, or simply ext. For instance, -f worstvideo[ext=mp4]+bestaudio/worst[ext=mp4] will get you the worst-quality MP4 file.
Of course, these selectors can be combined, as in -f worst[ext=mp4][filesize<=5GB]. For more information on all of these options, consult the youtube-dl documentation.
The issue had nothing to do with codecs or ffmpeg. The file got corrupted during download and further attempts to redownload didn't tell me anything about it. Credit to the user phihag for sharing the sha256 of the file.
When I use ffmpeg with mjpeg encoder without hardware acceleration, everything works fine. I use following command:
ffmpeg -nostdin -rtsp_transport udp_multicast -allowed_media_types 'video' -i 'rtsp://MYIP' -ss 00:00:0.00 -f image2pipe -q:v 24 -vf scale=-2:480,format=yuv420p -c:v mjpeg -vframes 1 pipe:1
But, when I try to use mjpeg with hardware acceleration, I always get error:
ffmpeg -nostdin -rtsp_transport udp_multicast -allowed_media_types 'video' -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i 'rtsp://MYIP' -ss 00:00:0.00 -f image2pipe -q:v 24 -vf scale=-2:480,format=yuv420p -c:v mjpeg_vaapi -vframes 1 pipe:1
ffmpeg version N-91514-gc51e0cd Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --pkg-config-flags=--static
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 21.106 / 58. 21.106
libavformat 58. 17.101 / 58. 17.101
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 26.100 / 7. 26.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
Input #0, rtsp, from 'rtsp://MYIP':
Metadata:
title : Session streamed with GStreamer
comment : rtsp-server
Duration: N/A, start: 0.180600, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, progressive), 800x600, 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (mjpeg_vaapi))
Impossible to convert between the formats supported by the filter 'graph 0 input from stream 0:0' and the filter 'auto_scaler_0'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
Conversion failed!
I tried with some additional options but it still keeps failing:
ffmpeg -nostdin -rtsp_transport udp_multicast -allowed_media_types 'video' -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i 'rtsp://MYIP' -ss 00:00:0.00 -f image2pipe -q:v 24 -vf "scale_vaapi=w=800:h=600" -b:v 700k -r 25 -vcodec mjpeg_vaapi -vframes 1 pipe:1
ffmpeg version N-91514-gc51e0cd Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --pkg-config-flags=--static
libavutil 56. 18.102 / 56. 18.102
libavcodec 58. 21.106 / 58. 21.106
libavformat 58. 17.101 / 58. 17.101
libavdevice 58. 4.101 / 58. 4.101
libavfilter 7. 26.100 / 7. 26.100
libswscale 5. 2.100 / 5. 2.100
libswresample 3. 2.100 / 3. 2.100
libva info: VA-API version 0.39.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
Input #0, rtsp, from 'rtsp://MYIP':
Metadata:
title : Session streamed with GStreamer
comment : rtsp-server
Duration: N/A, start: 0.179933, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuvj420p(pc, progressive), 800x600, 50 fps, 50 tbr, 90k tbn, 100 tbc
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mjpeg (mjpeg_vaapi))
[mjpeg_vaapi # 0x374cd80] Encoding entrypoint not found (12 / 7).
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!
Can please anyone suggest right options to make it work?
so the problem was that my Intel CPU platform was old (Broadwell) and JPEG encoding is supported starting Braswell. Please see all supported codecs by platform on the page
After running the same command on the machine with Skylake CPU on it, it work from the first try :)
When you trying to leverage Intel's hardware encoding, you need to check TWO things
rather your particular intel support the encoder you want
rather your ffmpeg binary fetched from somewhere compiled with the hardware acceleration library or not.
To find out what kind of encoder your Intel support, you simply type:
vainfo|grep -i enc
it will list the encoder which your processor support. In my case, for example, it yields the following:
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileHEVCMain : VAEntrypointEncSlice
in my case, my intel cpu does have mjpeg encoding support.
if you can't find anything resembles mjpeg, then, you can pretty much give up the idea of using intel's hardware acceleration to accomplish what you want on that machine.
The next thing you need is to find out rather your ffmpeg binary support Intel's vaapi at the first place. First is to type:
ffmpeg -hide_banner -hwaccels
if one of those line has "vaapi," then, it means the ffmpeg compiled with Intel's hardware acceleration library. If your vainfo command has what you want but the above command doesn't display vaapi, then, you need to get another copy of ffmpeg binary. either from a different source, or compile it on your own.
Next, is to list all the ffmpeg encoder that actually uses vaapi, and hoping one of them resembles mjpeg:
ffmpeg -hide_banner -encoders|grep -i vaapi
In my case, I do have it:
V....D h264_vaapi H.264/AVC (VAAPI) (codec h264)
V....D hevc_vaapi H.265/HEVC (VAAPI) (codec hevc)
V....D mjpeg_vaapi MJPEG (VAAPI) (codec mjpeg)
V....D mpeg2_vaapi MPEG-2 (VAAPI) (codec mpeg2video)
V....D vp8_vaapi VP8 (VAAPI) (codec vp8)
V....D vp9_vaapi VP9 (VAAPI) (codec vp9)
So, in my case, the encoder is there.
if both vainfo and ffmpeg -hwaccels yield what you need but this last step doesn't, then, you need to get another ffmpeg binary from somewhere.
good luck.
I try to decode some video files using ffmpeg, but get errors caused by icod codec.
Here's the file's ffprobe info:
user:~$ ffprobe input.mov
ffprobe version 1.2.3 Copyright (c) 2007-2013 the FFmpeg developers
built on Jan 15 2014 23:08:14 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)
configuration: --enable-zlib --enable-libmp3lame --enable-libx264 --enable-gpl --enable-nonfree --enable-pic
...
Stream #0:0(eng): Video: none (icod / 0x646F6369), 1280x720, 52569 kb/s, SAR 1:1 DAR 16:9, 59.94 fps, 59.94 tbr, 5994 tbn, 5994 tbc
Metadata:
creation_time : 2014-01-27 05:09:24
handler_name : Apple Alias Data Handler
timecode : 21:03:24:08
Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s
Metadata:
creation_time : 2014-01-27 05:09:24
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
Metadata:
creation_time : 2014-01-27 05:09:24
handler_name : Apple Alias Data Handler
timecode : 21:03:24:08
Unsupported codec with id 0 for input stream 0
Unsupported codec with id 0 for input stream 2
The first step is to always try a recent build. The 1.2 branch release can be considered to be old. FFmpeg development is very active, and using a recent build will ensure that you're not missing a feature or that you're not experiencing a bug that has already been fixed; such as your case with Apple Intermediate Codec (ICOD) decoding.
See the links to Linux builds of ffmpeg on the FFmpeg Download page or see one of the many FFmpeg compile guides.
I want to transcode amr audio files to flac using JAVE which uses ffmpeg.
The transcoding procedure runs successfully on Windows but fails on Linux (centOS).
I checked the JAVE code and found it uses the following command:
ffmpeg -i 1.amr -vn -acodec flac -ac 1 -ar 8000 -f flac -y 1.flac
the output is:
FFmpeg version SVN-r11179, Copyright (c) 2000-2007 Fabrice Bellard, et al.
configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads \
--enable-libfaac --enable-libfaad --enable-libmp3lame --enable-libtheora \
--enable-memalign-hack --extra-ldflags=-static -lm -lz
libavutil version: 49.5.0
libavcodec version: 51.48.0
libavformat version: 52.1.0
built on Dec 7 2007 15:35:14, gcc: 4.1.2 20070626 (Red Hat 4.1.2-14)
Input #0, amr, from '1.amr':
Duration: N/A, bitrate: N/A
Stream #0.0: Audio: samr / 0x726D6173, 8000 Hz, mono
Input #1, amr, from '1.amr':
Duration: N/A, bitrate: N/A
Stream #1.0: Audio: samr / 0x726D6173, 8000 Hz, mono
Output #0, flac, to '1.flacffmpeg':
Stream #0.0: Audio: flac, 8000 Hz, mono, 64 kb/s
Output #1, flac, to '1.flac':
Stream #1.0: Audio: flac, 8000 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #1.0 -> #1.0
Unsupported codec (id=73728) for input stream #0.0
So the problem is an unsuppported codec? How can I resolve this?
If JAVE is bundling a copy of FFmpeg then there's not much you can do beyond filing a bug report.
Alternately, since you can see the FFmpeg command they're using, you could always compile it yourself, with all the necessary codecs, and run the same external command.