[MPlayer-users] encoding a .3gp file

Raphael mencoder at lesshaste.plus.com
Mon Jul 18 23:54:48 CEST 2005


Nico Sabbi wrote:
> Raphael wrote:
> 
>> Nico Sabbi wrote:
>>
>>> Raphael wrote:
>>>
>>>> Hi,
>>>>
>>>> I have been trying to make a .3gp file for my mobile phone.  I want 
>>>> to use mencoder instead of ffmpeg but am having a problem with the 
>>>> amr audio codecs it seems.
>>>>
>>>> My experimental command line (without any of the bitrate/fps etc. 
>>>> arguments needed eventually) is
>>>>
>>>> /usr/local/bin/mencoder stream.dump -oac lavc -ovc lavc -lavcopts 
>>>> vcodec=h263p:acodec=amr_nb -of lavf -o movie.3gp
>>>>
>>>> which gives the error
>>>>
>>>> "
>>>> Couldn't find wav tag for specified codec, exit
>>>> "
>>>
>>>
>>>
>>>
>>>
>>> this means that you have to specify atag=NNN that you should know or 
>>> search in libavcodec
>>>
>>
>> Hi,
>>
>>
>> Could you specify further?  The only thing the man page has to say 
>> about atag is
>>
>> "
>>    atag=<value>
>>               Use the specified Windows audio format tag (e.g. 
>> atag=0x55).
>> "
>>
>> and there appears to be no documentation about atags on the web.
> 
> 
> 
> it's the infamous two-cc code used to identify audio in  waveformats :(
> 
>>
>> Looking in the directory libavcodec of the source doesn't seem to 
>> help. Also, it is not clear to me what is going on as .3gp is not a 
>> Windows format and nor is amr (or am I wrong?).
> 
> 
> 
> there are no os-specific formats
> 
>> In case it helps, I have attached below the output of mplayer -v on a 
>> working .3gp file I got from somewhere else. This is what I am trying 
>> to reproduce. Is the atag hidden in the mplayer output somewhere?
>>
>> Raphael
> 
> 
> 
> there's not two-cc in mov/mp4/3gp, that's why you don't see it. To say 
> the truth it seems there's no
> assigned (or frequently used) two-cc for AMR, so there doesn't seem to 
> be any mention of it in libavcodec.
> 
> Can you run
> 
> $ ffmpeg -i file.3gp -acodec copy -vcodec copy file.avi
> 
> and still play file.avi? what does ffmpeg -i file.avi say?
>

I did that.  The audio no longer works in the .avi file. Complaining that

Cannot find codec for audio format 0x6173.

I can't find 0x6173 mentioned anywhere in the docs/web site etc.

Raphael

--- output of mplayer -v file.avi -------

  mplayer -v file.avi
MPlayer dev-CVS-050715-15:59-3.3.2 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 4)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2


86 audio & 200 video codecs
CommandLine: '-v' 'file.avi'
init_freetype
get_path('font/font.desc') -> '/home/raph/.mplayer/font/font.desc'
font: can't open file: /home/raph/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system 
startup scripts.
Using nanosleep() timing
get_path('input.conf') -> '/home/raph/.mplayer/input.conf'
Can't open input config file /home/raph/.mplayer/input.conf: No such 
file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such 
file or directory
Falling back on default (hardcoded) input config
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
get_path('file.avi.conf') -> '/home/raph/.mplayer/file.avi.conf'
Playing file.avi.
[file] File size is 20908644 bytes
STREAM: [file] file.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
AVI file format detected.
list_end=0x227C
======= AVI Header =======
us/frame: 83333  (fps=12.000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 185684   initial: 0
streams: 2
Suggested BufferSize: 1048576
Size:  176 x 144
==========================
list_end=0x10F0
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC: s263 (33363273)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 12/1 = 12.000
Start: 0   Len: 35934
Suggested BufferSize: 1048576
Quality -1
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
   biSize 40
   biWidth 176
   biHeight 144
   biPlanes 1
   biBitCount 24
   biCompression 859189875='s263'
   biSizeImage 76032
===========================
list_end=0x2170
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC:  (1)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 0/1 = 0.000
Start: 0   Len: 149750
Suggested BufferSize: 12288
Quality -1
Sample size: 0
==========================
found 'wf', 16 bytes of 18
======= WAVE Format =======
Format Tag: 24947 (0x6173)
Channels: 1
Samplerate: 8000
avg byte/sec: 0
Block align: 2
bits/sample: 16
cbSize: 0
===========================
list_end=0x111B51C
Found movie at 0x2288 - 0x111B51C
Reading INDEX block, 185684 chunks for 185684 frames (fpos=0x111b524)
AVI index offset: 0x2284 (movi=0x2288 idx0=0x4 idx1=0x2C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=11633273 (35934) audio size=4792000 (2396000)
VIDEO:  [s263]  176x144  24bpp  12.000 fps   31.1 kbps ( 3.8 kbyte/s)
[V] filefmt:3  fourcc:0x33363273  size:176x144  fps:12.00  ftime:=0.0833
get_path('sub/') -> '/home/raph/.mplayer/sub/'
get_path('default.sub') -> '/home/raph/.mplayer/default.sub'
==========================================================================
Cannot find codec for audio format 0x6173.
Read DOCS/HTML/en/codecs.html!
==========================================================================
X11 opening display: localhost:10.0
vo: X11 color mask:  FFFF  (R:F800 G:7E0 B:1F)
vo: X11 running at 1280x1024 with depth 16 and 16 bpp (":10.0" => remote 
display)
[x11] Detected wm supports layers.
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Current fstype setting honours LAYER FULLSCREEN X atoms
[xv common] Drawing colorkey manually.
[xv common] Using colorkey from Xv (0x00001e).
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffh263] vfm:ffmpeg (FFmpeg H.263+ decoder)
==========================================================================
Audio: no sound
Freeing 0 unused audio chunks.
Starting playback...
[ffmpeg] aspect_ratio: 1.333333
VDec: vo config request - 176 x 144 (preferred csp: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (176x144->192x144,flags=0,'MPlayer',0x32315659)
VO: [xv] 176x144 => 192x144 Planar YV12
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel at goldbach.in-berlin.de> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 61 for hw scaling
Shared memory not supported
Reverting to normal Xv
Shared memory not supported
Reverting to normal Xv
[xv] dx: 0 dy: 0 dw: 192 dh: 154
*** [vo] Allocating (slices) mp_image_t, 176x144x12bpp YUV planar, 38016 
bytes
get_path('subfont.ttf') -> '/home/raph/.mplayer/subfont.ttf'
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
[xv] dx: 0 dy: 0 dw: 192 dh: 154
*** [vo] Allocating (slices) mp_image_t, 176x144x12bpp YUV planar, 38016 
bytes 











More information about the MPlayer-users mailing list