Re: [Mjpeg-users] I suppose, file with no avi header

2005-12-19 Thread Norayr Chilingaryan
Thank you very much, I'll try it today at evening :)

Norayr


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] Re: rewind failed - wav-header is corrupt ??

2005-12-19 Thread Steven M. Schultz

On Mon, 19 Dec 2005, sean wrote:

> Actually, it seems I made that up. I did capture with dv2.

Hard enough debugging problems without "creative writing" in the
bug report :-) 

> So why's lav2wav busting my chops :)

Don't know.  I've never used the lav* programs with DV data - the DV
handling is less well developed than it could be.

> OK. I'll get cvs.

What version were you using?  The 1.8.0 that came out a while back?

> If I get this correctly, DV  ( NTSC? ) records video 4:1:1. 

Correct.  However "libdv" (which is what mjpegtools/lav* uses to
process DV data) mangles the data into 4:2:2 using a suboptimal
superscaling technique (replicates the chroma samples).  Then later
on that 4:2:2 data gets converted (haven't looked at the code that
handles  that - I think Matt did it and if so it's doing the best it
can with the 4:2:2 data).

> dvd mjepg2 is 4:2:0. So my present command "lav2yuv -C 422 | 
   ^
   |
   mpeg2 :)

> yuvdenoise | y4mscaler -O preset=dvd | mpeg2enc " - 
> which is the result of an info mesage from lav2yuv - 
> upsamples the dv stream - a Bad Idea.

It is necessary to re-sample from 4:1:1 to 4:2:0 (which means super
sampling horizontally but sub-sampling vertically) but the way libdv
does it (which is what the "-C 422" is doing) is not correct.

The video processing should be working ok.  It's the audio processing
(lav2wav) that was having problems  - and for that I don't know what's
going on.

>   Where does it go to 4:2:0? mpeg2enc? Or does y4mscaler take care of it?

y4mscaler's taking care of it - part of the "preset=DVD"

What you'll be able to do with the cvs version is something like:

lav2yuv -C 411 file | yuvdenoise | y4mscaler -O preset=DVD | mpeg2enc ...

as a side note 'yuvdenoise' has seen a lot of work (improvements) since
the last release so you'll get the benefit of that as well.

For DV handling ffmpeg's libavcodec has a much better DV decoder
than libdv.  Not sure anyone's got the inclination to replace 'libdv'
with 'libavcodec' in mjpegtools though.

Building the smilutils (need the cvs version, not the old 0.3.x 
releases you'll find around the net) with ffmpeg's libavcodec
is straightforward.  That gives you 'smil2yuv' and 'smil2wav' (counter-
parts to lav2yuv and lav2wav) which are much more at ease with DV
data.   The above command undergoes a simple transformation into:

smil2yuv -a output.wav -i 2 file | yuvdenoise | ...
(gives the video on stdout and creates the wave file in one command)

The other thing which just occurred to me is that if you have 
libquicktime built with ffmpeg's codecs then the new 'qttoy4m' program
should be able to (never been tested) process Quicktime files 
containing DV data.  Only thing I've tested qttoy4m and y4mtoqt with
has been uncompressed formats ('2vuy' and 'v210').

Have Fun!

Cheers,
Steven Schultz



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


[Mjpeg-users] Re: rewind failed - wav-header is corrupt ??

2005-12-19 Thread sean

Steven M. Schultz wrote:

On Mon, 19 Dec 2005, sean wrote:



I'm trying to write a script to make a dvd out of an old vhs tape.

I dvgrab'ed the tape to avi. ( dv1 - no separate audio track)



That's the problem - "dv1".  You need either dv2 or better yet
Quicktime or (IMO) even better 'raw' (but for 'raw' you'd want smil2yuv
and smil2wav).



Actually, it seems I made that up. I did capture with dv2.

So why's lav2wav busting my chops :)


Type 1 AVI files are not (well) supported.

Might be possible to use Kino to read the type 1 and write a type 2
	AVI file.  


With the recent (this weekend) changes to lav2yuv (to support "-C 411")
	the data can be processed in 4:1:1 right up to the point where 
	MPEG-2 encoding takes place.




OK. I'll get cvs.

If I get this correctly, DV  ( NTSC? ) records video 4:1:1. 
dvd mjepg2 is 4:2:0. So my present command "lav2yuv -C 422 | 
yuvdenoise | y4mscaler -O preset=dvd | mpeg2enc " - 
which is the result of an info mesage from lav2yuv - 
upsamples the dv stream - a Bad Idea.


 Where does it go to 4:2:0? mpeg2enc? Or does y4mscaler 
take care of it?




Cheers,
Steven Schultz




sean



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] rewind failed - wav-header is corrupt ??

