Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd June 2009, 16:15   #1  |  Link
drpaulng
Registered User
 
Join Date: Mar 2002
Posts: 225
Encoding Still picture to x264 movie

What is the optimal preset for encoding still picture of full HD size with minimal bitrate. Can anybody help?

Edit: For avoiding confusion, I need to re-state my problem -
What is the optimal preset for encoding still picture of full HD size as a video stream (with x264) with minimal bitrate. Can anybody help?

With high quality still image enocoding to moving picture, one would expect such static picture should be of low bitrate but in fact, the bitrate is unexpectedly high in order to avoid pixel and block formation.

1920x1080 still image encoded to a movie + PGS subtitles + audio for example, would serve as a slide-show. The video bitrate encoded from x264 would be about 7000-8000kbps (target bitrate is higher) or more if I want it smooth without "motion artifact". Lower effective bitrate at around 4000kbps (target bitrate is higher) would cause swelling and shrinking of pixel elements off and on with bitrate varying from 1500-5000kbps.

In short, how can I get "motionless" high quality still scene of a movie encoded from still image at low bitrate.
__________________
Paul Ng

Last edited by drpaulng; 24th June 2009 at 12:42. Reason: Clarifying
drpaulng is offline   Reply With Quote
Old 23rd June 2009, 20:32   #2  |  Link
Adub
Fighting spam with a fish
 
Adub's Avatar
 
Join Date: Sep 2005
Posts: 2,699
png.

Why do you want to encode a still picture with a moving picture codec?
__________________
FAQs:Bond's AVC/H.264 FAQ
Site:Adubvideo
Adub is offline   Reply With Quote
Old 23rd June 2009, 20:39   #3  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Adub View Post
png.

Why do you want to encode a still picture with a moving picture codec?
Because H.264 is a better still-image compressor than JPEG?

Here's what I use:

--frames 1 --8x8dct --trellis 2 --subme 9 --psy-rd 1.5:0.5 --aq-strength 1.2 --deblock -2:-2

Last edited by Dark Shikari; 23rd June 2009 at 21:33.
Dark Shikari is offline   Reply With Quote
Old 23rd June 2009, 21:28   #4  |  Link
ChronoCross
Does it really matter?
 
ChronoCross's Avatar
 
Join Date: Jun 2004
Location: Chicago, IL
Posts: 1,542
Quote:
Originally Posted by Dark Shikari View Post
Because H.264 is a better still-image compressor than JPEG?

Here's what I use:

--frames 1 --8x8dct --trellis 2 --subme 9 --psy-rd 1.5:0.5 --aq-strength 1.2
how does one use these images encoded in h264 in a standard photo editing program or view it in windows?
ChronoCross is offline   Reply With Quote
Old 23rd June 2009, 21:33   #5  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by ChronoCross View Post
how does one use these images encoded in h264 in a standard photo editing program or view it in windows?
You can view it in Flash online. Other than that, support is pretty nonexistent.
Dark Shikari is offline   Reply With Quote
Old 23rd June 2009, 21:41   #6  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
Quote:
Originally Posted by ChronoCross View Post
how does one use these images encoded in h264 in a standard photo editing program or view it in windows?
Well photoshop supports mp4/h264 ^_^
Keiyakusha is offline   Reply With Quote
Old 23rd June 2009, 21:50   #7  |  Link
ChronoCross
Does it really matter?
 
ChronoCross's Avatar
 
Join Date: Jun 2004
Location: Chicago, IL
Posts: 1,542
Quote:
Originally Posted by Dark Shikari View Post
You can view it in Flash online. Other than that, support is pretty nonexistent.
makes it hard to get behind it =(
ChronoCross is offline   Reply With Quote
Old 24th June 2009, 00:19   #8  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Silverlight 3 would support these as well. It woudln't make sense to incldue in a straight HTML web page, but once you're building an app, this can be used.

There are actually some pretty interesting applications, although you need to weigh the greater decode complexity of a big H.264 frame versus JPEG if there are a lot of images that need to be decoded at once.

Variable block size + In-loop deblocking + DQuant + CABAC are all great things in a still codec as much as in an interframe codec.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 24th June 2009, 02:10   #9  |  Link
drpaulng
Registered User
 
Join Date: Mar 2002
Posts: 225
OK, very simple, a picture-show with music. The theme is music not picture.

With high quality still image enocoding to moving picture, one would expect such static picture should be of low bitrate but in fact, the bitrate is unexpectedly high in order to avoid pixel and block formation.

1920x1080 still image encoded to a movie + PGS subtitles + audio for example, would serve as a slide-show. The video bitrate encoded from x264 would be about 7000-8000kbps (target bitrate is higher) or more if I want it smooth without "motion artifact". Lower effective bitrate at around 4000kbps (target bitrate is higher) would cause swelling and shrinking of pixel elements off and on with bitrate varying from 1500-5000kbps.

Edit: In short, how can I get "motionless" high quality still scene of a movie encoded from still image at low bitrate.
__________________
Paul Ng

Last edited by drpaulng; 24th June 2009 at 02:15.
drpaulng is offline   Reply With Quote
Old 24th June 2009, 02:27   #10  |  Link
10L23r
Registered User
 
Join Date: Apr 2009
Posts: 122
well for how many frames do u show each picture?
10L23r is offline   Reply With Quote
Old 24th June 2009, 02:38   #11  |  Link
drpaulng
Registered User
 
Join Date: Mar 2002
Posts: 225
NTSC would be 24000/1001 or 30000/1001.
Thanks
__________________
Paul Ng
drpaulng is offline   Reply With Quote
Old 24th June 2009, 03:28   #12  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,392
Quote:
Originally Posted by drpaulng View Post
In short, how can I get "motionless" high quality still scene of a movie encoded from still image at low bitrate.
Make sure every new picture is an I-frame, there are no I-frames other than those, and all P-frames have QP greater than their corresponding I-frame. These all should happen automatically if you set keyint to something larger than your maximum slide duration, and use 2pass or CRF with no VBV.
Better yet, have no P-frames at all, and use VFR with 1 frame per picture. But this part isn't very important, as P-frames with no content are tiny.

If you can't ensure no other I-frames (due to blu-ray restrictions or something), then you'll waste a bunch of bits. But the right QPs should still be sufficient to ensure a perfectly static picture.

Last edited by akupenguin; 24th June 2009 at 03:35.
akupenguin is offline   Reply With Quote
Old 24th June 2009, 07:11   #13  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Quote:
Originally Posted by benwaggoner View Post
There are actually some pretty interesting applications, although you need to weigh the greater decode complexity of a big H.264 frame versus JPEG if there are a lot of images that need to be decoded at once.

Variable block size + In-loop deblocking + DQuant + CABAC are all great things in a still codec as much as in an interframe codec.
No, with libavcodec H264 intra frames decodes as fast as JPEGs, a bit faster than HDPhoto and a lot faster than JP2k.

A friend of mine developed a simple container to embed H264 intra frames. He also write plug-ins for several image-viewers to support these pictures.

AFAIK H264 intra frames beats any still image codecs. I found that snow intra is also good at encoding still images, though in most cases it doesn't look better than H264.
roozhou is offline   Reply With Quote
Old 24th June 2009, 15:18   #14  |  Link
deank
Programmer (or just 教务长)
 
deank's Avatar
 
Join Date: Oct 2008
Location: Valencia, Spain
Posts: 4,251
drpaulng's question was related to audioBD output from multiAVCHD.

Thanks to Dark Shikari and akupenguin for their suggestions. I used some of the settings and now audio titles have a perfect still-picture-like video background.

Dean
__________________
multiAVCHD - donate | popBD | uncropMKV | mkv2avi | easySUP
deank is offline   Reply With Quote
Old 24th June 2009, 18:16   #15  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,750
Quote:
Originally Posted by roozhou View Post
No, with libavcodec H264 intra frames decodes as fast as JPEGs, a bit faster than HDPhoto and a lot faster than JP2k.
I'd expect that's probably more a sign of a slow JPEG decoder.

CABAC + in-loop deblocking are pretty expensive features that JPEG doesn't have to do; it's hard to imagine how JPEG couldn't be quite a bit faster per pixel.

Of course, for net-delivered content, we're network bound much more often than CPU bound, so I'd imagine H.264 Hgh stills would be a lot more performant on net in many cases.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 29th June 2009, 18:50   #16  |  Link
skal
Registered User
 
Join Date: Jun 2003
Posts: 121
you can use the HTML5 tag too: <video src="my_single_iframe.mp4">.
skal is offline   Reply With Quote
Old 29th June 2009, 19:34   #17  |  Link
Leeloo Minaļ
Registered User
 
Join Date: Nov 2007
Posts: 50
Quote:
Originally Posted by skal View Post
you can use the HTML5 tag too: <video src="my_single_iframe.mp4">.
I am not sure there is any browser which has native .mp4 decoding capabilities...
Safari, maybe ? If so, it may be the only one.

Edit : or use a Flash plugin as Dark Shikari suggested.

Last edited by Leeloo Minaļ; 29th June 2009 at 19:38.
Leeloo Minaļ is offline   Reply With Quote
Old 29th June 2009, 19:37   #18  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Leeloo Minaļ View Post
I am not sure there is any browser which has native .mp4 decoding capabilities...
Safari, maybe ? If so, it may be the only one.
Chrome.
Dark Shikari is offline   Reply With Quote
Old 29th June 2009, 20:28   #19  |  Link
Leeloo Minaļ
Registered User
 
Join Date: Nov 2007
Posts: 50
What a good surprise !
Thanks for the info, Dark.
Leeloo Minaļ is offline   Reply With Quote
Old 29th June 2009, 20:50   #20  |  Link
jethro
Registered User
 
Join Date: Mar 2006
Posts: 102
Quote:
Originally Posted by roozhou View Post

A friend of mine developed a simple container to embed H264 intra frames. He also write plug-ins for several image-viewers to support these pictures.

.
Wow that would be very nice. I'd kill for xnview plugin . Any ETA for this?
jethro is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:09.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.