View Full Version : number of frames after encoding
droeniel
19th April 2006, 15:38
Hi!
I have a short and simple question about encoding.
Does anyone else have the problem that the last frame ist ALWAYS missing after the encoding process?
e.g. When I encode a uncompressed avi file with 180 frames - rm file has 179.
You could say: Who needs the last frame?
It's me!!! Can someone help? ;-)
rascar
20th April 2006, 04:02
If I am not wrong the encode has all the frames, but the decode does not flush the last frame. Dont know if that is of any help to you,. The player has to instruct the decoder to flush the last frame. (Even Rp may not do that)
Thanks,
-Neelesh
droeniel
20th April 2006, 10:19
If I am not wrong the encode has all the frames, but the decode does not flush the last frame. Dont know if that is of any help to you,. The player has to instruct the decoder to flush the last frame. (Even Rp may not do that)
Thanks rascar for your quick response!
But I'm still not totally convinced about the encoding behaviour. ;-)
What I tried to do is:
- Spilt a large uncompressed avi into smaller segments
- Encode the segments separately to rm (on different machines)
- Merge the rm-files to one rm-file (result-file)
Unfortunately the length of the result file doesn't fit. It's too short.
Depending on how many separate segments I used.
And you can see the blendings, where I merged the files.
That's why I guessed the encoder drops some frames (first frame and last frame?)
Can you reproduce this?
karl_lillevold
20th April 2006, 21:32
droeniel: What do you use to merge the segments?
I am pretty sure the first frame can not be missing, since each segment would start with a key frame, and if that is missing, the first few seconds of that segment would not be decodable.
I am not sure about the last frame though. I would have to try myself, maybe I will if I find some time.
droeniel
20th April 2006, 23:35
hi karl! thanks to you, too, for your quick response!
I tried both the Helix DNA Producer SDK (Version 11/10 Win) and the RealProducer Basic (latest version).
Same behaviour. Now I guess it's really the last frame, that is missing.
Unfortunately I have no good "debug tool" to seek in the video and show each frame separately.
I think you have to be senior codec developer to have such a thing :-), but if I play-back a file
with timecode in it, it stops on the second to the last frame.
takk skal du ha,
daniel
karl_lillevold
20th April 2006, 23:55
Heisann daniel, I actually meant which tool you used to merge the segments, but I am guessing you then used the RealMedia Editor GUI called from File->Edit File in Producer. I usually use the rmeditor.exe cmd line tool, but it should behave the same way. Unfortunately, rmeditor has not been worked on for quite a while, and it is likely to be a bug in this tool.
To singlestep in any RM file, you can use RealMediaSplitter (google for it). This is a DirectShow filter that calls into the codec DLLs that were installed with RealPlayer. You can then open the RM file in Media Player Classic (recommended, or any DS player). These allow single stepping with the arrow keys.
Even more advanced, you can install Avisynth, and create an Avisynth script, that looks something like:
v = DirectShowSource("filename.rmvb", fps=25)
return v
This text file, saved as filename.avs, behaves as an AVI file after Avisynth is installed, and allows you to open it in typical AVI file editors like VirtualDubMod, in which you also can examine each individual frame carefully, or even save the file as an uncompressed AVI file.
I am curious if the last frame is displayed with the DirectShow method.
I will try this out tomorrow sometime myself.
droeniel
21st April 2006, 14:41
thx for the tips!
I used the rmeditor from the sdk as base for my own application.
But I tried merging with the RealProducer aswell (File->Edit RealMediaFile->Append Real Media File).
And with the precompiled command-line application "rmeditor" also.
I'm not really sure where the problem lies. But I assume the encoded files to be too short (corrupted?).
When I singlestep in the rm files, both versions (realproducer/helix producer generated) don't show the last frame ever.
The difference between them both is, that the Realproducer's framesize seems to be correct. (examined with RM Analyzer/Shell Extension)
The Helix Producer's (cmdline / Build 11.0.0.2013) framesize is one frame too short. Could that be?
Merging the files of both versions afterwards still produces same effect. (too less frames/rough blendings)
Here are my settings, that I use (maybe it's important):
Sourcefile:
- DV 25 AVI @ 25fps, 720x576, video only
Encoder Settings:
- video only
- prefilter: resize to 320x240 (would be nice)
- 1 Pass
Audience-Settings:
- 480 Kbit/s
- CBR
- FPS: 25
- complexity: high
- lossprotection: on
- keyframe interval: 8s
- startup latency: 4s
Wish you all a nice weekend.
cheers,
daniel
siddharthagandhi
29th April 2006, 15:24
I have a similar problem. In order to analyze the quality of the file using software such as MSU's quality metric tool the frames and video parameters have to match the source file's. For other codecs this can be achieved by trimming the first frame, however; I don't know what to do with RealProducer's .rmvb file, which doesn't work properly no matter how many frames I trim. What avisynth commands can I use to correct this? (the file is frameserved (i think thats the proper term, right?) using avisynth)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.