Hi guys

This is my first post in this list so hi !
Hope you could help in this as i am a begginner in the video world.
What i am trying to achieve is to take a video stream, extract couple of
frames, modify them (add another picture on top) and put them back in to
the video stream.

This is what i do :

(lav2yuv -f 1 myMovie.mov | y4mtoppm | <composite command>| ppmtoy4m -F
25:1 | strip.sh;... ;lav2yuv -f 2 myMovie.mov | y4mtoppm | <composite
command>| ppmtoy4m -F 25:1 | strip.sh;) | ffmpeg -f yuv4mpeg pipe -i -
-sameq -b 8500 res.mov

Note: the strip.sh remove Y4M unwanted headers

Everythings work not too bad except i can notice a luminance difference
between frame i had extracted and the rest of the video stream. It is
like a white transparent shadow (it s more visible from Quicktime Player
though ...)

I thought it might be the composite command (from ImageMagick) that i
was doin so i removed it
like this :

(lav2yuv -f 1 myMovie.mov | y4mtoppm | ppmtoy4m -F 25:1 | strip.sh;...
;lav2yuv -f 10 myMovie.mov | y4mtoppm | ppmtoy4m -F 25:1 | strip.sh;) |
ffmpeg -f yuv4mpeg pipe -i - -sameq -b 8500 res.mov

And same result .

So i concluded y4mtoppm or ppmtoy4m is the culprit (or both) . I know
the subsampling and colorspace operations is lossy so i guess the shadow
comes from this loss. ...

So my question is : do u think i could more or less fix this using
yuvdenoise or another tool ? Other tool like y4mscaler could help me ?
using y4mtopnm would make things better (tried to use it though but it
seems not to accept output from lav2yuv)? (i am not very confident in
chroma things ...)

Maybe , would it be possible to change the command line to make things
better (ppmtoy4m parameters ... i tried many options with no luck though
...)

Alternatively i though i could use YUV data instead of PPM (so i could
work directly with yuv without subsampling) , i tried to extract one yuv
single frame but imageMagick only displays crap. ...:

So i ran out of idea and feel a little down  @ this time of the nite ...:-)

Would you advise me a complete different way to this ? (i heard about
MPEG2 stream with only I frames ...)

Thanx a lot for your attention




Cheers

seb




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users

Reply via email to