From: Andy Furniss on
Tony Houghton wrote:

> I don't understand why you've had this performance problem. It's a P4
> system isn't it? Have you tried encoding straight to mpeg2video instead
> of mjpeg? Mencoder/ffmpeg's MPEG2 encoder doesn't need much CPU power.
> I've managed to encode 720x576 MPEG2 from an analogue TV card which
> didn't have its own encoder, on a modest system (IIRC it was an AMD
> "1500" of some sort, I thought it was a Duron, but there doesn't seem to
> have been such a model according to Wikipedia). I had tried DV because I
> thought the lower compression would mean lower performance demand, but I
> was completely wrong. That might have been down to disk rather than CPU
> performance though. Whatever the reason, maybe there's a similar
> unexpected performance issue with mjpeg.

Yea, there's something wrong, but it seems to be affecting mplayer as
well as mencoder - so upgrading may fix it.

Testing recently on my box I had no problems with mjpeg, dv or dvcpro50
but couldn't quite get mpeg2 + sound to work realtime.

I don't doubt it worked for you, maybe the defaults are different from
what they used to be.

The scene I tested with was complex with high motion, so I guess that
didn't help, I also wanted to keep the interlacing which needed extra
options and probably cost CPU. I was also coding to a high bitrate.

The Windows software could do on the fly but the quality - even on high
- 6mbit was not good enough for archiving - had it just been TV, I doubt
I would have cared.




From: Andy Furniss on
Davey wrote:

>> The width and height I suggested are (according to wikipedia) NTSC
>> dvd standard - so try those. Also I assume the content is interlaced
>> and using 480 height will mean you can keep the interlacing.
>
> I tried that first, and got a tall thin totally useless image!

That doesn't matter - you just need to tell mplayer the aspect

- aspect 4/3

if you later recode for DVD you will tell mencoder and anything that
plays it will expand it to 4/3 - in fact you could have added it to the
mencoder command you used for mjpeg and then mplayer would have "known"
to expand it.

From: Davey on
On Mon, 3 May 2010 16:30:18 +0000 (UTC)
Tony Houghton <h(a)realh.co.uk> wrote:

> In <hrmt27$aht$1(a)n102.xanadu-bbs.net>,
> Davey <davey(a)example.invalid> wrote:
>
> > On Mon, 03 May 2010 16:58:59 +0100
> > Andy Furniss <spam(a)andyfurniss.entadsl.com> wrote:
> >
> >> Davey wrote:
> >>
> >> > So now that I can record, apparently, successfully (I'll try a
> >> > long run later), the next stage is to turn it into a form that
> >> > can eventually be transferred to DVD.
> >> > Enough for one day, but a success!!
> >>
> >> The width and height I suggested are (according to wikipedia) NTSC
> >> dvd standard - so try those. Also I assume the content is
> >> interlaced and using 480 height will mean you can keep the
> >> interlacing.
> >
> > I tried that first, and got a tall thin totally useless image!
>
> Maybe it was trying to interlace two 480 line fields into a 960 line
> frame instead of 2x240 to 480? I don't know what interlace options you
> were using. You might also have to use the -aspect option.
>

I now post the last command line that I use, so any options are
deducible from that. In the last case:

david(a)david-laptop:~$ mencoder -vf scale=-1:-1:1,harddup -of lavf -oac
pcm -ovc lavc -lavcopts vcodec=mjpeg -ofps 30000/1001 -o testfile3.avi
tv:// -tv
driver=v4l2:norm=NTSC:device=/dev/video1:width=540:height=360:outfmt=yv12:audiorate=48000:immediatemode=0:forceaudio:adevice=/dev/dsp1:volume=2000

Any suggestions as to modifications, and their reasoning, to this are
welcomed. As I have said, this mencoder/mplayer command line is new to
me, as is doing any manipulation of a video signal. I have never
played with it before, so I have no idea what may be better than what
else. I try to learn at every twist and turn, but I need guidance from
those who know what they are doing.

I see the aspect option, I will try it.

But the last time it ran, as above, it appeared to work just fine. As
suggested earlier, I will try the mpeg2video output next time. But is
it worth spending time trying to get the width and height setup from
Wikipaedia working, when I already now have a usable output file?
--
Davey.
From: Andy Furniss on
Davey wrote:

> I see the aspect option, I will try it.
>
> But the last time it ran, as above, it appeared to work just fine. As
> suggested earlier, I will try the mpeg2video output next time. But is
> it worth spending time trying to get the width and height setup from
> Wikipaedia working, when I already now have a usable output file?

It depends if you want to make dvds for playing in a dvd player - if so
the dvd standard res would be best.

If you don't need to do that then I guess it doesn't matter. You can
always scale to change res anyway. The res you are using has an aspect
of 1.5:1 rather than 1.33:1 so is slightly stretched.

Interlacing is something else to consider - if you use height=480 then
you are getting an exact copy of the VHS, using less means that it is
scaled down which may loose quality and introduce artifacts (as the
dazzle is likely to weave two fields into a frame), though it is
possible that if you ask for < 480 the dazzle scales up one field which
should have less artifacts.

The horizontal res of VHS is quite low anyway so reducing just that
shouldn't hurt quality too much.

Interlacing is something else to consider. NTSC VHS really produces 2 x
30000/1001 fields per second but the dazzle will weave the fields
together to make 30000/1001 frames/sec this may not look too good when
there is lots of motion when played on a computer. You can de-interlace
with mplayer yadif=1 or 0 (assuming 2007 mplayer has that).

If you plan to make dvds you can keep the frames as they are and specify
when you make the mpeg2 that it is interlaced. You will need to work out
the field order, as it will look wrong otherwise. My dazzle produced top
field first. If you plan on keeping the interlacing and making "real"
DVDs you will need to check the field order by experimenting with
mplayer and yadif and -field-dominance - this could be tricky depending
on what's on the VHS so I won't bother going into detail now as you may
not be planning on making real DVDs anyway.




From: Davey on
On Mon, 03 May 2010 20:44:27 +0100
Andy Furniss <spam(a)andyfurniss.entadsl.com> wrote:

> Davey wrote:
>
> > I see the aspect option, I will try it.
> >
> > But the last time it ran, as above, it appeared to work just fine.
> > As suggested earlier, I will try the mpeg2video output next time.
> > But is it worth spending time trying to get the width and height
> > setup from Wikipaedia working, when I already now have a usable
> > output file?
>
> It depends if you want to make dvds for playing in a dvd player - if
> so the dvd standard res would be best.
>
That would be the perfect option, but strictly speaking, not necessary.
Very convenient, though.

> If you don't need to do that then I guess it doesn't matter. You can
> always scale to change res anyway. The res you are using has an
> aspect of 1.5:1 rather than 1.33:1 so is slightly stretched.
>

I can play around with that next time.

> Interlacing is something else to consider - if you use height=480
> then you are getting an exact copy of the VHS, using less means that
> it is scaled down which may loose quality and introduce artifacts (as
> the dazzle is likely to weave two fields into a frame), though it is
> possible that if you ask for < 480 the dazzle scales up one field
> which should have less artifacts.
>
I can try height >480 and <480 and see what the differences are, now I
have a Control to compare with.

> The horizontal res of VHS is quite low anyway so reducing just that
> shouldn't hurt quality too much.
>
> Interlacing is something else to consider. NTSC VHS really produces 2
> x 30000/1001 fields per second but the dazzle will weave the fields
> together to make 30000/1001 frames/sec this may not look too good
> when there is lots of motion when played on a computer. You can
> de-interlace with mplayer yadif=1 or 0 (assuming 2007 mplayer has
> that).
>

Will try this next time, also. Something else to learn about.

> If you plan to make dvds you can keep the frames as they are and
> specify when you make the mpeg2 that it is interlaced. You will need
> to work out the field order, as it will look wrong otherwise. My
> dazzle produced top field first. If you plan on keeping the
> interlacing and making "real" DVDs you will need to check the field
> order by experimenting with mplayer and yadif and -field-dominance -
> this could be tricky depending on what's on the VHS so I won't bother
> going into detail now as you may not be planning on making real DVDs
> anyway.
>
Now we're out of my knowledge area again. I won't get back to this
until I am happy with PC-DVDs.

Thanks again.
--
Davey.