[FFmpeg-user] h263 vcodec 3gp file can't be DAR isn't 4:3?

littlebat dashing.meng at gmail.com
Thu Dec 20 05:03:25 CET 2012


Hi,
I found a strange behavior even in the latest ffmpeg(ffmpeg version
N-47982-gc5d7c7d ), when I convert a video to a 3gp file with h263
vcodec and -aspect 176:144(1.222), the result file shown as DAR 4:3 by
"ffmpeg -i" while the mediainfo say DAR is 1.222(176:144). When I
convert it with "-aspect 4:3"(1.333), the result file still shown as
DAR 4:3 by "ffmpeg -i". 

And, I test these two 3gp files on a mobilephone, the file with
"-aspect 176:144" can be played while the file with "-aspect 4:3" can't
be played on this mobilephone.

You can download these two file at:
1, with "-aspect 176:144":
http://www.learndiary.com/test/h176_144-176_144.3gp
 2, with "-aspect 4:3":
http://www.learndiary.com/test/h176_144-4_3.3gp

The command line I use:
/usr/local/bin/ffmpeg -y \
  -i "108.flv" -strict experimental \
  -ss 0 -t 10 \
  -vcodec h263 -b:v 256k -s 176x144 -r 10 -aspect 176:144 \
  -acodec aac -ac 2 -ar 44100 -b:a 128k \
  -f 3gp \
  "h176_144-176_144.3gp"

The uncutted console output:
ffmpeg version N-47982-gc5d7c7d Copyright (c) 2000-2012 the FFmpeg
developers built on Dec 19 2012 16:59:16 with gcc 4.4.3 (Ubuntu
4.4.3-4ubuntu5.1) configuration: --enable-nonfree --enable-gpl
--enable-version3 --enable-postproc --enable-libmp3lame
--enable-libopenjpeg --enable-libvorbis --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libxvid --enable-libx264
--enable-libfaac --enable-pthreads libavutil      52. 12.100 / 52.
12.100 libavcodec     54. 80.100 / 54. 80.100 libavformat    54.
49.102 / 54. 49.102 libavdevice    54.  3.102 / 54.  3.102
libavfilter     3. 28.102 /  3. 28.102 libswscale      2.  1.103 /  2.
1.103 libswresample   0. 17.102 /  0. 17.102 libpostproc    52.
2.100 / 52.  2.100 Input #0, flv, from '108.flv':
  Metadata:
    starttime       : 0
    totalduration   : 240
    totaldatarate   : 1158
    bytelength      : 34667397
    canseekontime   : true
    sourcedata      : BADC23162MH1331261156003464
    purl            : 
    pmsg            : 
  Duration: 00:03:59.51, start: 0.000000, bitrate: 1157 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 640x480, 1044 kb/s, 29.97
tbr, 1k tbn, 59.94 tbc Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp,
131 kb/s Output #0, 3gp, to 'h176_144-176_144.3gp':
  Metadata:
    starttime       : 0
    totalduration   : 240
    totaldatarate   : 1158
    bytelength      : 34667397
    canseekontime   : true
    sourcedata      : BADC23162MH1331261156003464
    purl            : 
    pmsg            : 
    encoder         : Lavf54.49.102
    Stream #0:0: Video: h263 (s263 / 0x33363273), yuv420p, 176x144 [SAR
1:1 DAR 11:9], q=2-31, 256 kb/s, 10240 tbn, 10 tbc Stream #0:1: Audio:
aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s Stream
mapping: Stream #0:0 -> #0:0 (h264 -> h263)
  Stream #0:1 -> #0:1 (aac -> aac)
Press [q] to stop, [?] for help
frame=   36 fps=0.0 q=2.5 size=     188kB time=00:00:03.60 bitrate=
428.1kbits/sframe=   69 fps= 69 q=2.7 size=     371kB time=00:00:06.90
bitrate= 440.1kbits/sframe=  100 fps= 67 q=3.5 size=     548kB
time=00:00:09.91 bitrate= 452.9kbits/sframe=  100 fps= 66 q=3.5
Lsize=     559kB time=00:00:10.00 bitrate= 457.4kbits/s dup=0 drop=193
video:407kB audio:147kB subtitle:0 global headers:0kB muxing overhead
0.858138%

The "ffmpeg -i h176_144-176_144.3gp" output:
ffmpeg version N-47982-gc5d7c7d Copyright (c) 2000-2012 the FFmpeg
developers built on Dec 19 2012 16:59:16 with gcc 4.4.3 (Ubuntu
4.4.3-4ubuntu5.1) configuration: --enable-nonfree --enable-gpl
--enable-version3 --enable-postproc --enable-libmp3lame
--enable-libopenjpeg --enable-libvorbis --enable-libopencore-amrnb
--enable-libopencore-amrwb --enable-libxvid --enable-libx264
--enable-libfaac --enable-pthreads libavutil      52. 12.100 / 52.
12.100 libavcodec     54. 80.100 / 54. 80.100 libavformat    54.
49.102 / 54. 49.102 libavdevice    54.  3.102 / 54.  3.102
libavfilter     3. 28.102 /  3. 28.102 libswscale      2.  1.103 /  2.
1.103 libswresample   0. 17.102 /  0. 17.102 libpostproc    52.
2.100 / 52.  2.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'h176_144-176_144.3gp': Metadata:
    major_brand     : 3gp4
    minor_version   : 512
    compatible_brands: isomiso23gp4
  Duration: 00:00:10.03, start: 0.023220, bitrate: 456 kb/s
    Stream #0:0(und): Video: h263 (s263 / 0x33363273), yuv420p, 176x144
[SAR 12:11 DAR 4:3], 333 kb/s, 10 fps, 10 tbr, 10240 tbn, 29.97 tbc
Metadata: handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo,
fltp, 119 kb/s Metadata:
      handler_name    : SoundHandler
At least one output file must be specified

Mediainfo 0.7.61 detect h176_144-176_144.3gp output:
General
Complete
name                            : /media/sdc1/files/dev2/testh263/h176_144-176_144.3gp
Format                                   : MPEG-4 Format
profile                           : 3GPP Media Release 4 Codec
ID                                 : 3gp4 File
size                                : 559 KiB
Duration                                 : 10s 32ms Overall bit rate
mode                    : Variable Overall bit
rate                         : 456 Kbps

Video
ID                                       : 1
Format                                   : H.263
Format profile                           : BaseLine at 1.0
Codec ID                                 : s263
Duration                                 : 10s 0ms
Bit rate                                 : 334 Kbps
Width                                    : 176 pixels
Height                                   : 144 pixels
Display aspect ratio                     : 1.222
Frame rate mode                          : Constant
Frame rate                               : 10.000 fps
Compression mode                         : Lossy
Bits/(Pixel*Frame)                       : 1.316
Stream size                              : 407 KiB (73%)
Writing library                          : FFMpeg

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 10s 32ms
Bit rate mode                            : Variable
Bit rate                                 : 120 Kbps
Maximum bit rate                         : 128 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 44.1 KHz
Compression mode                         : Lossy
Stream size                              : 147 KiB (26%)


More information about the ffmpeg-user mailing list