Question

I'm using this command for ffmpeg:

ffmpeg  -i 1.h264 -i ass1.ass -map 0 -map 1 -c copy test.mkv

The h264 file is 30 fps... the mkv plays at 25fps so it runs slow

The h264 come off my hd webcam. If i change the frame rate on the camera to 25 it works fine and 15fps wilk play at high speed. I can force the frame rate? Every if i need a different command line tool to change it that is acceptable. But if i could fix it form ffmpeg that would be ideal. I'm running the commands from vb.net.

command output
C:\Record\Normal\2013-06-27>c:\ffmpeg\bin\ffmpeg  -i 1.h264 -i ass1.ass -map 0 -
map 1 -c copy test.mkv
ffmpeg version N-54207-ge59fb3f Copyright (c) 2000-2013 the FFmpeg developers
  built on Jun 25 2013 21:55:00 with gcc 4.7.3 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --ena
ble-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-l
ibopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-
amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --
enable-libxvid --enable-zlib
  libavutil      52. 37.101 / 52. 37.101
  libavcodec     55. 17.100 / 55. 17.100
  libavformat    55. 10.100 / 55. 10.100
  libavdevice    55.  2.100 / 55.  2.100
  libavfilter     3. 77.101 /  3. 77.101
  libswscale      2.  3.100 /  2.  3.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, h264, from '1.h264':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuv420p, 1920x1088 [SAR 1:1 DAR 30:17],
 25 fps, 25 tbr, 1200k tbn, 50 tbc
Input #1, ass, from 'ass1.ass':
  Duration: N/A, bitrate: N/A
    Stream #1:0: Subtitle: ssa
File 'test.mkv' already exists. Overwrite ? [y/N] y
Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf55.10.100
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1088 [SAR 1:1 DA
R 30:17], q=2-31, 25 fps, 1k tbn, 1200k tbc
    Stream #0:1: Subtitle: ssa
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #1:0 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame=  144 fps=0.0 q=-1.0 Lsize=    2451kB time=00:00:05.72 bitrate=3509.6kbits
/s
video:2447kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.125529%
Was it helpful?

Solution

Eg. To force the frame rate of the output file to 24 fps (-r):

ffmpeg -i input.avi -r 24 output.avi
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top