MEncoder

„MEncoder is a free command line video decoding, encoding and filtering tool released under the GNU General Public License. It is a close sibling to MPlayer and can convert all the formats that MPlayer understands into a variety of compressed and uncompressed formats using different codecs.“

MEncoder. (2008, February 23). In Wikipedia, The Free Encyclopedia. Retrieved 18:57, April 5, 2008, from
http://en.wikipedia.org/w/index.php?title=MEncoder&oldid=193447614


My Blog List

Monday, May 19, 2008

Re: [MEncoder-users] Problem encoding raw video output of mencoder

On Mon, 19 May 2008, Bram wrote:

> With this patch applied to the latest svn revision (26838), I tried to
> transcode video using pipes. This results in a transcoded video stream,
> but the horizontal alignment of the result is wrong:

> # start consumer of video pipe first
> mencoder /tmp/videopipe -o "$OUT" -ofps 25 -noaspect -demuxer rawvideo
> -rawvideo fps=25:w=${WIDTH}:h=${HEIGHT}:format=i420 -nosound -ovc xvid
> -xvidencopts bitrate=800 &
>
> # demux video stream to named pipe
> mencoder -quiet -of rawvideo -ovc raw -rawvidopts pipe=6 -ofps 25 -vf
> harddup,format=i420 -nosound "$IN" -o NUL 6>/tmp/videopipe
>
> wait # waits for encoder background job to complete

The only thing that stood out when I glanced through the patch is that
you're not checking the results of write() calls. Since the I/O
primitives are interruptable, this can lead to incomplete writes.

If, in fact, that is the problem, the simplest solution is to get a FILE *
with fdopen() and use fwrite() instead. Otherwise, you have to put the
write() in a loop and keep going until your entire buffer is written
(don't forget to check for EINTR).

But why patch mencoder to accomplish the above anyway? It's perfectly
capable of writing to a named pipe using "-o" unless something has changed
since SVN 26759.
_______________________________________________
MEncoder-users mailing list
MEncoder-users@mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users

No comments:

PCBs

Links

Forex brokers, Forex online


Privacy Policy