Announcement

Collapse
No announcement yet.

Script to trim beginning off movie?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Script to trim beginning off movie?

    Not really a StreamFab issue, but...

    When I'm downloading from Starz and Showtime via Amazon Prime Channels, they have their own "pre-roll" of either their logo, or logo plus ad for one of their original series.

    Does anyone have a good "script" to chop off a specified number of seconds, but not re-encode? I'm looking for something where I could simply give it the file name, and number of seconds to remove, and it does it. I don't want to have to go though all the steps of opening a video editor app, select what is to be cut, trim it, and save it.

    #2
    Originally posted by KidJoe View Post
    Not really a StreamFab issue, but...

    When I'm downloading from Starz and Showtime via Amazon Prime Channels, they have their own "pre-roll" of either their logo, or logo plus ad for one of their original series.

    Does anyone have a good "script" to chop off a specified number of seconds, but not re-encode? I'm looking for something where I could simply give it the file name, and number of seconds to remove, and it does it. I don't want to have to go though all the steps of opening a video editor app, select what is to be cut, trim it, and save it.
    do you know how to use ffmpeg ?? try
    ffmpeg -ss 00:00:03 -i inputVideo.mp4 -to 00:00:08 -c:v copy -c:a copy trim_ipseek_copy.mp4
    this does not re encode the video or try - https://www.dvdfab.cn/tips/how-to-tr...im-feature.htm
    but i believe the video will be re encoded.
    Last edited by october262; 07-21-2022, 03:27 PM.

    Comment


      #3
      I realize you asked for a script, but I thought I'd throw in a couple GUI suggestions in case those pre-rolls aren't always the same length, forcing you to open the video to find the length and then adjust your script. In those cases, you might want to consider Lossless Cut or AVIDemux. Both are GUI based editors that will allow you trim and/or combine, export/import audio, etc - and neither will re-encode the video, so you won't lose any quality. I figure if you have to open the video in a player to get the length of the pre-roll, it would be quicker to open it in one of these GUI editors and make the trim right away and then review it immediately, rather than getting the length in a video player, editing the script, then running the script, then checking the output video to ensure it's what you want.
      Last edited by Dog; 07-21-2022, 04:03 PM.

      Comment


        #4
        The latest Emby Server allows you to skip the Intro. https://emby.media/community/index.p...ys-intro-skip/

        Comment


          #5
          I have shell scripts that trim at the beginning, the end and in the middle using ffmpeg. They run under cygwin but should run under linux also. I use VLC to get the trim timestamps. Let me know if you want them.

          Comment


            #6
            I use a PowerShell script to parse my files then use ffmpeg to find black out and silence points with mkvtoolnix actually doing the trimming at the nearest key frame. but I also trim the end of the forever silence from sites like Netflix.

            Comment


              #7
              Originally posted by KidJoe View Post
              Not really a StreamFab issue, but...

              When I'm downloading from Starz and Showtime via Amazon Prime Channels, they have their own "pre-roll" of either their logo, or logo plus ad for one of their original series.

              Does anyone have a good "script" to chop off a specified number of seconds, but not re-encode? I'm looking for something where I could simply give it the file name, and number of seconds to remove, and it does it. I don't want to have to go though all the steps of opening a video editor app, select what is to be cut, trim it, and save it.
              Just as october262 mentioned, ffmpeg has a command line that lets you trim out unwanted parts of a file. It doesn't re-encode, all it does is copy & remux the new part into a new file. Once you get it timed out how you want it, then you can save it as your own customized script to run. Really easy, especially if it's for the same pre-rolls such as re-using for starz or such. If you'd like some more help, PM me and I'll help you out over there.

              Comment


                #8
                Originally posted by october262 View Post

                do you know how to use ffmpeg ?? try
                ffmpeg -ss 00:00:03 -i inputVideo.mp4 -to 00:00:08 -c:v copy -c:a copy trim_ipseek_copy.mp4
                this does not re encode the video or try - https://www.dvdfab.cn/tips/how-to-tr...im-feature.htm
                but i believe the video will be re encoded.
                Didn't seem to work on my MKV files. It errored (not in front of my PC to quote it). Does it work on MP4 only?

                Comment


                  #9
                  Originally posted by KidJoe View Post

                  Didn't seem to work on my MKV files. It errored (not in front of my PC to quote it). Does it work on MP4 only?
                  it's for mp4, do you want something for MKV ?? then you might try MKVtoolnix

                  Comment

                  Working...
                  X