Re: [Mjpeg-users] Video-encoding questions (mostly DVD related)

2003-01-19 Thread Gregoire Favre
On Sun, Jan 19, 2003 at 07:36:08AM +0100, Bernhard Praschinger wrote:

Hello ;-)

 As I wrote in the mail shortly before you should not use the -M switch
 (or any other spliting by mplex). If you multiplex a DVD the -M switch
 was deactivated because it generated several files. The -M option does
 not generate valid MPEG streams.
 
 You should use the -S -B option of mpeg2enc for spliting videos. 

Does that mean I could split some of my really big mpeg2 files with that
option (I don't want to recode it...)?

Thank you very much,

Grégoire

http://ulima.unil.ch/greg ICQ:16624071 mailto:[EMAIL PROTECTED]


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] mplex with seek

2003-01-19 Thread Tim Hewett
Hello,

The video is encoded by the broadcaster, not me. I have
a digital TV receiver connected to a PC which has software
which can record the digital TV MPEG2 stream to its hard
disk. With a quick demux/remux the recordings can be put onto
DVD with no MPEG transcoding at all, i.e. the DVD contains
the original broadcast MPEG2 video and MP2 audio. The
trouble is that the PC software uses an ordinary clock timer to
start and stop the recording, like a normal VHS VCR, so there
is usually extra unwanted video at the start and end. The
mplex tool lets you chop unwanted material off the end with
the -l option but I can't find a way to have the multiplexed
output start from n seconds into the streams being muxed.
The fact that mplex can segment the input streams into multiple
standalone muxed files (e.g. for splitting across CDs)
demonstrates that the principle is possible.

For me there is no problem with the edit being done on GOP
boundaries (as I guess happens with the existing segmentation
facility), I don't need frame-accurate editing. All I am looking to
do is to archive my favourite programmes to DVD instead of
VHS, nothing any more sophisticated, so no intelligent mid-GOP
sequence start is required.

Any help/direction would be very much appreciated.

Regards,

Tim Hewett.

On Sunday, Jan 19, 2003, at 06:21 Europe/London, Bernhard Praschinger 
wrote:

Hallo


I am wondering if there is a way to use mplex such that it starts from
n seconds into the audio and video sources given to it. At present
it can be made to mplex n seconds of material from the start of
the audio and video sources but is there a way to perform a simple
kind of editing to cut superfluous material from both the start and 
end?
No.

You should edit the video BEFORE encoding it.

Some have tired writing a programm to edit MPEG streams. But it does 
not
work reliable.

auf hoffentlich bald,

Berni the Chaos of Woodquarter

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




---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] DivX to VCD

2003-01-19 Thread Stephen Mollett
On Sunday 19 Jan 2003 09:36, Jacob Visser wrote:
 Im trying to convert a DivX File to VCD Iv been trying to use
 mjpegstools but I dont seem to be able to...
 I am hoping that MJPEGTOOLS can do it, but if they cant then can someone
 please let me know what to use...

Mjpegtools only handles MJPEG-encoded AVIs. You need to use mencoder 
(www.mplayerhq.hu) or transcode 
(www.Theorie.Physik.UNI-Goettingen.DE/~ostreich/transcode/). There are 
probably other options too.

Stephen


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



[Mjpeg-users] Adobe Premiere

2003-01-19 Thread Derek Fountain
This is bordering on flamebait, but... :o)

Has anyone used the output of the MJPEG tools as input to Adobe Premiere? 
Other than as an already encoded mpg or avi that is?

-- 
Australian Linux Technical Conference 2003: http://www.linux.conf.au/

Explain to your boss the benefits of you going...


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] mplex with seek

2003-01-19 Thread Bernhard Praschinger
Hallo

 The video is encoded by the broadcaster, not me. I have
 a digital TV receiver connected to a PC which has software
 which can record the digital TV MPEG2 stream to its hard
 disk. With a quick demux/remux the recordings can be put onto
So you have a signal from a digital satelite ?

[...]

 For me there is no problem with the edit being done on GOP
 boundaries (as I guess happens with the existing segmentation
 facility), I don't need frame-accurate editing. All I am looking to
 do is to archive my favourite programmes to DVD instead of
 VHS, nothing any more sophisticated, so no intelligent mid-GOP
 sequence start is required.
Then you might be interrested in gopchop:
http://outflux.net/unix/software/GOPchop/

As far I know the programm works well if you have a SW player. It works
not good with HW-devices.

