NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 33 34 35 36 37 … 93 Next »
get esitimated final MPG size

 
  • 0 Vote(s) - 0 Average
get esitimated final MPG size
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#1
2008-04-08, 04:54 AM
I have been trying to estimate the final file size of an output MVP Transcoded MPG.

This is so I can compare the current size to the 'final' size and get a good indication of the progress. It is so that I can also get an idea of how well my computer is performing.

Also, after the progress has passed a level (like 80%) I can assume that the transcode will complete successfully, rather than bail or kak...

ffmpeg and mencoder give me log files that I can parse. VLC doesn't give me anything that I can parse that has position, progress, fps...

I run mplayer on a file, and I get secs, and the frame count.
Supposedly, (vbitrate (kbit) * 1024 + abitrate (kbit) * 1024) * secs = Total Bits /8 to give total bytes...

Apparently this quation is for fixed bit rate, but that is what ZProcess/Transcoder is set for...

And yet, the numbers are quite off track for wmvs.

Is there a better way?
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,723
Threads: 767
Joined: Nov 2003
#2
2008-04-08, 05:07 AM
This isnt an excercise I've tried, so I dont really have any solid advice for you. Keep in mind that some times ffmpeg will use a significantly lower bitrate than requested.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#3
2008-04-08, 05:24 AM
'm not exacly clear on what you want. Are you trying to calculate the size of a WMV output?
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#4
2008-04-08, 05:54 AM
whurlston Wrote:'m not exacly clear on what you want. Are you trying to calculate the size of a WMV output?

Here is goes. This is the reason that I haven't been successful with searching...

I have a non mpeg file I want to transcode to MPG (ZProcess)

In order to get the input files framerate, frames, secs, dimensions etc, I run it through mplayer, with nul video,audio outputs. This makes mplayer crash but not before it gives up that info. (really really fast, without a hiccup from the cpu...)

Anyway, with this technique, I get most all info from divx/xvid AVI, and wmvs plus assorted mp4s...

I want to get an estimate of the final size of an output transcoded file.

So if I take a 5 minute divx and transcode it to mpg, at a fixed video bitrate and audio bitrate, I should be able to get a final size with the math from above...

unfortunately wmv seems to have something else going on.

Anyway, all this comes about as I was able to get progress and fps monitoring working in ZProcess for mencoder and ffmpeg. In the last couple of days, I wanted to bring VLC into the fold, but it does not report it's fps or progress that I can see...

So I started checking for file size growing, and when it stops, it should be done right?

Trouble is, I also want to be sure that the resultant file size is close to the expected size, so that ZProcess can consider it a successful transcode, rather than a fail, in mid stream...

ALL THIS was just an attempt to get another transcoder, and possibly a faster one too...

Alas, my messing around has broken ZProcess, and I had to restore a couple of days. That's cool (hey did you hear that? I restored...)

Anyway, unless I here of an easier way, I'll give it a rest...
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#5
2008-04-08, 06:07 AM
Ok, so you just basically need the metadata from an existing wmv files so that you can calculate the expected mpg filesize. From that equation you posted, it seems that all you really need from the wmv file is the length of the runtime in seconds. That can be obtained by querying the metadata headers in the wmv file. I actually do this for the netflix plugin so that I can calculate how much of the end of the file I need to download to get seeking to work. (Markers are stored at the end of a wmv file.)

I have some .net code I can give you to query the wmv file. It will give you runtime (in ticks but that can be converted to seconds) as well as other metadata. It will be tomorrow before I can get it to you though.
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#6
2008-04-08, 07:31 AM
whurlston Wrote:Ok, so you just basically need the metadata from an existing wmv files so that you can calculate the expected mpg filesize. From that equation you posted, it seems that all you really need from the wmv file is the length of the runtime in seconds. That can be obtained by querying the metadata headers in the wmv file. I actually do this for the netflix plugin so that I can calculate how much of the end of the file I need to download to get seeking to work. (Markers are stored at the end of a wmv file.)

I have some .net code I can give you to query the wmv file. It will give you runtime (in ticks but that can be converted to seconds) as well as other metadata. It will be tomorrow before I can get it to you though.

That might be the reason wmvs are so different from avis... mplayer does give me the seconds for both files, but it seems to be wrong for wmv...

love to look at the code...
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#7
2008-04-08, 08:30 AM
No problem. I'll get it to you tomorrow. It's basically a modified version of the Metadata Editor from the WMF SDK. If you download the SDK, there is a managed wrapper and command line program for it included. I modified it to be a dll instead of a command line app and return an array of the metadata tags.
zehd
Offline

Posting Freak

Posts: 5,119
Threads: 249
Joined: Feb 2006
#8
2008-04-08, 04:13 PM
whurlston Wrote:No problem. I'll get it to you tomorrow. It's basically a modified version of the Metadata Editor from the WMF SDK. If you download the SDK, there is a managed wrapper and command line program for it included. I modified it to be a dll instead of a command line app and return an array of the metadata tags.

And that's only for wmvs?
Frank Z
[COLOR="Gray"]
I used to ask 'why?' Now I just reinstall...
[SIZE="1"]______________________________________________
Author: ZTools: ZProcess, MVPServerChecker; UltraXMLTV Enhancer, Renamer, Manager; [/SIZE]
[/COLOR]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#9
2008-04-08, 10:15 PM
wmv and asf for sure. I haven't tested it on anything else. I just got home so I'll send you what I have tonight after I eat and spend some quality time with my wife.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Actual size of inner element in NPVR scb147 2 1,771 2010-11-02, 06:40 PM
Last Post: scb147
  Determining text size and available space Ommina 2 1,671 2010-03-15, 05:34 AM
Last Post: sub
  "Natural" size of a CompositeImage? PartialGestalt 2 1,906 2008-10-24, 03:30 PM
Last Post: PartialGestalt
  Record to File Size "Segments" h0st1le 13 4,215 2008-05-20, 10:48 PM
Last Post: mvallevand
  MVP mp3 file size problem ubu 10 3,619 2007-01-26, 12:51 AM
Last Post: sub
  changing the OSD size? reven 5 2,475 2006-03-23, 05:32 AM
Last Post: sub
  where does the "record" box for the tv guide get its size/pos? reven 7 2,466 2005-05-27, 04:31 AM
Last Post: reven
  Skin Size yankees 3 2,305 2005-01-04, 04:26 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode