Code Monkey home page Code Monkey logo

Comments (4)

clsid2 avatar clsid2 commented on August 17, 2024

This isn't a bug. The subtitle timestamps are just slightly wrong.

Extracted sub is like this:

1
00:00:00,001 --> 00:00:01,001
1...

2
00:00:01,001 --> 00:00:02,001
2...

The video is just 1 fps. So first frame has timestamp 0.000, second 1.000, etcetera. Subtitles start one milisecond later, which in this case means a frame later (1 second). You can fix it by letting the subs start at exactly 0.000. The weird end times might be due to a rounding error in MkvToolNix.

from mpc-hc.

dmak avatar dmak commented on August 17, 2024

Thanks for reply. Correcting the start ms in SRT to .000 had solved the problem. However I wonder would it be more logical to round the time of the subtitle frame (and not ceil it)?

Also excuses for offtopic, I would be also interested about how to generate 25 FPS video from images using ffmpeg? Perhaps you can give a hint. I've tried ffmpeg -framerate 1 -i image_%d.png -r 25 -vcodec libx264 demo.mkv but that produces 1 FPS video.

from mpc-hc.

clsid2 avatar clsid2 commented on August 17, 2024

For rounding issue you need to go to MkvToolNix.

Try -framerate 25 instead of -framerate 1 -r 25

from mpc-hc.

dmak avatar dmak commented on August 17, 2024

I have created mkvmerge issue #2394.

Also thanks for the hint with ffmeg. Now video is 25 fps:

Input #0, image2, from 'image_%d.png':
  Duration: 00:00:00.40, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb48be(pc), 400x400, 25 fps, 25 tbr, 25 tbn, 25 tbc

but the 10 input images are now played with 25 fps, thus all video is played in 10/25 seconds, while I need 10 seconds video. In other words, there is no image "duplication" (see this post).

from mpc-hc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.