digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Encode, Convert for discs (https://www.digitalfaq.com/forum/video-conversion/)
-   -   Is it possible to frame serve part of a video file? (https://www.digitalfaq.com/forum/video-conversion/2555-possible-frame-serve.html)

NJRoadfan 11-14-2010 11:47 PM

Is it possible to frame serve part of a video file?
 
Just wondering if this is possible. Basically I want to frame serve part of an AVI file from frame X to frame Y to an encoder without splitting the files. Its would be easier (in theory anyway!) to create a bunch of AVISynth scripts for each video segment and do a batch encode. It'll also save me a ton of disc space and time not having to save each segment as an AVI file just to encode.

lordsmurf 11-15-2010 12:12 AM

Frame serving from what to what? In VirtualDub, you could load a file, then mark in/out your selected area. I do this all the time. As far as Avisynth goes, there is probably a way to mark the in/out via some sort of frame referencing, but I'm not entirely sure of what that is, having never done it.

You could possibly do it with this method: http://avisynth.org/mediawiki/SelectEvery

Code:

# Selects the frames 0 to 13, 280 to 293, 560 to 573, etc.
SelectRangeEvery(clip, 280, 14)

It's not direct, but workaround is possible.
If your full video is 100,000 frames, and you only want the first 20,000, then you could set it up to do:

Code:

# Selects the frames 0 to 20000, 99999-end
SelectRangeEvery(clip, 99999, 20000)

I could be wrong, but it makes sense in my head. Experiment with it.

The only other suggestion I have is to ask some of the folks in the doom9.org Avisynth forum, but be wary of attitude -- not the friendliest places for posting in the past few years, since "Mr. Doom9" stopped participating. There's also doom10.org, but can't say I'm certain of the expertise level of those members there, as I don't visit it often. Not many Avisynth users at Afterdawn or Videohelp anymore.

NJRoadfan 11-15-2010 12:08 PM

I would likely be frame serving from AVISynth, as it appears that VirtualDub can only frame serve one file segment at a time (I'm trying to automate this process). My encoder will likely be TMPGEnc, which I still have to download and play with. Hopefully it can batch encode a list of files. I'm basically looking for a solution where I can start the encode and leave it running while at work.

Whats interesting is AVISynth seems to lack a basic SelectRange command. Must be those darn programmers again, solving the complicated problems and forgetting the basic ones. A command like SelectRange(clip,startframe,endframe) would be perfect for this. I guess I'll have to play with SelectRangeEvery(), looks like it can be kludged into doing the above behavior in a roundabout way.

NJRoadfan 11-15-2010 03:00 PM

Ah-HA! got it!

The Trim command does exactly what I need.

lordsmurf 11-15-2010 06:42 PM

Excellent. :)

So how did you learn about trim() -- by reading a post or article somewhere, or scouring the Avisynth wiki?
There's more details on thr trim() command at http://avisynth.org/mediawiki/Trim

Looks pretty straight-forward. To encode frames 1 to 20,000, you'd do this:
Code:

Trim(0,20000)

NJRoadfan 11-15-2010 11:03 PM

Found it browsing the wiki. This will make converting the raw files to MPEG-2 a snap. I logged all timecode using exact frames marking the beginning and end of each chapter, so its just a matter of creating a bunch of Avisynth scripts and plugging them into TMPGEnc. From what I have read, TMPGEnc simply demuxes the audio to a WAV file? If so, that should make life easy for audio processing, just batch encode it to AC3 using ffmpegGUI.

kpmedia 11-15-2010 11:15 PM

I would suggest using the TMPGEnc Sound Editor, if you have it. FFMPEG AC3 encoding is ""unofficial" and there can be issues with unofficial AC3 encodes.

More on AC3 encoding help at http://www.digitalFAQ.com/forum/show...-ac3-1465.html


All times are GMT -5. The time now is 12:58 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.