Trim MP4/h264 video file WITHOUT tools

posted in Video Codecs, viewed 1653 times

Yeah, I need it to run on a server running ASP page.
I can’t use any external tools like ffmpeg.
I want my video file to be trimmed from eg. 5sec to 20sec,
so I get a new, 15sec long video.

All I can do is copy raw binary data from mp4 files to make new one.

And this (more or less) works if I start at the beginning of the video. But if I start in the middle of the video it doesn’t play.

I copied entire header, and then an approximate bytes from both video and audio stream, calculated from simple equation like avgBitrate * duration or similar.

I use C#, but will appreciate any help.
Maybe I have to somehow rewrite the header, or am I missing something in the video stream? reply

Feedback
08-28-2012 10:57 AM
rakoczyn

Everythink is OK I dont listening what you teinllg, maybe this is good information, but of JUST FIRST LOOK aboiut psichology and more audience presentation situation I have to you one advice, dont shake you hands everytime, take him on legs or somethink but dont shaking just like you moving fly’s around. Sorry of my bad english experience, but this is advice of my expierence of 10 years lecturing reply

Feedback
01-22-2013 03:28 PM
Andrey

Reply

Topic
Your reply
Your name
or log in
Verify you're human

By submitting this form you agree to our posting rules,
privacy policy and our disclaimer.