# Trying to use RTranscoder to playback video on Win32 - sample code?

**URL:** <https://www.ruby-forum.com/t/trying-to-use-rtranscoder-to-playback-video-on-win32-sample-code/157431>\
**Category:** Ruby\
**Created:** [January 11, 2009, 8:26am UTC](https://www.ruby-forum.com/t/trying-to-use-rtranscoder-to-playback-video-on-win32-sample-code/157431 "2009-01-11T08:26:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rua\_HM](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/58f4c7/32.png) [@Rua\_HM](https://www.ruby-forum.com/u/Rua_HM)\
**Post date:** [January 11, 2009, 8:26am UTC](https://www.ruby-forum.com/t/trying-to-use-rtranscoder-to-playback-video-on-win32-sample-code/157431/1 "2009-01-11T08:26:51Z")

</div>

I’m trying to use RTranscoder ([http://rtranscoder.rubyforge.org/](http://rtranscoder.rubyforge.org/)) to  
play back video files full screen on windows. I have installed  
RTranscoder and its dependencies (in particular RProgram) via gem and  
also installed a version of mplayer (SMPlayer).

I can’t find any examples of how to start a video file playing; I have  
had a stab at getting things working and it’s not clear whether I’m  
going about it the wrong way or if RTranscoder is not fully supported  
on Windows.

Here’s my attempt at getting a file to play:  
require ‘rubygems’  
require ‘rprogram’  
require ‘rtranscoder/version’  
require ‘rtranscoder/ffmpeg’  
require ‘rtranscoder/mplayer’

include RTranscoder

mooplayer = RTranscoder::MPlayer.new(“C:/Program Files/SMPlayer/  
mplayer/mplayer.exe”)

mooplayer.play(:media =\> “X:/Video/MTV’s Downtown/MTVDT01.mp4”)

This is the error that i get:  
`popen3’: popen3() arg 2 must be ‘t’ or ‘b’ (ArgumentError)

Note that I installed at made a slight change to RProgram due to the  
fact that open3 is not supported on Win32; I installed win32-open3 and  
changed the for it in rprogram.rb to require ‘win32/open3’.

Can someone point me to some example code to play a video file using  
RTranscoder::MPlayer on windows?

Thanks in advance  
Rua HM.
