How do I add and/or keep subtitles when converting video?

Posted by JoeSteiger on Ask Ubuntu See other posts from Ask Ubuntu or by JoeSteiger
Published on 2012-11-07T17:06:57Z Indexed on 2012/11/11 23:13 UTC
Read the original article Hit count: 336

Filed under:
|
|

I have a mkv video I want to convert to mp4, but every which way I try and convert it (Handbrake, WinFF, ffmpeg, mencoder,...I lose the video's subtitles. How can I convert the video,keeping the subtitles, or add a subtitles.srt?

I also would like 2 pass encoding with a video bitrate of 4054 and audio bitrate of 160.

Thanks.

I was asked for the ffmpeg -i:

joe@joe-Leopard-Extreme:/media/Elements/Home Folder/Videos$ ffmpeg -i iron.mkv
ffmpeg version 0.8.3-4:0.8.3-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav     developers
built on Jun 12 2012 16:52:09 with gcc 4.6.3
*** THIS PROGRAM IS DEPRECATED ***
This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
[matroska,webm @ 0x1a319a0] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'iron.mkv':
Metadata:
title           : Iron 
Duration: 02:06:01.67, start: 0.000000, bitrate: 1280 kb/s
Chapter #0.0: start 0.000000, end 546.170622
Metadata:
  title           : Chapter 00
Chapter #0.1: start 546.170622, end 1080.579489
Metadata:
  title           : Chapter 01
Chapter #0.2: start 1080.579489, end 1609.941667
Metadata:
  title           : Chapter 02
Chapter #0.3: start 1609.941667, end 2101.849733
Metadata:
  title           : Chapter 03
Chapter #0.4: start 2101.849733, end 2595.259333
Metadata:
  title           : Chapter 04
Chapter #0.5: start 2595.259333, end 3158.488667
Metadata:
  title           : Chapter 05
Chapter #0.6: start 3158.488667, end 3564.644400
Metadata:
  title           : Chapter 06
Chapter #0.7: start 3564.644400, end 4052.423356
Metadata:
  title           : Chapter 07
Chapter #0.8: start 4052.423356, end 4304.300000
Metadata:
  title           : Chapter 08
Chapter #0.9: start 4304.300000, end 4711.206489
Metadata:
  title           : Chapter 09
Chapter #0.10: start 4711.206489, end 5080.575489
Metadata:
  title           : Chapter 10
Chapter #0.11: start 5080.575489, end 5700.111067
Metadata:
  title           : Chapter 11
Chapter #0.12: start 5700.111067, end 6269.346400
Metadata:
  title           : Chapter 12
Chapter #0.13: start 6269.346400, end 6811.471333
Metadata:
  title           : Chapter 13
Chapter #0.14: start 6811.471333, end 7561.679000
Metadata:
  title           : Chapter 14
Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s (default)
Metadata:
  title           : 3/2+1
Stream #0.2(ita): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
Metadata:
  title           : 3/2+1
Stream #0.3(eng): Subtitle: pgssub (default)
Stream #0.4(eng): Subtitle: pgssub
Stream #0.5(eng): Subtitle: pgssub
Stream #0.6(eng): Subtitle: pgssub
At least one output file must be specified
joe@joe-Leopard-Extreme:/media/Elements/Home Folder/Videos

© Ask Ubuntu or respective owner

Related posts about video

Related posts about ffmpeg

  • how to install ffmpeg in cpanel

    as seen on Super User - Search for 'Super User'
    i'm using dedicated server(linux) so i need to install ffmpeg in cpanel so here ffmpeg i found in Main Software Install a Perl Module but i writing script in php so how can i install ffmpeg phpperl when i'am trying to install ffmpeg in perl module i get this response Checking C compiler… >>> More

  • FFMpeg-PHP Installation Error

    as seen on Server Fault - Search for 'Server Fault'
    While installing FFmpeg-PHP, I got this interesting error: /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioStreamId': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function) /usr/downloads/ffmpeg-php-0… >>> More

  • git problems installing stuff [closed]

    as seen on Super User - Search for 'Super User'
    root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~#… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    Hi, I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More