Git Product home page Git Product logo

Comments (7)

tieleman avatar tieleman commented on July 21, 2024

Hi Mahesh,

Could you post an example command you would normally use in ffmpeg?

from codem-transcode.

patademahesh avatar patademahesh commented on July 21, 2024

Sure, here is the command:

ffmpeg -threads 8 -ss 10 -i input.mp4 -f image2 -vf "thumbnail=10,scale=120:96,tile=12x10" -pix_fmt yuvj420p -an -vsync 0 -y output-120x69-thumb-%03d.jpg

Thanks,
Mahesh

from codem-transcode.

patademahesh avatar patademahesh commented on July 21, 2024

I tried to create preset using above command but it creates separate image for each thumb. I think it is because of codem does not supports tile and scale options in thumbnail.. ??

Note: specified output-120x69-thumb-%03d.jpg in output file name.

Thanks,
Mahesh

from codem-transcode.

tieleman avatar tieleman commented on July 21, 2024

Hi Mahesh,

It seems to work for me using this command to create a job:

curl -d '{"source_file": "/path/to/input.mp4","destination_file":"/path/to/output-120x69-thumb.jpg","encoder_options": "-ss 10 -threads 8 -f image2 -vf thumbnail=10,scale=120:96,tile=12x10 -pix_fmt yuvj420p -an -vsync 0 -y"}' http://localhost:8080/jobs

You're also using %03d for interpolation, but I don't think filename interpolation is needed here, is it? Anyway, can you verify this works for you?

from codem-transcode.

patademahesh avatar patademahesh commented on July 21, 2024

Hi tieleman,

Sure i'll try this way. But the thing is thumbnail=10 is dynamic value, which tells after every n number of frames it should take snaps. We do calculations and decide this. But in codem we can specify after specific seconds we can take snaps(eg. 10 sec). I want to use that feature of codem and create sprite image.

Thanks for your response.

Mahesh

from codem-transcode.

tieleman avatar tieleman commented on July 21, 2024

Ah, that is currently not possible using a thumbnail job. Alternatively, If you need to know details about your input file to calculate the thumbnail parameter for the sprite image you can use a probe job to get file information (this will tell you the frame rate of the input video). Then, if you know the frame rate of your input file (for example 25 fps) you could use thumbnail=250.

from codem-transcode.

patademahesh avatar patademahesh commented on July 21, 2024

Ok. I'll do this way only. Thanks for your valuable inputs.

Mahesh

from codem-transcode.

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.