[FFmpeg-user] converting to h.264 using ffmpeg

sudan landge coolsudan at gmail.com
Wed May 23 08:29:39 CEST 2012


Hi all,


Could you please let me know the command to convert mp4 or any other
file to h.264 format.
>From the MAN pages of ffmpeg i found out this command :

ffmpeg -i h264.mp4 -vcodec copy -vbsf h264_mp4toannexb -an out.h264

but it gives segfault. following is a dump of the output:



sudan at sudan-desktop:~$ffmpeg -i sample_mpeg4.mp4 -vcodec copy -vbsf
h264_mp4toannexb -an out.h264
FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1.3, Copyright (c) 2000-2009
Fabrice Bellard, et al.
  configuration: --extra-version=4:0.5.1-1ubuntu1.3 --prefix=/usr
--enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib
--enable-libgsm --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib
--disable-stripping --disable-vhook --enable-runtime-cpudetect
--enable-gpl --enable-postproc --enable-swscale --enable-x11grab
--enable-libdc1394 --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 1 / 52.20. 1
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Dec 21 2011 18:37:21, gcc: 4.4.3

Seems stream 1 codec frame rate differs from container frame rate:
1000.00 (1000/1) -> 30.00 (30/1)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'sample_mpeg4.mp4':
  Duration: 00:00:04.99, start: 0.000000, bitrate: 393 kb/s
    Stream #0.0(eng): Audio: aac, 32000 Hz, stereo, s16
    Stream #0.1(eng): Video: mpeg4, yuv420p, 190x240 [PAR 1:1 DAR
19:24], 30 tbr, 30 tbn, 1k tbc
File 'out.h264' already exists. Overwrite ? [y/N] y
Output #0, h264, to 'out.h264':
    Stream #0.0(eng): Video: mpeg4, yuv420p, 190x240 [PAR 1:1 DAR
19:24], q=2-31, 90k tbn, 30 tbc
Stream mapping:
  Stream #0.1 -> #0.0
Press [q] to stop encoding
Segmentation fault


Thanks and regards,
Sudan


More information about the ffmpeg-user mailing list