auf hoffentlich bald,

Berni the Chaos of Woodquarter

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


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] Video-encoding questions (mostly DVD related)

2003-01-19 Thread Bernhard Praschinger
Hallo

  As I wrote in the mail shortly before you should not use the -M switch
  (or any other spliting by mplex). If you multiplex a DVD the -M switch
  was deactivated because it generated several files. The -M option does
  not generate valid MPEG streams.
 
  You should use the -S -B option of mpeg2enc for spliting videos.
 
 Does that mean I could split some of my really big mpeg2 files with that
 option (I don't want to recode it...)?
When you encode the video you should use the -S -B option. Then mplex
will split the file when multiplexing into pices with a correct start
and end.

auf hoffentlich bald,

Berni the Chaos of Woodquarter

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


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] Video-encoding questions (mostly DVD related)

2003-01-19 Thread Robert Kesterson
On Sat, 18 Jan 2003, Steven Boswell wrote:

 OK, cool.  mplex generated one big file, and a warning that said
 Sequence end marker found in video stream but single-segment splitting
 specified! for every chapter mark.

Just a gues: Make sure you're using a command line that has a template for
the filename.  For example:

   mplex -f 8 -o MyDVD_%02d.mpeg audio.mp2 video.m2v

Note the %02d that lets mplex number the files and give them unique names.
If you don't have that in there, it can't split the files.

 I burned it to DVD, and there were
 no chapters.  I then hacked mplex so that -M wasn't automatically turned
 on by -f 8, and burned those separate videos to one DVD; that gave me
 chapters, but there's a tiny audio hiccup between each track now.

Try the above and leave the -M option alone.  According to the man page,
using -M on DVD stuff may cause audio/video sync problems.

 Pretty neat that I can burn MPEG-2 video to a DVD, and that it works in
 my player; as far as I can tell, that's not standard, i.e. I think
 the audio is supposed to be uncompressed 48kHz PCM.

mp2 works fine also.

 Now that I can actually see my video, I have a new problem -- although
 most of it looks wonderful, parts of it don't look all that good!
 There's quite a bit of fuzziness at the boundaries between black areas
 and light areas (i.e. I've seen it with white and pink).

Depending on how bright your screen is, you may not be able to get rid of
all the block noise in dark areas.  Once you get used to looking for it,
you'll notice it in digital satellite broadcasts and commercial DVD's too
(though it's not as bad on commercial DVD's, but they get two layers of
bandwidth to play with.)  I just turn the brightness down a tad on the TV
and they look fantastic.  (This is not a slam at the mjpegtools -- they
are far and away the best MPEG encoder I've tried.)

 Here's the command line that I used to generate the video:

 lav2yuv -v 0 -A 1:1 -P 4:3 movie.eli \
  | yuvscaler -v 0 -n n -I ACTIVE_690x480+12+0 \
  | mpeg2enc -v 0 -f 8 -b 5000 -B 305 -S frames.txt -V 224 \
  -h -4 1 -2 1 -s -r 16 -q 4 -a 2 -F 4 -n n -o video.m2v

 Can anyone see anything especially broken about it?

Your bitrate isn't high enough for that q setting, especially if you have
a noisy signal.  Here's the script I use for high quality DVD
encoding from very good quality VHS sources after capturing them to DV.
Yours will look a little different since you're using eli files, but the
idea is the same.  This produces very good results (hard to tell it from a
commercial DVD) on good sources, and will fit a two hour movie on a
single 4.7G DVD.  For poor quality sources, you'll probably need to take
q up to 5 or 6, and -b down to some smaller number to make it fit on
a DVD.  Don't get hung up on the -q setting -- you'll still get very good
results with it higher -- the bitrate has a lot to do with it.

---  script starts here -

#! /bin/sh
# Usage is smil2dvd MyEditList.smil

mkfifo stream.yuv
mkfifo video.yuv

smil2yuv -a ${1%.smil}.mp2 $1 stream.yuv 

cat stream.yuv | yuvdenoise -S 0 -b 4,4,696,468 | y4mshift -n 8 video.yuv 

cat video.yuv | mpeg2enc -S 400 -B 384 -q 4 -b 1 -f 8 -r 16 \
-4 4 -2 4 -N -I 1 -o ${1%.smil}.m2v -v 1

mplex -f 8 -o ${1%.smil}_%02d.mpeg ${1%.smil}.mp2 ${1%.smil}.m2v

rm -f stream.yuv video.yuv ${1%.smil}.mp2 ${1%.smil}.m2v

---  script ends here ---

--
  Robert Kesterson
  [EMAIL PROTECTED]





---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] DivX to VCD

2003-01-19 Thread Robert Kesterson
On 19 Jan 2003, Jacob Visser wrote:

 Im trying to convert a DivX File to VCD Iv been trying to use
 mjpegstools but I dont seem to be able to...

Using mjpegtools in conjunction with mplayer is *the* way to go for this.
Go the mjpegtools page on sourceforge and search the mailing list for
mplayer -vo yuv4mpeg (use the require all words option on the search
results) and you'll find a lot of info, including this url with a script
that you can use for SVCD, and with minor mods to VCD:

   http://sourceforge.net/mailarchive/message.php?msg_id=2694946

--
  Robert Kesterson
  [EMAIL PROTECTED]





---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] Video-encoding questions (mostly DVD related)

