Page 1 of 1
How to extract a clip from a file?
Posted: 04 Feb 2007 18:54
by Beast Of Bodmin
Using VLC 0.8.6a
I stumbled upon the Streaming/Exporting Wizard.
But I can't work out how to tell it to only extract a certain part of a file. I have tried to RTFM but have not found anything. Also I searched the forum and found nothing.
I do
File > Streaming/Exporting Wizard > Transcode/Save to file >
Select a stream
and under "Partial Extract" I am asked for From and To values.
I have tried various combinations but I haven't cracked it.
So, for example, how do I specify
The first 90 seconds
The first 90 minutes
From 43 seconds to 82 minutes and 4 frames?
Re: How to extract a clip from a file?
Posted: 25 Nov 2007 02:23
by luckyluk
I too would like to know how to do this. I hope someone who knows will respond to this.
Re: How to extract a clip from a file?
Posted: 25 Nov 2007 02:42
by luckyluk
I tried the same thing. I saw that we are supposed to enter the From and To values in seconds. When I do this, it saves a new file from the beginning to somewhere just before my from time.
Re: How to extract a clip from a file?
Posted: 25 Nov 2007 12:58
by Arite
Well (response to first question) the "From" and "To" are defined in seconds. Hence for 90 mins it would 90 * 60 = 5400.
For 43 seconds to 82 mins and 4 frames, it would be "43" for "From", and (82 x 60) + 4/25 (assuming 25fps) = "4920.16" for "To".
I tried the same thing. I saw that we are supposed to enter the From and To values in seconds. When I do this, it saves a new file from the beginning to somewhere just before my from time.
What format is the video, and what format are you transcoding to (or are you just duplicating it)?
Arite.
Re: How to extract a clip from a file?
Posted: 26 Nov 2007 01:17
by luckyluk
What format is the video, and what format are you transcoding to (or are you just duplicating it)?
Arite.
The file is a .avi and I tried transcoding just the container to MPEG 1. I would like to just duplicate it (the portion i want to extract anyway), but I didn't see any option for transcoding to AVI.
Re: How to extract a clip from a file?
Posted: 28 Nov 2007 22:09
by Arite
The AVI muxer is broken (from what I can remember anyway), however muxing to MPEG-TS should produce an *.mpg file that is playable in VLC.
For the video and audio codecs - just leave them unticked, thay way the video/audio will just be duplicated. If that does not work still try transcoding to e.g. "mp2v" for video and e.g. "mp3" for audio. IF VLC is able to playback the file then it should be able to stream to a file.
Cheers, Arite.
Re: How to extract a clip from a file?
Posted: 26 Jan 2008 20:18
by luckyluk
The AVI muxer is broken (from what I can remember anyway), however muxing to MPEG-TS should produce an *.mpg file that is playable in VLC.
For the video and audio codecs - just leave them unticked, thay way the video/audio will just be duplicated. If that does not work still try transcoding to e.g. "mp2v" for video and e.g. "mp3" for audio. IF VLC is able to playback the file then it should be able to stream to a file.
Cheers, Arite.
Well, I tried both of these methods and they both produced a new file, but the same problem exists. I also tried it on an .mpg file. It copies from the beginning of the original file to just before my From time. Any other ideas?
Re: How to extract a clip from a file?
Posted: 27 Jan 2008 02:30
by Arite
Are you using the Wizard? If so, instead you could try using the "Stream output" window instead.
Go to:
File >> Open File...
And press "Browse..." to select a file. Then in the "Customise:" box enter:
Code: Select all
"C:\Temp\Test.avi" :start-time=START_TIME :stop-time=STOP_TIME
Where "C:\Temp\Test.avi" is the location of the file, START_TIME is the starting time in seconds, and STOP_TIME is the stop time in seconds. If you then press "OK" it should start and finish playback of the file at those specified times.
Then after setting the start/stop times in the "Customise:" box tick the "Stream/Save" and select "Settings...". If you just want to duplicate the audio/video then just tick the "File" tickbox and enter/browse for the target filename (e.g. "C:\Temp\OUT.mpg"). Then press "OK" and "OK" again.
Then playback the new file - should be just be the specified time range.
Cheers, Arite.
Re: How to extract a clip from a file?
Posted: 27 Jan 2008 04:15
by luckyluk
Are you using the Wizard? If so, instead you could try using the "Stream output" window instead.
Go to:
File >> Open File...
And press "Browse..." to select a file. Then in the "Customise:" box enter:
Code: Select all
"C:\Temp\Test.avi" :start-time=START_TIME :stop-time=STOP_TIME
Where "C:\Temp\Test.avi" is the location of the file, START_TIME is the starting time in seconds, and STOP_TIME is the stop time in seconds. If you then press "OK" it should start and finish playback of the file at those specified times.
Then after setting the start/stop times in the "Customise:" box tick the "Stream/Save" and select "Settings...". If you just want to duplicate the audio/video then just tick the "File" tickbox and enter/browse for the target filename (e.g. "C:\Temp\OUT.mpg"). Then press "OK" and "OK" again.
Then playback the new file - should be just be the specified time range.
Cheers, Arite.
Well, I got slightly different results this time. Instead of duplicating the original file from the beginning to just before the start time, now it duplicates it from the beginning to the stop time. At least the stop time is working this way, but it is ignoring the start time all together. I appreciate you helping me with this.
Luke
Re: How to extract a clip from a file?
Posted: 27 Jan 2008 15:45
by Arite
So when you just playback the file (i.e. not ticking the "Stream/Save" tickbox etc.) does it playback from the beginning also?
Ensure the MRL code is correct - you could try with a different file (e.g. an *.mp3 just to test it):
For example, entering:
Code: Select all
"C:\Temp\Test.mp3" :start-time=20 :stop-time=30
Into the "Customise:" box and pressing "OK" should play "C:\Temp\Test.mp3" from 20 seconds in until 30 seconds in.
It is possible that VLC is not detecting the correct length of the file (sometimes reported as being "0:00:00") making it diffucult to seek etc. - does the VLC display the correct length and display the correct position time?
Arite.