PDA

View Full Version : Encoding on the fly satellite shows


RobbyRally
11th February 2010, 22:50
Hi!

I use Dvbviewer recordingservice for record my sat tv in TS format. I want trascoding in h264 on the fly. For now i use mencoder but the problem is that i must put a delay that depends from the lenght of show, because my computer PhenonII X3 is capable of 37 f/s the show in Italy is 25 f/s so after few second the trascoding arrive to the end of show and stop it. All the process in automated from Dirmon2. i don't use the Tv in mencoder but the file that recordingervice is recording to hard disk, because for set recording i want use webservice.

I want know if is possible put a "buffer" in mencoder that allows remove delay.

Here there is my bat file.

Thanks! :)


SET mencoderpath="C:\Users\HTPC\Desktop\CREA X264 FILE\Mencoder\mencoder.exe"
SET mkvmergepath="C:\Users\HTPC\Desktop\CREA X264 FILE\MKVtoolnix\mkvmerge.exe"
SET infile=%1
SET secondi=120
SET outdir="E:\REGISTRAZIONI SATELLITE\


TOGLIE APICI
SET nomeinfile=%~n1

Delay of 1 Hour
ping -n 3601 127.0.0.1 >NUL


%mencoderpath% %infile% -ovc x264 -x264encopts crf=20:threads=auto -oac copy -o %outdir%%nomeinfile%.avi"

ping 127.0.0.1 -n %secondi% -w 1000 > nul


%mkvmergepath% -o %outdir%%nomeinfile%.mkv" %outdir%%nomeinfile%.avi"


ping 127.0.0.1 -n %secondi% -w 1000 > nul


DEL %outdir%%nomeinfile%.avi"


ping 127.0.0.1 -n %secondi% -w 1000 > nul

Dark Shikari
11th February 2010, 23:34
This is what pipes are for. With a pipe, the encoder will block until it receives more frames.

RobbyRally
12th February 2010, 15:21
How can i add the pipe on mencoder. i'm tryning with this:

"E:\REGISTRAZIONI SATELLITE\A proposito di SchmidtRetequattro.ts" | "C:\Users\HTPC\Desktop\CREA X264 FILE\Mencoder\mencoder.exe" -ovc x264 -x264encopts crf=20:threads=auto -oac copy -o "E:\REGISTRAZIONI SATELLITE\Grand.ts"


but don't work. When launch it windows pop-up appears for select the player for play the show and if i select for example VLC the output is

MEncoder Sherpya-MT-SVN-r30521 (C) 2000-2010 MPlayer Team
SSE2 supported but disabled
No file given

Exiting... (error parsing command line)

RobbyRally
12th February 2010, 17:05
If i use this one:


C:\Users\HTPC>"C:\Users\HTPC\Desktop\CREA X264 FILE\Mencoder\mplayer.exe" -vo yuv4mpeg "E:\REGISTRAZIONI SATELLITE\Smallville_02-12_15-58-18_Italia 1.ts" | "C:\Users\HTPC\D
esktop\CREA X264 FILE\Mencoder\mencoder.exe" -ovc x264 -x264encopts crf=20:threads=auto -oac copy -o "E:\REGISTRAZIONI SATELLITE\Grand.ts"

it create a file "stream.yuv" very large 8GB and nothing happen.


also without "-vo yuv4mpeg" nothing happen

Dark Shikari
12th February 2010, 20:21
Because you're not outputting to the pipe, you're outputting to "stream.yuv", which isn't a FIFO.

RobbyRally
13th February 2010, 00:02
But how can i create a FIFO in windows? I'm searching to google a lot but don't find a solution :helpful:

Dark Shikari
13th February 2010, 00:29
But how can i create a FIFO in windows? I'm searching to google a lot but don't find a solution :helpful:Use Cygwin.