Log in

View Full Version : Strange mp4, ffmpeg fails...


northerns74r
30th June 2011, 09:39
Hi everybody,
strange thing... I had some videos coming from user which are very strange. They are clips made with mobile phones, and they should be processed to be played in our video webplayer (flash).
The pipe is when video are uploaded by user ffmpeg acts and encode file in a proper mp4 (h264 baseline, aac)...
This time ffmpeg fails, even if metadata say it's made by ffmpeg...

General
Complete name : C:\Documents and Settings\....\1308230890.mp4
Format : MPEG-4
Format profile : 3GPP Media Release 5
Codec ID : 3gp5
File size : 2.21 MiB
Duration : 55s 300ms
Overall bit rate : 335 Kbps
Movie name/More : Created on ADI mobile technology
Make : LG_Electronics
Model : GW300

Video
ID : 1
Format : MPEG-4 Visual
Format profile : Simple@L1
Format settings, BVOP : No
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : 20
Duration : 55s 140ms
Bit rate mode : Constant
Bit rate : 321 Kbps
Nominal bit rate : 64.0 Kbps
Width : 176 pixels
Height : 144 pixels
Display aspect ratio : 1.222
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Stream size : 2.11 MiB (96%)
Writing library : FFmpeg0.4.8b4716
Language : English

Audio
ID : 2
Format : AMR
Format/Info : Adaptive Multi-Rate
Format profile : Narrow band
Codec ID : samr
Duration : 55s 300ms
Bit rate mode : Constant
Bit rate : 12.8 Kbps
Channel(s) : 1 channel
Sampling rate : 8 000 Hz
Bit depth : 13 bits
Stream size : 86.4 KiB (4%)
Writing library : (empty)
Language : English

If I try to play it in ffplay I get error... how it come? It's encoded by some old version of ffmpeg! I can only play it by using directshow (I attach graphedit)...
http://forum.videohelp.com/attachments/7421-1308324395/directshow.png

J_Darnley
30th June 2011, 10:51
So... You get some error. Why have you not posted it? How are we going to help you? A quick guess would be the the ffmpeg build you're using does not have an AMR decoder.

northerns74r
30th June 2011, 11:12
Yes... it's probably not supporting audio stream... it says
"Unsupported codec (id=73728) for input stream #0.1" (audio)...
I found something about "OpenCORE AMR", which should be installed separetly... I try looking for an exe with those libraries included...
Thank you

LoRd_MuldeR
30th June 2011, 11:24
Yes... it's probably not supporting audio stream... it says
"Unsupported codec (id=73728) for input stream #0.1" (audio)...

The unsupported audio format (by your FFmpeg binary) very obvious is the problem.

I found something about "OpenCORE AMR", which should be installed separetly... I try looking for an exe with those libraries included...

Look at:
http://ffmpeg.zeranoe.com/builds/

northerns74r
30th June 2011, 11:52
I can't understand if they are included...
"Current Zeranoe FFmpeg Builds External Libraries" ...what do you think?

LoRd_MuldeR
30th June 2011, 13:19
I can't understand if they are included...
"Current Zeranoe FFmpeg Builds External Libraries" ...what do you think?

I think it means that these are "external" libraries (i.e. code that isn't directly from FFmpeg project) that are included in the Zeranoe builds.

If you pick the "static" build, everything should be "built-in" in a single EXE file :)

From latest Zeranoe build:
C:\Temp>ffmpeg.exe --version
ffmpeg version N-31031-gf211d9d, Copyright (c) 2000-2011 the FFmpeg developers
built on Jun 26 2011 22:50:39 with gcc 4.5.3
configuration: --enable-gpl --enable-version3 --enable-memalign-hack --enable-
runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libo
pencore-amrnb --enable-libopencore-amrwb --enable-libfreetype --enable-libgsm --
enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger
--enable-libspeex --enable-libtheora --enable-libvorbis --enable-libvpx --enabl
e-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 51. 10. 0 / 51. 10. 0
libavcodec 53. 7. 0 / 53. 7. 0
libavformat 53. 4. 0 / 53. 4. 0
libavdevice 53. 1. 1 / 53. 1. 1
libavfilter 2. 24. 0 / 2. 24. 0
libswscale 2. 0. 0 / 2. 0. 0
libpostproc 51. 2. 0 / 51. 2. 0

SeeMoreDigital
30th June 2011, 17:59
As far as I'm aware, AMR audio can't "officially" be placed within the .MP4 container.

I suspect your source is not actually an .MP4 contained file... It's an .3GP contained (http://en.wikipedia.org/wiki/3GP_and_3G2) file...

Chikuzen
1st July 2011, 06:22
latest lavc have it's own amrnb/amrwb decoders.
thus you need not search for the binary including libopencore-amr*.