[MEncoder-users] Processing FLV file on the fly
Eric Laurent
elaurent at madwaves.com
Wed Sep 19 09:33:25 CEST 2007
> Eric Laurent wrote:
>> Hello everyone,
>>
>> I would like to use mencoder to process FLV files (change key frame
>> interval, change audio format, change speed..).
>> I use a command similar to the following:
>> mencoder -quiet -speed <speed> -af channels=1 -oac mp3lame -lameopts
>> mode=3:cbr:br=64 -srate 22050 -ovc lavc -of lavf <input.flv> -lavfopts
>> format=flv:i_certify_that_my_video_stream_does_not_use_b_frames -lavcopts
>> vcodec=flv:keyint=<int>:vbitrate=300 -o <output.flv>
>>
>> If my input is a local FLV file and my output a local FLV file, every
>> thing is OK.
>> For external video content, I would like to reduce the time needed to
>> start FLV processing by doing this process on the fly instead of first
>> downloading the FLV file and
>> then doing the process.
>>
>> If I give directly the URL as input to mencoder, I get the following
>> error:
>> mencoder -demuxer +lavf -quiet -speed 0.8 -af channels=1 -oac
>> mp3lame -lameopts mode=3:cbr:br=64 -srate 22050 -ovc lavc -of lavf
>> <URL> -lavfopts
>> format=flv:i_certify_that_my_video_stream_does_not_use_b_frames -lavcopts
>> vcodec=flv:keyint=6:vbitrate=300 -o output.flv
>>
>> # MEncoder 1.0rc1-4.1.1 (C) 2000-2006 MPlayer Team
>> # CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (Family: 15, Model: 2, Stepping:
>> 5)
>> # CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
>> # Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
>> #
>> # Resolving www.youtube.com for AF_INET6...
>> # Resolving www.youtube.com for AF_INET...
>> # Connecting to server www.youtube.com[208.65.153.253]: 80...
>> # Cache size set to 320 KBytes
>> # success: format: 0 data: 0x0 - 0x0
>>
>> # libavformat file format detected.
>> # Segmentation fault.
>>
>>
>> I have also tried to use a named pipe as mencoder input, named pipe that
>> I filled with a progressive download, but then I get the following error:
>>
>> # MEncoder 1.0rc1-4.1.1 (C) 2000-2006 MPlayer Team
>> # CPU: Intel(R) Pentium(R) 4 CPU 2.80GHz (Family: 15, Model: 2, Stepping:
>> 5)
>> # CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
>> # Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
>> #
>> # success: format: 0 data: 0x0 - 0x0
>> # libavformat file format detected.
>> # Cannot seek backward in linear streams!
>> # Seek failed
>> # Cannot seek backward in linear streams!
>> # Seek failed
>> # Cannot seek backward in linear streams!
>> # Seek failed
>> # Cannot seek backward in linear streams!
>> # Seek failed
>> # Cannot seek backward in linear streams!
>> # Seek failed
>> # Cannot seek backward in linear streams!
>> # Seek failed
>> # LAVF_header: av_find_stream_info() failed
>> # ============ Sorry, this file format is not recognized/supported
>> =============
>> # === If this file is an AVI, ASF or MPEG stream, please contact the
>> author! ===
>> # Cannot open demuxer.
>>
>> # Exiting...
>>
>> Is there something I am missing?
>> Is it possible to use a named pipe as mencoder input when the container
>> format is FLV?
>> What is wrong with the direct access to the URL?
>>
>> Thanks in advance for your help.
>>
>> Eric Laurent
> Does your command line work if you wget download the file first, and
> then process it? If so, then the problem is probably with asking
> mEncoder to access the file in a serial fashion - it probably cannot
> read the headers of the file that way (just my educated guess).
> Also, in my experience, newer builds of mEncoder don't require that
> "i_certify_that_my_video_stream_does_not_use_b_frames" option any more.
> You'll still get the warning not to use b-frames with lavf output
> containers.
>
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
>
Thanks for your reply.
Yes, the command line works if I first download the file with wget.
My problem is also with the usage of a named pipe to feed the flv to
mencoder. This does not seem to work even if the file is local to my machine
and cat into the pipe (this is for test purpose of course!).
.
More information about the MEncoder-users
mailing list