[MPlayer-users] Using mencoder to join two files and FFMEPG to create a compliant WMV file.
Sergio
sergio at mdfactory.com
Tue May 8 13:10:57 CEST 2007
Hi all and thanks for reading.
I've been a FFMpeg user and never had too much problem with it.
Problem is that now I have to work with WMV, Windows Media Player and
Internet Explorer. Yes, I also find them quite "annoying", but it's my
clients specifications...
I've got a problem with ffmpeg/mencoder while trying to convert a video
file to a valid, compliant WMV file:
- I'm able to create .WMV with FFMpeg.
- The files I create can be seen with Windows Media Player9.
- They can also be seen in Internet Explorer if they are put as embedded
object in a HTML file.
For example, if you download this file
(http://wap.mdfactory.com/mdf/golesmovistar/terra/320_052_320X240X200_aux.wmv)
you wll be able to reproduce it with Windows Media Player an MPlayer.
In this page
(http://wap.mdfactory.com/mdf/golesmovistar/terra/verVideo.php) i've put
the file as an embedded object in a HTML. There are no problems to play it.
Problem is that my client want to serve these files in streaming mode
(not embedded in html).
When I try to watch this files from the streaming server, there is a
point in the stream where Windows Media Player stops playing it.
If I open the streaming URL, Windows Media Player reports C00D2F05 error
to me.
The URL to wath a video this way is, for example
http://multimedia.terra.es/viewer/portada.cfm?cod_media=66208&mapnivel1=DPO
.
The URL that acually serves the stram is
mms://stream2.terra.es/multimedia/video/deportes/arvatomobile/200704/A61.320052320X240X200aux.wmv
So, I think that the WMV files I got from the transcode process are
valid, but not compliant enought to be readed from the process that
streams the content.
The process I follow to create the WMV files is this:
-I receive to files. I have to make a video resulting of the
concatenation of the two files. In order to do that, I convert the two
files to raw video and join them using mencoder.
The mencoder command I use is this:
mencoder -nosound -idx -ofps 25 -ovc raw -lavcopts
vcodec=raw:vmax_b_frames=0:vb_strategy=1 file1_raw.avi file2_raw.avi -o
join.avi:
So, I think the video file I get, is not compressed with any codec, and
I think has no b-frames.
-Next, I compress the resulting file into WMV:
ffmpeg -an -r 25 -s 480x360 -i join.avi final.wmv
The file.wmv is the one which presents the problems I told. It usually
stops been streamed near the point where the join is done.
Other ways to make the conversion to WMV i've tried are these ones:
mencoder join.avi -o final.wmv -oac lavc -ovc lavc -lavcopts
vcodec=wmv2:acodec=mp3
Whith this, I get a WMV that works ok in MPlayer. Problem is that when I
try to play it on Windows Media Player, it appears a message telling me
that the format of the file doesnt correspond to its extension. When i
click ok to this message the video is played well anyway.
I've also tried:
mencoder join.avi -o final.wmv -oac lavc -ovc lavc -lavcopts
vcodec=wmv2:acodec=mp3 -of lavf -of lavf -lavfopts
i_certify_that_my_video_stream_does_not_use_b_frames
With this, when opening the resulting video Windows Media Player doesnt
give me the message anymore but when playing the video in some points it
gets stuck with one or more frames. The audio goes on well but some
frames last for 2-3 seconds so that the video is totally bad.
I'm using mencoder and ffmpeg in a Debian box. FFMpeg config is:
FFmpeg version SVN-rUNKNOWN, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-mp3lame --enable-amr_nb
libavutil version: 49.0.0
libavcodec version: 51.11.0
libavformat version: 50.5.0
built on Jan 23 2007 16:55:09, gcc: 3.3.5 (Debian 1:3.3.5-13)
What can be happening? Do you think the problem is in the video join, or
in the conversion to WMV??
Do you think that the WMV generated by FFMpeg are good enough? Perhaps i
have to compile ffmpeg in any special way to have good WMV support?
I dont like working in this WMV format, but it's for laboral purposes
and this are the specifications...
Thank you very much. Any suggestion will be very appreciated.
More information about the MPlayer-users
mailing list