i'm trying to run the following line on ffmpeg that will basically "re-format" an mkv file to mp4 without doing any re-encoding and also embed srt subtitles onto the mp4 output:

ffmpeg -i test.mkv -i test.srt -newsubtitle -acodec copy -vcodec copy test.mp4

without the "-i test.srt -nwesubtitle" bit, it seems to work just fine; however, with it i get the following output:

Seems stream 0 codec frame rate differs from container frame rate: 47.95 (5000000/104271) -> 23.98 (24000/1001)

Stream #0.0(eng): Video: h264, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
Stream #0.1(eng): Subtitle: 0x0000
Metadata:
  title           : English
Stream #0.2(jpn): Audio: aac, 48000 Hz, stereo, s16
Metadata:
  title           : Japanese 2.0
Stream #0.3(eng): Audio: aac, 48000 Hz, stereo, s16
Metadata:
  title           : English 2.0
Stream #0.4(eng): Subtitle: 0x0000
Metadata:
  title           : English Songs & Signs
Stream #0.5: Attachment: 0x0000
Metadata:
  filename        : MyriadPro-Bold.ttf
Stream #0.6: Attachment: 0x0000
Metadata:
  filename        : MyriadPro-RegularHaruhi.ttf
Stream #0.7: Attachment: 0x0000
Metadata:
  filename        : ChaparralPro-BoldIt.ttf
Stream #0.8: Attachment: 0x0000
Metadata:
  filename        : ChaparralPro-SemiboldIt.ttf
Stream #0.9: Attachment: 0x0000
Metadata:
  filename        : epmgobld_ending.ttf
Stream #0.10: Attachment: 0x0000
Metadata:
  filename        : epminbld_opening.ttf
Stream #0.11: Attachment: 0x0000
Metadata:
  filename        : Folks-Bold.ttf
Stream #0.12: Attachment: 0x0000
Metadata:
  filename        : GosmickSansBold.ttf
Stream #0.13: Attachment: 0x0000
Metadata:
  filename        : WarnockPro-LightDisp.ttf
Stream #0.14: Attachment: 0x0000
Metadata:
  filename        : epmgobld_ending.ttf
Stream #0.15: Attachment: 0x0000
Metadata:
  filename        : GosmickSansBold.ttf
Stream #0.16: Attachment: 0x0000
Metadata:
  filename        : Marker SD 1.2.ttf
Stream #0.17: Attachment: 0x0000
Metadata:
  filename        : MyriadPro-Bold.ttf
Stream #0.18: Attachment: 0x0000
Metadata:
  filename        : MyriadPro-RegularHaruhi.ttf
Stream #0.19: Attachment: 0x0000
Metadata:
  filename        : MyriadPro-SemiCn.ttf

test.srt: Invalid data found when processing input

i tried adding "-r pal", "-r ntsc" or "-r 23.98" thinking it was framerate issue with no change

link|improve this question
feedback

migrated from stackoverflow.com Jul 3 '11 at 19:57

This question came from our site for professional and enthusiast programmers.

1 Answer

oh i already found the solution to this problem a while ago just never got around to posting it.

ffmpeg was calling "test.srt: Invalid data found when processing input" because it simply could not handle the srt file. i ran the -codecs options and sure enough the "srt" codec was not listed

to fix this i complied ffmpeg from source, using the configure options to enable subtitles. apparently the ffmpeg that can be found on the Ubuntu repositories is complied with subtitles turned off.

link|improve this answer
Good stuff, thanks for posting your solution here. :) – Ruairi Fullam Jul 3 '11 at 21:28
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.