2005-12-19 Thread Steven M. Schultz

On Mon, 19 Dec 2005, sean wrote:

> I'm trying to write a script to make a dvd out of an old vhs tape.
> 
> I dvgrab'ed the tape to avi. ( dv1 - no separate audio track)

That's the problem - "dv1".  You need either dv2 or better yet
Quicktime or (IMO) even better 'raw' (but for 'raw' you'd want smil2yuv
and smil2wav).

Type 1 AVI files are not (well) supported.

Might be possible to use Kino to read the type 1 and write a type 2
AVI file.  

With the recent (this weekend) changes to lav2yuv (to support "-C 411")
the data can be processed in 4:1:1 right up to the point where 
MPEG-2 encoding takes place.

Cheers,
Steven Schultz



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


[Mjpeg-users] rewind failed - wav-header is corrupt ??

2005-12-19 Thread sean
I'm trying to write a script to make a dvd out of an old vhs 
tape.


I dvgab'ed the tape to avi. ( dv1 - no separate audio track)

part of the script is:

lav2wav dv/$inp | mp2enc -o $out.mp2


But I get this error? message:


 lav2wav dv/scene1003.avi
+ mp2enc -o scene1003.mp2
   INFO: [mp2enc] Opened WAV file, freq = 48000 Hz, 
channels = 2, bits = 16

   INFO: [mp2enc] format = 0x1, audio length = 2147483392 bytes
   INFO: [mp2enc] SpF=672, frac SpF=0.000, bitrate=224 
kbps, sfreq=48.0 kHz

   INFO: [mp2enc] System is little endian
**ERROR: [lav2wav] rewind failed - wav-header is corrupt
Deleting quicktime codecs
   INFO: [mp2enc] Num frames 9731 Avg slots/frame = 
672.000; b/smp = 4.67; br = 224.000 kbps
   INFO: [mp2enc] Encoding to layer 2 with psychoacoustic 
model 2 is finished
   INFO: [mp2enc] The MPEG encoded output file name is 
"scene1003.mp2"

...


???

sean



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] B ... [WAS: y4mscaler: Upsampling to widescreen]

2005-12-19 Thread Mark Heath

Andrew Stevens wrote:

For the same x2 special-case asd your algorithm there is also some very 
interesting work based on ideas from some Sony researchers.   Here you again 
choose your weights dynamically based on context in which your new pixel 
appears.  However, the  weight-selection function you use constructed by a 
'learning' process. You 'train' your 'smart filter' on a huge set of training 
data (upscaling downsampled video and trying to match the original as closely 
as possible).


The results are sometimes eerily good!  


The training approach (and the larger 3x3 'context' they use) allows them to
avoid certain kinds of artefact I (suspect) your technique might have in 
common with median-like non-linear scaling filters.  The usual complaint is a 
tendency to optical 'fattening' of fine features.  Median filters also tend 
to be expensive (in HW) to get to work for fractional scale factors.  Though 
I suspect yours is quite 'friendly' in that regard.


I'm not sure how this came about but I thought about training a 
Backpropagation neural net with sample images so that it may learn what the 
missing pixels looked like from the surrounding pixels.


At first the results looked surprisingly good.  Later I discovered that the 
engine appears to be dependent on the sample images used to train it.  IE if 
there are a lot of uphill diagonal lines in the sample images, all uphill 
lines in the upsampled picture look perfectly smooth, however the downhill 
lines look excessively jaggered.  This also happens if the reverse is used to 
train the network.


I thought that it may be that I was only using a 3x3 grid (effectively 6 
pixels) so tried a 5x3 grid, which simply made things look worse.
I then went to passing the RGB values through the network at the same time 
(back to a 3x3 grid), incase they might have an effect on each other, and it 
looked promising at first but as it was trained with more images, became 
progressively worse.


The result appears no better than a box filter (as used by pamscale).

I'm not sure if this is because I have not trained it enough, or if this is 
something that has no pattern and cannot be learnt, or that I'm using the 
wrong sort of images.


I don't suppose anyone has any suggestions?

this is how I am training the network, with a 3x3 grid:

1 2 3
4 5 6
7 8 9

