Log in

View Full Version : Make x264.exe show some progress, not just counters


LonelyPixel
23rd December 2013, 10:46
I've got the latest x264.exe on Windows, and all it tells me while encoding is how many frames is already processed, but no information whatsoever about how long it's still going to take. What I'm doing now is to open the audio stream in MPC, look at the duration, open a calculator to determine the number of frames, and compare that with the number of frames processed and when I've started the encoding.

There's GUIs that can show a real progress bar from 0 to 100 %. How do they do that? Can't x264 tell me about what it's doing there?

I've found traces on the web, dating back to 2006, when x264 had a --progress option. But that doesn't seem to exist anymore and should be default. I'm not using --no-progress. So I guess it's not my fault?

vivan
23rd December 2013, 11:32
There's GUIs that can show a real progress bar from 0 to 100 %. How do they do that?They do this by using simple math.

Get Komisar kMod x264 build, it shows % and remaining time.

LonelyPixel
23rd December 2013, 12:34
And what is the source for their math? x264 tells the number of processed frames, and everybody can count the time, but where does the total number of frames come from?

LoRd_MuldeR
23rd December 2013, 13:15
x264 does show the progress, in percent, as well as the ETA. But this is only possible, if the total number of frames is known, obviously. Thus, for piped input, you will need to set "--frames" properly, if you want progress.

It looks like this:

http://i.imgur.com/3nFboLp.png

GUI's will simply read x264's text output from the STDERR, parse that output and display the result. At least that's what I do ;)

(Alternatively, the GUI could read only the number of frames processed so far - an info that is always available. But then the GUI would need to figure out the total number of frames itself, in order to calculate the progress)

LonelyPixel
23rd December 2013, 15:57
Here's what it looks like right now:

> x264_64 --preset veryslow --crf 24 00103.track_4113_25p.264 -o 00103.track_4113_25p.264_crf24_veryslow.264
[h264 @ 0000000001147720] Estimating duration from bitrate, this may be inaccurate
lavf [info]: 1920x1080i 1:1 @ 25/1 fps (cfr)
x264 [warning]: input appears to be interlaced, enabling tff interlaced mode.
If you want otherwise, use --no-interlaced or --bff
x264 [warning]: interlace + weightp is not implemented
x264 [info]: using SAR=1/1
x264 [warning]: interlaced (1) > level limit (0)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 5.2
27537 frames: 5.20 fps, 3934.28 kb/s

No progress to be seen. The same happens for VC-1 input. I've never seen x264 show any percentage to me with numerous files.

Atak_Snajpera
23rd December 2013, 16:07
Mux raw files into mkv

LonelyPixel
23rd December 2013, 16:10
Hm, one more copying things around. It's originally demuxed from m2ts, then I transcode the video, if reasonable also some audio streams, then I put it all back together into mkv with all audio and subtitle streams and chapters.

Is there some tool that can simply read the number of frames from a raw h.264 or vc-1 stream?

Atak_Snajpera
23rd December 2013, 16:11
Why do you demux to raw streams? with eac3to you can directly extract video stream to mkv.

LoRd_MuldeR
23rd December 2013, 16:42
You don't get progress information, because x264 cannot know the total number frames for "raw" H.264 streams.

There are plenty of options here. Muxing the "raw" H.264 into MKV with MKVToolnix is one option. Another one would be muxing it into MP4 with MP4Box.

Yet another option would be going the Avisynth + DGIndexNV (http://neuron2.net/dgdecnv/dgdecnv.html) (or FFMS2 (https://github.com/FFMS/ffms2/releases)) route, which avoids remuxing, but needs an additional indexing step.

LonelyPixel
23rd December 2013, 16:50
I'm using tsMuxer for the input m2ts file. I can select the streams I want and they are all saved in one directory so that I can act on them individually. As far as I've seen it, eac3to can only extract the video stream into mkv, so I'd need tsMuxer for the rest (audio, subtitles, chapters - and languages).

Atak_Snajpera
23rd December 2013, 16:57
I'm using tsMuxer for the input m2ts file. I can select the streams I want and they are all saved in one directory so that I can act on them individually. As far as I've seen it, eac3to can only extract the video stream into mkv, so I'd need tsMuxer for the rest (audio, subtitles, chapters - and languages).

wrong! You can extract rest as well.

LonelyPixel
23rd December 2013, 17:50
Okay, so I need to get an overview of the GUIs or how to use the command-line tool otherwise. Thanks for the info so far!

Rumbah
24th December 2013, 00:12
Well, demuxing all streams out of a Bluray (I guess files is the same as eac3to can process files, too) is pretty easy:

eac3to h:
eac3to h: 1) "output folder\moviename.mkv"

Where h: is your Bluray drive (or file I guess), then you get the different titles.
Just select the title number shown with the first command with the ) and after that name the filder and the movie.mkv . Then it'll demux everything and put the video in a mkv.

foxyshadis
27th December 2013, 01:24
If you like your current workflow, tsMuxer will always show "Processed 20898 video frames" at the end of the operation. Just plug that into the --frames command for x264 and poof, instant percentage.

Lathe
15th February 2019, 02:28
If you like your current workflow, tsMuxer will always show "Processed 20898 video frames" at the end of the operation. Just plug that into the --frames command for x264 and poof, instant percentage.

I'm using the current x264 release, and the percentage and the time left do NOT show as with older versions. I added the --frames and it makes no difference.

I know this is several years old, but I have the same issue with the current release.

Thanks! :)

Lathe
15th February 2019, 02:30
Oh, wait a minute... I think you meant to add the NUMBER of total frames, right. Hmmm... so, that would be in the CMD line: '--frames 209,432' or something like that? Is that the right syntax?

Thanks!