Re: A tool to extract part of a video



On Sat, 18 Aug 2007, David Bolt wrote:-

On Fri, 17 Aug 2007, Hatto von Aquitanien wrote:-

<Snip>

Any ideas?

Well, you could try:

ffmpeg -ss 00:28:30.000 -t 00:06:45.000 -vcodec mpeg4 -vtag xvid -i
V08546-22.flv V08546-22.avi

which should do the job.

Should, but doesn't. The video stream is correctly cropped out, but the
audio stream isn't. However, using these commands will work:

ffmpeg -i V08546-22.flv -vn -f s16le -acodec pcm_s16le -ac 2 -ar 22050 -ss 00:28:30.000 -t 00:06:45.000 - >audio
ffmpeg -i V08546-22.flv -an -f yuv4mpegpipe -ss 00:28:30.000 -t 00:06:45.000 - >video
ffmpeg -f s16le -acodec libmp3lame -ac 2 -ar 22050 -i audio -f yuv4mpegpipe -vcodec mpeg4 -vtag xvid -sameq -y V08546-22.avi
rm audio video

You will need a large space for the video file as it's the raw video
and, in my tests, ended up close to 1.4GB.

Alternatively, you can use a couple of named pipes and three consoles to
do the job[0] and not need a large amount of free drive space. To do
this, these steps should do nicely:

1, open up three separate consoles and change directory to that
containing V08546-22.flv ;

2, in one of the console windows type the commands "mkfifo audio" and
"mkfifo video" ;

3, using the first console, enter the following command:

ffmpeg -i V08546-22.flv -vn -f s16le -acodec pcm_s16le -ac 2 -ar 22050 -ss 00:28:30.000 -t 00:06:45.000 - >audio

4, using the second console, enter the following command:

ffmpeg -i V08546-22.flv -an -f yuv4mpegpipe -ss 00:28:30.000 -t 00:06:45.000 - >video

5, using the third console, enter the following command:

ffmpeg -f s16le -acodec libmp3lame -ac 2 -ar 22050 -i audio -f yuv4mpegpipe -vcodec mpeg4 -vtag xvid -sameq -y V08546-22.avi

6, once the AVI is built, delete the pipes "audio" and "video", unless
you're going to use them for other transcoding.


[0] According to an example given in the ffmpeg FAQ, it's possible to do
this with only one console, however all that happened when I tried is
the two jobs sent into the background stopped and waited for me to bring
them into the foreground.

Regards,
David Bolt

--
Member of Team Acorn checking nodes at 100 Mnodes/s: www.distributed.net
RISC OS 3.11 | SUSE 10.0 32bit | SUSE 10.1 32bit | openSUSE 10.2 32bit
RISC OS 3.6 | SUSE 10.0 64bit | SUSE 10.1 64bit | openSUSE 10.2 64bit
TOS 4.02 | SUSE 9.3 32bit | | openSUSE 10.3a6 32bit
.



Relevant Pages

  • RE: DLL error prevents me from using Windows...please help...
    ... I tried to open Rcovery Console through SAFE MODE W/ COMMAND ... I'm attempting the Recovery Console EXPAND feature, ... >> I don't have video on my motherboard. ...
    (microsoft.public.windowsxp.general)
  • Re: Problem booting VMS CD on Alpha PWS 500au
    ... As for the video issue - I think I'll just pull the card and use the ... initializing page table at 1e2000 ... Twisted-Pairmode set by console ...
    (comp.os.vms)
  • Re: A tool to extract part of a video
    ... audio stream isn't. ... You will need a large space for the video file as it's the raw video ... 3, using the first console, enter the following command: ... 4, using the second console, enter the following command: ...
    (alt.os.linux.suse)
  • Re: OT: Xbox 360, any equivalent PC video cards yet?
    ... If the below is true the Xbox video ... hardware spec is frozen for the life of the console. ...
    (comp.sys.ibm.pc.games.action)
  • Re: finding a fax in the fax console?
    ... The command line is for the Open command for TIF files. ... > I am still unable to view any faxes from the console. ... >>>>Inbox to the Outlook Inbox. ...
    (microsoft.public.outlook.fax)