take pixels 1,2,3,7,8 and 9 as the inputs to the neural net, and pixel 5 as 
the output.


Mark




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] I suppose, file with no avi header

2005-12-19 Thread Bernhard Praschinger
Hallo


> I suppose, that when I pressed control+c to interrupt capturing, I
> noticed "audio task dead" message, and it may have been when it was
> with this sequence.
That should not happen. Did you notice some kind of chrash ? Have you
had that problem before ?

> # lavinfo 5.avi
> Unable to identify file (not a supported format - avi, quicktime).
> **ERROR: [lavinfo] Error opening a.avi

> anyway, I can convert the file with mencoder using -ovc copy -oac copy
> and it writes readable avi file on the output
> mencoder can't detect fps so I have to mention -ofps option too...
> But mencoder creates file with 720x480 size, I can't force it to
> create another frame rate... without convert to another format as far
> as I understand...
> So, please, help me create avi header and attach it to the file so I
> can convert this sequence too.
When mplayer can play it back, try something like that:
mkfifo stream.yuv
mplayer -nosound -noframedrop -vo yuv4mpeg anyfile.mpg &
cat stream.yuv | yuv2lav -o mjpeg_wo.avi
mplayer -vo null -ao pcm -aofile anyfile.wav anyfile.mpg
lavaddwav mjpeg_wo.avi anyfile.wav mjpeg_with_wav.avi

With that you recreate a mjpeg encoded AVI file. Which degrads the
quality a little, but that might not be important. 

I have no idea how to generate a AVI header. Maybe you find something in
the mailinglist archive. 


-- 
auf hoffentlich bald,

Berni the Chaos of Woodquarter

Email: [EMAIL PROTECTED]
www: http://www.lysator.liu.se/~gz/bernhard


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


Re: [Mjpeg-users] flushing in linux stdudio does not accept other than 0

2005-12-19 Thread dasdurfen soeinfach

 --- Bernhard Praschinger <[EMAIL PROTECTED]>
escribió:

> Hallo
> 
> > I have realized that when I use the option "flush
> > every n frames" in linux studio with other number
> than
> > 0, the program does not record any video at all. 
> This
> > does not happen with lavrec.
> Can you pleas run LVS (=Linux Videos Studio) once
> with the -d option.
> And attach the output you get in the commandline
> when you press the
> "initialize capture" button. And when you press the
> start button.
> 
> The command created worked on my machine, and it
> looked like that:
> Executing:  lavrec -i P -w -f a -d 2 -q 50 -a 16 -r
> 22050 -l -1 -R l -c
> 2 -t 10 -T 1 -n 32 -b 256 -s --use-read
> --file-flush 10 test.avi
> 
> > I want to use this option because I have problems
> with
> > recording with lavrec and compressing with
> mencoder at
> > the same time.  The point is that lavrec records
> files
> > of 128 Mb and then, mencoder compresses it and
> > afterwards, the file is removed.  I make all this
> all
> > the time with a script I have written.  The point
> is
> > that in the beginning, mencoder encodes with a
> rate of
> > 25-30 fps, but when 5 minutes or so have passed,
> the
> > rate goes to 12-14 and the hard disk begins to
> fill.
> > I would like to know if this could be a lavrec,
> > mencoder or hardware problem.
> Which version of LVS do you use ? I use the CVS
> version. 
> 
> 
> auf hoffentlich bald,
> 
> Berni the Chaos of Woodquarter
> 
> Email: [EMAIL PROTECTED]
> www: http://www.lysator.liu.se/~gz/bernhard
> 
> 
>
---
> This SF.net email is sponsored by: Splunk Inc. Do
> you grep through log files
> for problems?  Stop!  Download the new AJAX search
> engine that makes
> searching your log files as easy as surfing the 
> web.  DOWNLOAD SPLUNK!
>
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> ___
> Mjpeg-users mailing list
> Mjpeg-users@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/mjpeg-users
>

My output is as following:
 
Executing:  lavrec -i p -w -f a -d 1 -q 60 -a 16 -r
44100 -l -1 -R l -c 2 -t 10 -T 1 -n 32 -b 512
--file_flush 10 --max-file-size 30
/mnt/win_h/villa%02d.avi
FROM lavrec: lavrec: unrecognized option
`--file_flush'
FROM lavrec: lavtools version 1.6.2: lavrec

So the problem is the _ in --file_flush option

I use the 0.1.7 version.

Bye.



__ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users