Best way to create static video mpeg (single jpeg) with long audio (1 hr)?

View: New views
2 Messages — Rating Filter:   Alert me  

Best way to create static video mpeg (single jpeg) with long audio (1 hr)?

by Michael Shell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Suppose I have one title on a DVD that is audio only and I want the
player to display a static image on the screen while it is being
played (such as a picture of the fellow who is speaking).

Now, normally when I do something like this with menus, I create
a mpeg video stream from a jpeg using something like:

jpeg2yuv -n 500 -I p -f 29.97 -j infile.jpeg | mpeg2enc -f 8 -F 4 -a 2 -n n -o outfile.m2v

which works well enough for short sequences. However, for longer
sequences, say 1 hour, this takes a long time to process as well
as generates a large output file. For example, for a jpeg of about
100KB, 1hr of NTSC (107892 frames) requires about 300MB - this is
the video overhead that seems to be required for my lowly 80MB audio
ac3. I suppose lowering the video bit rate helps, but beyond a certain
point it noticeably reduces the quality of the mpeg even though it
is "static". (Increasing the GOP size drastically, to say 300, helps a
lot, but I think the DVD spec only allows a GOP size up to 18 for NTSC).

It is a shame I just can't mplex a short video mpeg with a full
length ac3 audio, but this drives many DVD players (ogle, mplayer)
nuts. :(

Is there a better way of approaching this case (static image with
long audio) such as "looping" video only, or is the jpeg2yuv
approach and a 300MB mpeg overhead the only game in town?


  Thanks in advance,

  Mike Shell

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Dvdauthor-users mailing list
Dvdauthor-users@...
https://lists.sourceforge.net/lists/listinfo/dvdauthor-users

Re: Best way to create static video mpeg (single jpeg) with long audio (1 hr)?

by Giacomo Comes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Sep 09, 2007 at 01:44:32PM -0400, Michael Shell wrote:

>
>
> Suppose I have one title on a DVD that is audio only and I want the
> player to display a static image on the screen while it is being
> played (such as a picture of the fellow who is speaking).
>
> Now, normally when I do something like this with menus, I create
> a mpeg video stream from a jpeg using something like:
>
> jpeg2yuv -n 500 -I p -f 29.97 -j infile.jpeg | mpeg2enc -f 8 -F 4 -a 2 -n n -o outfile.m2v
>
> which works well enough for short sequences. However, for longer
> sequences, say 1 hour, this takes a long time to process as well
> as generates a large output file. For example, for a jpeg of about
> 100KB, 1hr of NTSC (107892 frames) requires about 300MB - this is
> the video overhead that seems to be required for my lowly 80MB audio
> ac3. I suppose lowering the video bit rate helps, but beyond a certain
> point it noticeably reduces the quality of the mpeg even though it
> is "static". (Increasing the GOP size drastically, to say 300, helps a
> lot, but I think the DVD spec only allows a GOP size up to 18 for NTSC).
>
> It is a shame I just can't mplex a short video mpeg with a full
> length ac3 audio, but this drives many DVD players (ogle, mplayer)
> nuts. :(
>
> Is there a better way of approaching this case (static image with
> long audio) such as "looping" video only, or is the jpeg2yuv
> approach and a 300MB mpeg overhead the only game in town?
>

I use mencoder fo this kind of task:

mencoder -of mpeg -mpegopts tsaf:format=dvd:telecine -ovc lavc -lavcopts \
 vcodec=mpeg2video:vrc_buf_size=1835:keyint=12:aspect=4/3:vrc_maxrate=7500:vstrict=0:vbitrate=7500:vmax_b_frames=2 \
 -o outfile.mpg mf://infile.jpeg -fps 1/3600 -ofps 24000/1001  -vf scale=720:480,harddup \
 -oac lavc -lavcopts acodec=ac3:abitrate=192 -audiofile infile.wav

The parameter -fps 1/3600 set the video duration (1hour in the example)

The audio source is a wav file encoded to ac3.
I don't remember right now if it is possible to copy an ac3 stream
without audio encoding.

Ciao
Giacomo

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Dvdauthor-users mailing list
Dvdauthor-users@...
https://lists.sourceforge.net/lists/listinfo/dvdauthor-users
LightInTheBox - Buy quality products at wholesale price!