2003-01-19 Thread Gregoire Favre
On Sun, Jan 19, 2003 at 02:53:40PM +0100, Bernhard Praschinger wrote:

 When you encode the video you should use the -S -B option. Then mplex
 will split the file when multiplexing into pices with a correct start
 and end.

As there is no -B option in the released mplex, I assume you are talking
about the CVS... I can't compil it on my computer, but on another, mplex
still has no -B option???

I don't use any encoding tools: I record directly in mpeg2 format and I
demux with ds.jar, and use mplex to mux the files together ;-)

Wouldn't it be easyer to add an option to mplex like this:

mplex -f 8 -B -S 400 -o file%02d.mpg /video2/*.*

Or is there a way to split correctly after?

Thank you very much,

Grégoire

http://ulima.unil.ch/greg ICQ:16624071 mailto:[EMAIL PROTECTED]


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] Fixed I-frame location

2003-01-19 Thread Andrew Stevens
On Sunday 19 Jan 2003 5:53 am, Markus Plail wrote:
 Hi there!

 In order to be able to use 'mpeg2enc'oded streams in IfoEdit it is
 necessary to have fixed I-frame location (from what I understand). One
 can create a template for TMPEnc which looks like that:

 ...
 61269,I
 61281,I
 61293,I
 61305,I
 61317,I
 61329,I
 61341,I
 61353,I
 61365,I
 ...

 Would it be possible to change mpeg2enc to only place I-frames at
 certain locations?

Not sure what you mean by location.  Do you mean I-frames must aligned at 
sector boundaries in the multiplexed stream?  This is already done 
automatically.  Do you mean the GOPs (Groups-Of-Pictures) must have a fixed 
size and B/P frame structure?  Again, what you need is probably already there.

However, I'm puzzled why Ifoedit would demand fixed-size/structure GOPs.  It 
is as far as I'm aware definately *not* something required in the DVD 
standard...

Andrew


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] mplex with seek

2003-01-19 Thread Andrew Stevens

 The video is encoded by the broadcaster, not me. I have
 a digital TV receiver connected to a PC which has software
 which can record the digital TV MPEG2 stream to its hard
 disk. 
I've got one myself... a huge leap forward over analog stuff...

With a quick demux/remux the recordings can be put onto
 DVD with no MPEG transcoding at all, i.e. the DVD contains
 the original broadcast MPEG2 video and MP2 audio. 
This is not always going to work as DVB allows higher peak bitrates than DVD.

The
 trouble is that the PC software uses an ordinary clock timer to
 start and stop the recording, like a normal VHS VCR, so there
 is usually extra unwanted video at the start and end. The
 mplex tool lets you chop unwanted material off the end with
 the -l option but I can't find a way to have the multiplexed
 output start from n seconds into the streams being muxed.
 The fact that mplex can segment the input streams into multiple
 standalone muxed files (e.g. for splitting across CDs)
 demonstrates that the principle is possible.

Chuckle... if only it were so simple   Half the code-complexity in mplex 
relates managing run-in  / run-out correctly for (S)VCD and and it gets a lot 
of help from the *encoder* which helpfully places end-of-sequence markers to 
indicate where a clean split can take place.

Anyway, what is possible is that you can cleanly split at *closed* GOPs (one 
where the initial frames do not refer to the previous GOP.  It would not be 
hard to modify mplex to spot the nearest closed GOP to a specified start-time
and start multiplexing from there.  I'll see what I can do over the next 
couple of days.

Aside: if you can send me the commands you're using for splitting your DVB 
files (VDR .vdr's?) I can check it all works myself.

Andrew


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] Fixed I-frame location

2003-01-19 Thread Markus Plail
* Andrew Stevens writes:
On Sunday 19 Jan 2003 5:53 am, Markus Plail wrote:
In order to be able to use 'mpeg2enc'oded streams in IfoEdit it is
necessary to have fixed I-frame location (from what I understand). One
can create a template for TMPEnc which looks like that:

...
61269,I
61281,I
61293,I
61305,I
61317,I
61329,I
61341,I
61353,I
61365,I
...

Would it be possible to change mpeg2enc to only place I-frames at
certain locations?

Not sure what you mean by location.  Do you mean I-frames must
aligned at sector boundaries in the multiplexed stream?  This is
already done automatically.  Do you mean the GOPs (Groups-Of-Pictures)
must have a fixed size and B/P frame structure?  Again, what you need
is probably already there.

What I think it means that frame #61269 has to be an I-frame, and there
should be no other I-frame until frame #61281, which is the next
I-frame. This seems to be needed in order to remux a MPEG2 video stream
to a valid DVD structure and to not have sync issues.

However, I'm puzzled why Ifoedit would demand fixed-size/structure
GOPs.  It is as far as I'm aware definately *not* something required in
the DVD standard...

Definitely true, but I do not author a completely new DVD, but I want
to remux the the video together with the existing (dts/AC3)
streams. And with a normal m2v file (produced by either TMPGEnc or
mpeg2enc) I have stuttering sound.

regards
Markus



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] mplex with seek

2003-01-19 Thread Tim Hewett

On Sunday, Jan 19, 2003, at 15:06 Europe/London, Andrew Stevens wrote:


This is not always going to work as DVB allows higher peak bitrates 
than DVD.

Fortunately digital TV in the UK complies to DVD's 720x572 PAL
resolution standard and bit rates tend to average around 4mbit
for the best quality channels. I saw 7mbit as a peak once but
that's still ok for DVD. We don't have HDTV in the UK, much to the
chagrin of some enthusiasts and the balance tends to lean towards
more channels at the expense of picture quality (or having cleverer
video codecs at the stream head). The only real compatibility
issue between broadcast MPEG2 and DVD is that a broadcast
transport stream allows the aspect ratio to change on any I-frame
boundary, something DVD doesn't allow within an individual
disk title. This is not an insurmountable problem though.


The
trouble is that the PC software uses an ordinary clock timer to
start and stop the recording, like a normal VHS VCR, so there
is usually extra unwanted video at the start and end. The
mplex tool lets you chop unwanted material off the end with
the -l option but I can't find a way to have the multiplexed
output start from n seconds into the streams being muxed.
The fact that mplex can segment the input streams into multiple
standalone muxed files (e.g. for splitting across CDs)
demonstrates that the principle is possible.


Chuckle... if only it were so simple   Half the code-complexity in 
mplex
relates managing run-in  / run-out correctly for (S)VCD and and it 
gets a lot
of help from the *encoder* which helpfully places end-of-sequence 
markers to
indicate where a clean split can take place.

Anyway, what is possible is that you can cleanly split at *closed* 
GOPs (one
where the initial frames do not refer to the previous GOP.  It would 
not be
hard to modify mplex to spot the nearest closed GOP to a specified 
start-time
and start multiplexing from there.  I'll see what I can do over the 
next
couple of days.

Thanks very much indeed. In return I shall point you towards my own
contribution to the free software community, an app which lets you
backup to DV camcorders. There's already something similar for Linux
on sourceforge but this is for MacOS X (my platform) in case that
suits you at all. Check out:
http://www.versiontracker.com/dyn/moreinfo/macosx/17840 if
interested.


Aside: if you can send me the commands you're using for splitting your 
DVB
files (VDR .vdr's?) I can check it all works myself.

The PVR s/w runs on PCs only but it records to a format which seems to
be referred to as PVA. A free PC tool called PVAStrumento lets you
demux this, and it stores the results on my Mac's hard drive. It also 
fixes
any errors which occurred while the transport stream was being received.
I then do mplex -V -f 8 -o output.mpg input.mpv input.mpa then use
dvdauthor tools ifogen and tocgen to create the VIDEO_TS. That's it.
If there's a Unix tool which can replace PVAStrumento that would be
even better since the PVR s/w could then record straight over the wire
to the Mac (which has a useful 80GB hard drive) and spare me the
Uncle Bill experience. :-) It would let me script the process too...

	Andrew


Regards,

Tim.



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] DivX to VCD

2003-01-19 Thread Steven M. Schultz
Hi -

 From: Robert Kesterson [EMAIL PROTECTED]
 On 19 Jan 2003, Jacob Visser wrote:
 
  Im trying to convert a DivX File to VCD Iv been trying to use
  mjpegstools but I dont seem to be able to...
 
 Using mjpegtools in conjunction with mplayer is *the* way to go for this.

I've done this and it works ok BUT there's a small problem with
mplayer's y4m output.  The frame rate can show up in the YUV4MPEG2
header as something like:

 F29969900:100

which mjpegtools do not now what to do with.   It's necessary to
specify the framerate using the -F option to mpeg2enc

Cheers,
Steven Schultz
[EMAIL PROTECTED]


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



[Mjpeg-users] lav_read_audio: how many samples for ONE frame?

2003-01-19 Thread Torsten Mohr
Hi,

i try to do some video and audio effects on some AVI streams,
i have some questions related to that, it would be great if
someone could give me some hints.

I just sampled an AVI stream with lavrec, audio in 16 bits, 1 channel,
audio rate is 11025.

When i open that stream and read out the informations in it i get:

Video frames: 438
Video rate: 25.0 frames per second

Audio channels: 1
Audio Bits: 16
Audio Rate: 11025
Audio Samples: 192413

I try to check the audio sample number now:

438*11025/25 is 193158, that's higher than the number in the stream.

437*11025/25 is 192717, that's still too high, though i took one
frame less.


I'd like to mix two (or more) streams (video works!) but when
i try to figure out how many samples are related to a video
frame it gets annoying.
I only work with frames with matching audio/video parameters,
so rate, bits, channels are the same.

As in the example above, it seems i can't just try to read the
(audio_rate/video_rate) samples.

So i tried it a different way:

audio_pos = video_frame * audio_samples / all_video_frames;
audio_pos = ~1;

I calculate the size of the data as:

size = audio_pos(frame+1) - audio_pos(frame);

But this leads to differing sizes, sometimes 438, sometimes 440.
(Also, for large number of frames there can be an overflow.)

So when i read in video frames from TWO streams, the audio size
of the first one may be 438, the second one 440.  This leads
to complicated algorithms for mixing the audio data.


Has anybody got an idea of how to read in the audio chunks
related to a frame?  I'd like to use a fixed buffer size,
this would make things much easier.


Thanks for any hints,
Torsten.



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



Re: [Mjpeg-users] lav_read_audio: how many samples for ONE frame?

2003-01-19 Thread Ronald Bultje
Hi Torsten,

On Sun, 2003-01-19 at 21:40, Torsten Mohr wrote:
 When i open that stream and read out the informations in it i get:
 
 Video frames: 438
 Video rate: 25.0 frames per second
 
 Audio channels: 1
 Audio Bits: 16
 Audio Rate: 11025
 Audio Samples: 192413
 
 I try to check the audio sample number now:
 
 438*11025/25 is 193158, that's higher than the number in the stream.
 
 437*11025/25 is 192717, that's still too high, though i took one
 frame less.

You don't know the exact practical sample rate. The requested sample
rate is 11025, but audio card clocks are often biased a bit.

 So when i read in video frames from TWO streams, the audio size
 of the first one may be 438, the second one 440.  This leads
 to complicated algorithms for mixing the audio data.

Well, yes. You'd need to either resample the audio or just accept that
audio can be slightly time-biased within frames (just try to keep this
in track by using a total_audio_samples counter). Mixing audio isn't
that simple, I fear.

Anyway, I don't have much experience here either, others might be able
to give much better advice.

Ronald

-- 
Ronald Bultje [EMAIL PROTECTED]
Linux Video/Multimedia developer



---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users



[Mjpeg-users] raw YUV data

2003-01-19 Thread Brian
is it possible using mpeg2dec to dump RAW YUV data?

I've gone through /libvo/video_out_yuv4m.c and managed
to get rid of the STREAM header and the FRAME header
but the filesize dosen't match up with what I think the actual
size should be eg. 100x100 frame should have
Y=1 bytes
U=2500 bytes
V=2500 bytes
for a total=15,000 bytes

multiplied by, say, 10 frames gives filesize of 150,000 bytes.
is this correct? or have I lost it:)


---
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
___
Mjpeg-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users