VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. Hi all.
    I'm a newbie and I'd like to know if certain things are even possible with ffmpeg (Or any other tool you may recommend):
    I'd like to be able to take a bunch of timestamps that are in a plain txt file, and use those to grab portions of videos/audios from several media files, and save them individually.
    So for example, lets say I have 200 mpg files, and 100 mp3 files. I also have one txt file with 20 different timestamps like "13:54:00". Can I use ffmpeg to lookup the medial files for the time stamps in the text file, and create 20 different media files matching the time stamps? If so, can I state how long in minutes the newly created files would be, and name them accordingly?

    Thanks!
    Quote Quote  
  2. Don't know if this can be done with ffmpeg (in a single command anyway), but it might be doable with MKVToolNix / mkvmerge, by importing the text file as a chapter file (“Output” tab, right side) and selecting “Splitting” => “Before chapters” (“Output” tab, left side). You could run tests in MKVToolNix GUI, then get the mkvmerge command line with “Multiplexer” => “Show command line”, then write a small script based on that command (on Windows, typically a “FOR ... DO ...” loop) to process all files at once. With the split mode “Before chapters” (disclaimer : never tried it), each file should be cut from the beginning of one chapter to the beginning of the next chapter ; if you want them to start at a given timestamp but have a specific length shorter than that of the thus defined “chapter”, you could either add extra “chapters” to mark the desired end of each output file, and then select every other chapter in the “Chapter numbers” field (1, 3, 5, ...), or instead use the “By parts based on timestamps” split mode, and work the timestamps directly into the command line. Again, you can test with one file within the GUI, then once you get the intended outcome, copy the resulting command line and create a script based on it.
    (If you hover over most fields with the mouse pointer then stop moving it for about 1s, it displays a small pop-up with extra explanations.)
    Quote Quote  
  3. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    It sounds like ffmpeg can achieve this it not clear, at least to me, you have a text file with timecodes but are they just start times to start times or start time and duration or start time and end time. You say you have multiple MPG and multiple MP3 files but do you want to cut 20 different files from all 200 mpg and 100 MP3 files? It would make quite a difference to set up FFMpeg script.
    Quote Quote  



Similar Threads

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