Hi guys,
I'm developing a recording application by capturing a camera using DirectShow filters. Do you know any video format that doesn't have file header?
Why I ask this? Because I want to be able to play recorded file which has not beed closed correctly. I'm develping for a special device, so I should consider this.
For example MPEG-2 is headerless but I couldn't fint a good MPEG-2 encoder
Do you know any headerless video file container or video file format? (should have DirectShow encoder)
Thanks![]()
+ Reply to Thread
Results 1 to 14 of 14
-
-
I'm not saying that I am an expert so I could be wrong, but I thought that MPEG-2 had headers. The Teco Bit Rate Viewer tool from the past allowed modification of what I thought was the header information. It's been a very long time since I had to do that, but back in the days when consumer burnable DVD discs and burners were extremely expensive, a lot of us here were making SVCD because you could burn those to CD-R and to get the video files to be compliant I would have to modify the header information sometimes.
HCenc is a free MPEG-2 encoder that is excellent. Years ago I used to use CCE and HCenc was good that I stopped using CCE. -
khodam, you should
harder this subject
I said the old MPEG containers (mpg, and VOB/AOB, and ts) do not use GLOBAL headers. The other "well-known" containers (AVI, MP4, MKV, ASF
, OGG
, etc.) do use GLOBAL headers, and this is the reason why they are not suitable for a "problematic capture environment" like yours
m1v, m2v, m4v, h264, vc1, and the nameless ETC., are elementary streams, and well-designed elementary streams indeed use frame headers and GOP headers
And keep being careful, elementary streams and containers ARE NOT the same thing
ACTUAL "headerless" digital video means a RAW, uncompressed sequence of bytes, and I have no idea of how to deal with such beast in a DirectShow environmentOf course one can store uncompressed video in containers like AVI or MKV, but as you yourself had said already, these latter are not a solution to your problem.
Anyway, and for starters,
http://en.wikipedia.org/wiki/Container_format_(digital)
http://en.wikipedia.org/wiki/Comparison_of_container_formats <= this one has been corrected by ME sometimesLast edited by El Heggunte; 1st Jul 2013 at 07:42. Reason: aaaargh
-
Another option (and safer method would) might be an image sequence , the recorded frames will survive interruptions (e.g. power outages) , but various video formats will often be corrupted
-
by headerless, i take you to mean, avi with no RIFF, assuming an avi stream of some sort.
you will have to write your own custom-like codec. you can do something like this using the "stream" method, whether file or memory.
this was one approach i took in one of my screen capture (delphi) app, where i capture a certain area of the screen (for touch youtube/vemo videos) and converted screendata to raw bitmap->png->stream. no headers to identify the .strm file, so dumping into a directshow or other, player will not play the video. you have to custom make your own player and/or "convert" that stream data back to bitmap images and convert that to an avi. you can do in two-pass or single-pass as in realtime. that is up to you how you do this.
but, if the system crashes, the file may not corrupt, however, the file can become un-readable since it didn't flush out and close completely. it would depend on how the crash occured and where in the process it crashed. so, it may read some or most of the data but only up to the point, give/take, where it crashed, for instance--and that depends on how you code the routines for this.
so, the process was screen->bitmap->png->stream, then stream->png->bitmap->player/viewer. this is the part you decide to do in real-time or two-pass. probably best to do in real-time. in my case, i wrote two apps, one a recorder, and the other a (decoder) player.
i am not very good with streams. that aspect of the tool i did work on was difficult for me to figure out. it was better to figure out how to write avi stream, choose a codec to write (compress) to inside this avi stream versus writing "raw" data to a stream, which is what i did in one of my screen capture apps. -
Do you know any video format that doesn't have file header?
Why I ask this? Because I want to be able to play recorded file which has not beed closed correctly.
This would allow to decode all frames except the last one if the file hasn't been closed correctly. -
jman98:
HCenc is a MPEG-2 encoder software (converter). I need DirectShow encoder filter.
El Heggunte:
Thank you for clarifying this matter. I understood details: frame header, GOP, container, etc.
Well, with all information you provided (as a experienced in V/A), what's your suggestion about container and container format which is best for my situation?
Thanks again
poisondeathray:
I can't record raw video because of storage.
vhelp:
Thank you for your suggestion but I don't need have such time to develop a video encoder/decoder on my own. For now I prefer to use others' encoders. -
Selur's suggestion is "the best" IMHO (mpeg-2 with I-frames only). But keep in mind that a stream without P/B frames does require more bitrate, and possibly you'll need to get more storage space.
but I couldn't find a good MPEG-2 encoder, I will check it out, and will report my findings later (or at least I hope so).
Last edited by El Heggunte; 1st Jul 2013 at 07:59.
-
You can create containerless files with the DirectShow Dump filter. But without headers streams will not be easily identifiable. For example, you could write the raw PCM output of an MP3 decoder filter directly to a file. But it will not be obvious that that file contains PCM audio. The sample size, sample rate, byte order, and number of channels will also not be obvious.
-
El Heggunte:
Thank you for your suggestion
Yes, I couldn't find a good MPEG-2 DirectShow Encoder
I was used to use InterVideo MPEG-2 Video Encoder but InterVideo Inc. was sold to Corel Inc.So development and support of encoder stopped
I'll be waiting for your suggestion about DirectShow encoder. You're good at this
Thanks
jagabo:
Since my video's frame-rate, height, width and other properties is fixed, I can do this but how can I play the video?
Thanks for suggestion -
That's just your opinion alright
Anyway, I have found something that apparently is not that badI think the main reason why many/most mpeg-2 DirectShow encoders suck is, they don't allow the use of custom quantization matrices
Still, the products from LeadTools look reasonably stable and decent, and you can test before you buy of course:
http://www.leadtools.com/sdk/mpeg2-transport.htm, OR
http://www.leadtools.com/sdk/multimedia-suite.htm
Hope this helpsLast edited by El Heggunte; 1st Jul 2013 at 14:51. Reason: fix link
-
Since my video's frame-rate, height, width and other properties is fixed, I can do this but how can I play the video?
Thanks for suggestion
but i think the tricky part is to first realize that you have to determine which codec of today is best for the scenario of if the capture or recording stops unexpectedly, how easily will it be to rebuild it after the crash. you may want to run a few capture-and-crash test scenarios and see which one is the easiest to rebuild the headers to. i'm thinking that an avi container might be the easiest.
there are few mpeg-2 avi formats. matrox, for instance, has a codec suite that you can test each codec in. it also includes the mpeg-2 format. find out which container is easiest to understand (build on your own and rebuild in case of crash) and go with that. still, you want to keep the codec of choice the simplest. that's why i suggested avi in my earlier response because something like mpeg-2 for instance, has gops and other things that get tricky to play around with let alone to understand. have a look at the avi (RIFF) stream format to get an idea how the data is layed out. -
El Heggunte:
Thank you for your link. I contacted to sales team and waiting for response
vhelp:
Your solution is good and working but I can't use it. Thank you very much for your suggestion. Maybe I'll use it later
Similar Threads
-
Can a video Blu-Ray be created with lots of DVD-format video files?
By Calidore in forum Newbie / General discussionsReplies: 15Last Post: 17th Nov 2016, 08:40 -
What popular video format can match the FLV video quality after converting?
By coody in forum Video ConversionReplies: 1Last Post: 26th Aug 2012, 20:30 -
Convert .exe video tutorials(built by Screencam) to video format
By cyforex in forum Video ConversionReplies: 3Last Post: 1st Apr 2012, 16:11 -
.dxa format file to other video format
By Edisonsss in forum Video ConversionReplies: 2Last Post: 2nd Dec 2010, 16:52 -
Recommended Format? Digital8 video to PS3 or PC format?
By fuzzysword in forum Video ConversionReplies: 5Last Post: 26th Apr 2010, 07:19