Wikipedia:Reference desk/Archives/Computing/2013 March 6#Video codecs for future storage

{{#ifeq:{{PAGENAME}}|Special:Undelete| |{{#if:|

}} {{#ifeq:{{NAMESPACE}}|Wikipedia|{{#switch:{{NAMESPACE}}|= |
}}|{{error:not substituted|Archive header}}
}}}} {{#if:|
}}
width = "100%"
colspan="3" align="center" | Computing desk
width="20%" align="left" | < March 5

! width="25%" align="center"|<< Feb | March | Apr >>

! width="20%" align="right" |{{#ifexist:Wikipedia:Reference desk/Archives/Computing/2013 March 7|March 7|Current desk}} >

align=center width=95% style="background: #FFFFFF; border: 1px solid #003EBA;" cellpadding="8" cellspacing="0"
style="background: #5D7CBA; text-align: center; font-family:Arial; color:#FFFFFF;" | Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is {{#ifexist:Wikipedia:Reference desk/Archives/Computing/2013 March 16|an archive page|a transcluded archive page}}. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.

__TOC__

= March 6 =

Video codecs for future storage

Part 1

I'm getting several hours of super 8 film digitized. I want to keep it in a format that strikes a good balance between keeping the amount of storage space needed at a managable level, and preserving as much as possible of the information in the video. I've had tests done at several companies who specialize in this, and the company so far that produces the best digitizations, uses [http://www.mwa-nova.com/downloads/product_sheets/flashscan_HD.pdf this hardware], and a codec that VideoLan describes thusly:

Stream: 0

Type: Video

Codec: Packed YUV 4:2:2, U:Y:V:V (2vuy)

Language: English

Resolution: 1280x720

Display resolution: 1280x720

Frame rate: 24

edit: YUV 4:4:2 corrected to YUV 4:2:2

When I calculate the total number of pixels encoded, the file size is about 2.7 bytes per pixel.

  • Do we have an article about this codec? I've read Chroma subsampling, but anything more specific?
  • Is this a codec that can be expected to be readable a long time into the future?
  • In this particular codec, are all frames represented equally faithful to the original, or are there key frames that are represented more faithfully, with diffs in between which use some kind of lossy compression with respect to the key frames? To clarify: The details in the encoding scheme, i.e. whether key frames and diffs are used or whether information is stored a sequence of entire images, does not matter to me. If the diffs are exact, it's fine.
  • I'm happy with a file size of up to about 4 bytes per pixel. Are there codecs that are widely used, can be expected to be readable a long time in the future, and which can be manipulated with ffmpeg (Windows version from http://ffmpeg.zeranoe.com/builds/), that would be a better choice than the one described above?

Part 2

  • For some reason, the company mentioned above only delivers the files in .MOV containers. Can I convert to .AVI losslessly with ffmpeg, and safely delete the original?
  • Will ffmpeg be able to split longer files into shorter sequences losslessly?

Thanks, --NorwegianBlue talk 07:42, 6 March 2013 (UTC)

:1a. I can't find a specific article but YUV has more information. 1b. Yes. 1c. It is uncompressed; you lose nothing except half the horizontal color resolution, which is normally not noticeable and which virtually all other codecs lose as well. Every frame is a key frame. 1d. 8-bit YUV 4:2:2 is two bytes per pixel. You could ask about 24-bit RGB, which would be 3 bytes per pixel, but it's possible that YUV 4:2:2 is the raw output format of their digitizer and converting to anything else would lose information. You could also ask about more than 8 bits per channel, but I think you would have more compatibility problems. 2a. I think ffmpeg -i input.mov -vcodec copy output.avi will work. 2b. Probably. At any rate there are tools that can. -- BenRG (talk) 18:47, 6 March 2013 (UTC)

::Thanks a lot, BenRG. I wonder what the extra 0.7 bytes per pixel are? I just discovered Mediainfo, which reports the format like this:

{{collapse top}}

General

Complete name : MyFile.mov

Format : MPEG-4

Format profile : QuickTime

Codec ID : qt

File size : 8.41 GiB

Duration : 3mn 23s

Overall bit rate : 355 Mbps

Encoded date : UTC 2013-01-24 16:33:18

Tagged date : UTC 2013-01-24 16:36:06

Writing library : Apple QuickTime

©TIM : 00:00:00:00

©TSC : 24

©TSZ : 1

Video

ID : 1

Format : YUV

Codec ID : 2vuy

Duration : 3mn 23s

Bit rate mode : Constant

Bit rate : 354 Mbps

Width : 1 280 pixels

Height : 720 pixels

Display aspect ratio : 16:9

Frame rate mode : Constant

Frame rate : 24.000 fps

Color space : YUV

Chroma subsampling : 4:2:2

Compression mode : Lossless

Bits/(Pixel*Frame) : 16.000

Stream size : 8.37 GiB (100%)

Title : Apple aliasdatahåndterer

Language : English

Encoded date : UTC 2013-01-24 16:33:18

Tagged date : UTC 2013-01-24 16:36:06

Audio

ID : 2

Format : PCM

Format settings, Endianness : Little

Format settings, Sign : Signed

Codec ID : sowt

Duration : 3mn 23s

Bit rate mode : Constant

Bit rate : 1 536 Kbps

Channel(s) : 2 channels

Channel positions : Front: L R

Sampling rate : 48.0 KHz

Bit depth : 16 bits

Stream size : 37.2 MiB (0%)

Title : Apple lydmediahåndterer / Apple aliasdatahåndterer

Language : English

Encoded date : UTC 2013-01-24 16:33:18

Tagged date : UTC 2013-01-24 16:36:06

Other

ID : 3

Type : Time code

Format : QuickTime TC

Duration : 3mn 23s

Time code of first frame : 00:00:00:00

Time code settings : Striped

Title : Tidskodemediehåndterer / Apple aliasdatahåndterer

Language : English

Encoded date : UTC 2013-01-24 16:36:06

Tagged date : UTC 2013-01-24 16:36:06

{{collapse bottom}}

::Could a silent audio stream consume so much space? I interpret the "Bits/(Pixel*Frame) : 16.000" output as a confirmation of your statement that the yuv compression should result in 2 bytes per pixel.

::The conversion to .AVI that you suggested worked, sort of. The file played fine in VideoLan, I compared a PNG snapshot with the corresponding frame in the original, and found the the files to be identical (binary diff). However, this particular content in an AVI container crashed MediaInfo (but not ffprobe). --NorwegianBlue talk 23:27, 6 March 2013 (UTC)

:::You don't need a silent audio track whether it consumes a lot of space or not, include -an in your ffmpeg command. ¦ Reisio (talk) 00:09, 7 March 2013 (UTC)

::::I know I don't need it, but I'm puzzled by the size of the files as delivered by the company who did the digitization. I don't want to mess with the original files until I'm 110% sure what I'm doing, but I'll try stripping it as you suggested on a copy of one of the files, to see if that's the explanation. Thanks! --NorwegianBlue talk 08:41, 7 March 2013 (UTC)

:::::1280×720×24×16 = 353894400, which is consistent with the 354 Mbps rate quoted above, and 203s×354Mbps = 8.37 GB, so I think either you miscalculated or the file with the problem is a different one. Note that 1 Mbps = 106 bps, but 1 GB = 230 B. The audio track accounts for less than 1% of the file size, as shown by Mediainfo. It's possible they include it because some playback software wasn't designed to handle files without an audio track. You could at least downsample it to 8 KHz or something. -- BenRG (talk) 18:31, 7 March 2013 (UTC)

::::::I indeed miscalculated, and was about to come here and say, slightly embarrassed, "mystery solved". I used the frame rate of the source material (18 fps), which was part of the file names, and completely ignored the blindingly obvious fact that they had inserted extra frames, to adjust to 24 fps instead of 18 fps. But it's a good thing you beat me to it, since in doing so, you also spelled out how other relevant calculations, which I was unsure about, are done. Thanks a lot! --NorwegianBlue talk 20:23, 7 March 2013 (UTC)

How to simultaneously copy the text of all the alternatives in a Combo box (drop-down menu) on a web page?

{{unresolved}}

I use Windows7 and Firefox v19 and/or Microsoft Internet Explorer v9.
I need to copy the text of all the available options inn a Combo box ("drop-down list") and paste them into my local text editor.
For example I would like to simultaneously copy all the options:

Volvo
Saab
Opel
Audi
from the combo box in the Result field on the web page: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select (Link found and visited: 2013-03-06)
(Of course: In most cases there are tens or sometimes maybe hundreds of options in the combo boxes that I need to copy).
How may I do this?
--46.15.136.227 (talk) 17:20, 6 March 2013 (UTC)

:::(OP) Adding to my question at 23:21, 6 March 2013 (UTC) :
The example list (Volvo Saab Opel Audi), referred to above, only uses the HTML-tag: