VideoHelp Forum




+ Reply to Thread
Results 1 to 7 of 7
  1. Member
    Join Date
    May 2006
    Location
    Poland
    Search Comp PM
    Hi,

    I made a search but I didn't find any similar problem here.

    My problem is - I'm looking for a cheap (<100$) software which can convert a MPG file to sequence of jpg's with dedicated frame rate (10/sec). Important is that the program should resize the picture before save (eg. 160x120) and all should be automated in batch process. Each JPG's from MPG should be saved in separate folder.

    Does anyone of You made something like this before ? I'm looking for a software from 2 days and I can't find (except Adobe After Effect but it costs a loooot of money) ...

    Help mates, please.

    Lisi
    Multimedia
    Quote Quote  
  2. Member mats.hogberg's Avatar
    Join Date
    Jul 2002
    Location
    Sweden (PAL)
    Search Comp PM
    Quite doable with virtualdubmod - don't know if it's possible to do it to JPG, but if not, it's simple to batch convert after.
    <edit>No, "just" png, bmp & tga</edit>
    /Mats
    Quote Quote  
  3. AviSynth's ImageWriter command can do it easily and for free. It's going to write them all to one folder, though, I think, but that shouldn't be a problem for you:

    http://avisynth.org/ImageWriter

    Before the ImageWriter command to write them all, use theChangeFPS command to get it to write them at 10fps, and the Crop (maybe) and Resize commands to resize it to the resolution you like.

    Edit: I was just testing this out. Works fine. It looks to me that VDub itself can only save to BMP, TARGA, and PNG, although they can be batch converted to JPG easily enough in a picture editor. I used this script:

    LoadPlugin("C:\Path\To\DGDecode.dll")
    MPEG2Source("C:\Path\To\Video.d2v")
    Trim(39813,40812)#Testing on 1000 frames
    Crop(8,0,-8,0)#Crop
    LanczosResize(160,120)#Resize
    ChangeFPS(10)#Conversion to 10fps by selecting 40% of frames
    ConvertToRGB24()#required for JPG
    ImageWriter(file="I:\Images\test",type="jpg")#Save Folder and image type

    Open that script (adjusted for your names and paths) in VDubMod, and go File->Save As...

    It saved 400 JPGs, numbered consecutively. I'm assuming you're converting from 25fps to 10fps by dropping 60% of the frames. If you just want to slow it down to 10fps, without losing any frames, then you replace the ChangeFPS line with AssumeFPS(10).

    I chose the XviD codec and saved an (unplayable) XviD also. Otherwise it saves an (unplayable) uncompressed AVI, along with the pics.
    Quote Quote  
  4. Member
    Join Date
    May 2006
    Location
    Poland
    Search Comp PM
    ... super! This hint is very usefull !! Thank You for that ... ))

    ... but I have one more thing to do with this. I need to save each JPGs with max. 4 kb file size (4000 bytes) and the size should be near that 4kb as it is possible (3800-4000 bytes) ... is this possible to do it ? ...
    Multimedia
    Quote Quote  
  5. Mine originally were mostly 17-20 KB each. I switched to a BilinearResize and added a slight blur and got them down to 14-15 KB. But my scene was constant movement, and the sizes you get are partly dependent on the complexity of the video. Using AviSynth, you can't choose the quality or amount of compression of the JPGs. You could run them through an image editor afterwards, and lower their quality. 4 KB each is pretty small, you know. Just as a test I saved them as black frames and they were all under 1 KB (949 bytes), so I guess it's possible.

    As an experiment, I kept the BilinearResize and removed the Blur filter and afterwards ran them through the batch converter of PhotoFiltre and gave them a JPG quality of 60% and got them all the size you want. It can be done pretty easily. But if you're serious about needing one folder for each pic, I don't know of a way to set that up. Maybe it can be done, but others will have to help out. If you go the AviSynth route, and decide you need to shrink the size from what you get, you can also save them originally to BMP, TGA, or PNG, before then converting them to the smaller sized JPGs.

    If you're not experienced with AviSynth, then mats.hogberg's earlier suggestion of using VDub for the job might be the way to go. It can also do the cropping, resizing, and framerate conversion, as well as saving as images.
    Quote Quote  
  6. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    I still don't understand what the goal is...

    Old TMPGenc has the ability to save to a jpeg image sequence with set compression.
    It would save a step or two.
    So you resize/process in avisynth. Kill the imagewriter line.
    Import avs into Tmpg, save as jpeg sequence with required compression (for me it was ~70%).

    But if you're serious about needing one folder for each pic,
    You could create a batch file in the folder with your images, if indeed each frame needs a folder of it's own.
    Code:
    for %%a in (*.jpg) do (mkdir Folders\%%~na)
    for %%b in (*.jpg) do (move %%b Folders\%%~nb)
    (crude i guess)

    I chose the XviD codec and saved an (unplayable) XviD also. Otherwise it saves an (unplayable) uncompressed AVI, along with the pics.
    unplayable?

    btw what is it exactly you want to do?
    Quote Quote  
  7. Member
    Join Date
    May 2006
    Location
    Poland
    Search Comp PM
    ... I forgot to explain what I had on my mind when I told "4kb" ... i means that I need a output file after resize to 160x120 near "4kb" ...
    Multimedia
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!