Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Avi Information Copy'n'paste, Allow text selection in widgets
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
andy
Posted: Mar 2 2013, 10:43 AM


Advanced Member


Group: Members
Posts: 35
Member No.: 35896
Joined: 26-December 12



The AVI Information (a.k.a. File Information) dialog includes a bunch of useful statistics that I'd like to be able to copy'n'paste to other programs. Unfortunately, none of the widgets allow text selection, so I have to type it all by hand wherever I need it. Please consider making the text be selectable with a Ctrl+C binding. Perhaps make the dialog one large (read-only) text widget so it can all be copied at the same time if desired.
 
     Top
phaeron
Posted: Mar 2 2013, 11:22 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Yeah, you can't copy this stuff out right now because it's in static (label) controls. I think I tried edit controls once but they bloated up the UI too much, and using one big edit control doesn't provide for acceptable layout. Might just have to stick in a Copy command.
 
    Top
andy
Posted: Mar 3 2013, 09:31 PM


Advanced Member


Group: Members
Posts: 35
Member No.: 35896
Joined: 26-December 12



I haven't looked at the GUI parts of the source, so I don't know how you're doing widgets, but I'll just mention that some GUI toolkits provide labels that support selection. I just brought up the property sheet for some file I had lying around, and it allowed me to select and copy text from the various fields, e.g. Type and Location.
 
     Top
phaeron
Posted: Mar 9 2013, 07:08 PM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Win32 static controls do not support selection.
 
    Top
raffriff42
Posted: Mar 29 2013, 03:48 AM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



Phaeron, I have snagged your source code for AVI parsing (been meaning to thank you) and adapted it for my FRAFS AVI Info applet. It does just what the OP requires - a simple text summation of the file information - including any error messages in case of corrupted index, etc.

Designed for FRAPS files, but seems to work with most others as well.
 
     Top
andy
Posted: Mar 29 2013, 04:15 AM


Advanced Member


Group: Members
Posts: 35
Member No.: 35896
Joined: 26-December 12



QUOTE (raffriff42 @ Mar 29 2013, 03:48 AM)
my FRAFS AVI Info applet does just what the OP requires - a simple text summation of the file information - including any error messages in case of corrupted index, etc.

Gave it a spin, works mostly, though I have one file it chokes on. The video in question is 1280x720, 30.000 fps, 44:42.86 long, uncompressed video and audio, 96kHz 16-bit stereo, and 180 gigabytes in size. VirtualDub likes it just fine.

For my needs, I'd like to see the audio length (frames and time duration) as well as the video length. Additionally, I'd like an option to elide the commas from all the numbers so I can more easily paste them into a calculator or spreadsheet.
 
     Top
raffriff42
Posted: Mar 29 2013, 04:44 AM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



Could you email me that 180GB file please? Just kidding, I'm gonna have to live with it choking on that one.
[EDIT - I am working on creating test files that large]
[EDIT successfully tested with a 100 GB file (720p/30, uncompressed, 96kHz audio)]

For uncompressed audio, if compression ratio is not 1.0000, this implies the durations are not equal - if that helps. I assumed they would be equal, unless Windows clock drift is causing loss of audio sync.

I don't particularly want to add options - the program's supposed to be dead simple to use. It's pretty easy to hack, though. It's open source, written in VB.NET. Hint: search CAviProps.vb for "String.Format"
 
     Top
raffriff42
Posted: Mar 29 2013, 01:14 PM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



More alternatives:

You can use MediaInfo, which has several presentation modes, including plain text:
http://mediainfo.sourceforge.net/en

A basic version of MediaInfo is incorporated into the open source media player MPC-HC.
http://mpc-hc.org/
Play the video, right-click, Properties, MediaInfo tab.
 
     Top
-vdub-
Posted: Mar 29 2013, 03:45 PM


Advanced Member


Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10



Maybe have ability from settings so when select information. Then launches a mediainfo window for the text sheet or whatever user has set in media info. That way allows copying any info text needed. More over giving us more detailed information that there is now in the info window.

If mediainfo is installed the settings give the option to use mediainfo. User needs to install mediainfo manually to use mediainfo info instead of virtualdub info if needed.
 
    Top
raffriff42
Posted: Mar 29 2013, 06:08 PM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



Here's another suggestion - use ffmpeg's console log. It contains pretty complete file information in plain text format, although it's not very user friendly. If you are doing automated processing anyway you can write a macro to parse it. The unique thing about this method is the color model information it returns.

Here is a sample batch file. In Explorer, drag your video file onto the batch file icon to launch it. It does not encode anything, in order to to save time, but because it's expecting to be told to encode something, it does raise an error message:
CODE
"C:\Program Files\ffmpeg\bin\ffmpeg.exe" -i "%~dpnx1"
pause

Sample output:
CODE
[...]
Input #0, avi, from 'D:\VideoProjects\raw\720p30 AB-m090.avi':
 Duration: 00:00:39.00, start: 0.000000, bitrate: 75905 kb/s
   Stream #0:0: Video: mjpeg (MJPG / 0x47504A4D), yuvj420p, 1280x720 [SAR 1:1 DAR 16:9], 30 tbr, 30 tbn, 30 tbc
   Stream #0:1: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
At least one output file must be specified
Press any key to continue . . .
Of course this is not ideal for mass processing as it appears here. That is left to you as an exercise smile.gif
 
     Top
-vdub-
Posted: Mar 29 2013, 09:48 PM


Advanced Member


Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10



I'm sure if post at Doom9 forum and ask Zenitram http://forum.doom9.org/showthread.php?t=96516 or over at source forge http://mediainfo.sourceforge.net/en/Support better colorspace support would be added to mediainfo
 
    Top
raffriff42
Posted: Mar 30 2013, 12:31 AM


Advanced Member


Group: Members
Posts: 384
Member No.: 35081
Joined: 25-June 12



Oops, my bad. I forgot that MediaInfo does detect color spaces. Here's how it seems to work, in my limited experience:

If a video is YUV in any form, MediaInfo will usually have a 'Color space' line item, and it will read 'YUV.' If the video is RGB, the 'Color space' line, if it is present, will read 'RGB.' The problem comes when there is no 'Color space' item at all. Usually it means the video is RGB, but not always.

There is also a 'Chroma subsampling' line item ('4:2:0', '4:4:4', etc) which I never noticed before! Nice!

Meanwhile, ffmpeg distinguishes all color spaces, although they use their own internal nomenclature for everything. In addition, they distinguish between full range luma (0-255) and 'studio' or 'TV' range (16-235); in the sample output above, we know 'yuvj420p' is full range, because of the 'j.'
 
     Top
-vdub-
Posted: Mar 30 2013, 03:05 AM


Advanced Member


Group: Members
Posts: 613
Member No.: 27087
Joined: 24-February 10



Agree ffmpeg colorspace is better by far and mediainfo should do far better than what it does show atm.

Never have liked ffmpeg far to messy and unable to read quickly. Mediainfo is the opposite (bar colorspace) it is presented neatly so easy to read quickly.
 
    Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
12 replies since Mar 2 2013, 10:43 AM Track this topic | Email this topic | Print this topic

<< Back to General Discussion