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 > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th October 2014, 22:40   #1  |  Link
tarasdi
Registered User
 
Join Date: Oct 2014
Posts: 10
Lossless compression of iphone videos

Hi,

Is it possible to losslessly compress iphone movies to produce a smaller file size? I acknowledge that iphone movies are poor quality, but I don't have a reason to further reduce the quality.

I'd think that this should be possible given the limited processing power and processing time on the iPhone when capturing video, and assuming that further compression can be achieved by increasing processing.
tarasdi is offline   Reply With Quote
Old 11th October 2014, 23:14   #2  |  Link
mariush
Registered User
 
Join Date: Dec 2008
Posts: 589
I understand what you're saying but you're wording it incorrectly. Losslessly is the wrong term.

Yes, iPhone may encode the videos it captures with some looser parameters which result in a large file. The phone most likely uses a specialized module in the processor who's only purpose is to encode videos, so that will be optimized to use few resources and as little battery as possible, not to keep the videos small in size.

You could take this content and encode it again with much better parameters and the result will be different (not a lossless recompression) but visually you'll have a hard time noticing anything different and the file size will be smaller.

A lossless code will actually encode a series of pictures and when you play it, the pictures will be 100% identical. If you take a screenshot from the original video and a screenshot from the new video that you encode losslessly, each pixel will be identical. You don't want that or need that.... your eyes won't notice that a few pixels change a bit in one or a few snapshots from a second, when you have 24-60 snapshots in a second of video.

Last edited by mariush; 11th October 2014 at 23:16.
mariush is offline   Reply With Quote
Old 23rd October 2014, 12:15   #3  |  Link
tarasdi
Registered User
 
Join Date: Oct 2014
Posts: 10
Hey Mariush,

I understand what you mean about practically using a lossy codec for a video that's already poor quality won't make a noticeable difference. So I suppose my question for some part is an educational one.

So the the iPhone will convert a series of frames
x1,x2,x3
To another series of frames (stored in a compressed format)
y1,y2,y3

Which are slightly different but take up less size than the 'raw' frames.

Is there a reason why we can't get the 'y' series of frames compress them so that when they are played back, we get exactly the same 'y' series of frames?

Given that the computing time and power of the iphone is limited when capturing video, I would have expected that if you you threw a few minutes of PC power at the video stream, you could end up with a smaller file size (without any loss of information).
tarasdi is offline   Reply With Quote
Old 23rd October 2014, 16:08   #4  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,821
All else being equal, processing power would effect the encoding time, but not necessarily the quality. Not that all else is necessarily equal, but one device may be able to process "x" number of frames per second, while a device with twice the processing power would just do the same thing at twice the speed.

Someone might be able to explain it better than I can (maybe someone who actually understands it), but your example suggests compressing "raw" or original frames and outputting a compressed version, then re-encoding the compressed copy. If those compressed frames are re-encoded, the encoder doesn't know where they came from. They're decompressed, fed to the encoder as "raw" frames, and this time the encoder might also need to re-compress artefacts introduced in the first encoding process which it didn't need to compress the first time. The encoder might be able to encode the original video more efficiently because it's a little "cleaner" and easier to compress.

Whenever you use a lossy encoder to re-encode, there'll be some sort of generation loss, even if the exact same encoder settings and bitrate were used the second time.
http://en.wikipedia.org/wiki/Lossy_c...formation_loss
http://en.wikipedia.org/wiki/Generat...eneration_loss

As an experiment, if you have an image editing program such as Irfanview which allows you to set the quality when saving an image as a jpeg (which is lossy), try saving an image at 100% quality. Now open the second image and resave it as a new image at 100% quality. Then open image number three and save it as a forth image.... 100% quality again. You'll probably find with each successive save, the file size increases a bit.

Or you can save the image at 50% quality and reduce the file size substantially, open the saved version, resave it at 100% quality and find the 100% quality version is much larger again. No information was "restored" as a result though.
hello_hello is offline   Reply With Quote
Old 19th February 2015, 09:45   #5  |  Link
tarasdi
Registered User
 
Join Date: Oct 2014
Posts: 10
Hi,

I think the flow you were talking about is:

original_raw_form -------lossy---->compressed ----decompress---> raw_frames_of_lossy_generation_1 ----lossy---->compressed

where I was asking whether the following flow is possible:

original_raw_form ------lossy---->compressed ----lossless----> further_compressed

Such that uncompressing futher_compressed and playing would yield the stream: raw_frames_of_lossy_generation_1

Another one of my threads here discusses the idea (tl;dr - I don't think it's possible)
tarasdi is offline   Reply With Quote
Reply

Tags
iphone, lossless compression

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 08:27.


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