Hi there, I have an IP Camera which I have configured to record video.
The files it produces are 1min in length and .mp4 extension.
I am trying to join the files together and then after that hopefully use some software to output a file that only contains only every 20th frame.
The problem I am having is that every single piece of software that I have found online that has the functionality to join mp4 files throws an error with these particular files. I have tried around 10 different programs after extensive google searches.
According to the codec info from VLC media player, the file has 2 streams, Stream 0 is mp4a audio 16000hz, Stream 1 is Motion JPEG video (jpeg) at 1600 x 1200 resolution and frame rate of 0.999209 (this matches up with how the camera is configured)
I would greatly appreciate any assistance in dealing with these files.
+ Reply to Thread
Results 1 to 30 of 50
-
-
Hmm. You are right. Nothing works.
Or maybe VLC, it can convert. -
Code:
MP4box -cat "Path to first file" -cat "Path to next file" "Path to output file"
made a second copy of the first to test:
Code:mp4box -cat "c:\Users\Selur\Desktop\1.mp4" -cat "c:\Users\Selur\Desktop\2.mp4" "c:\Users\Selur\Desktop\compine.mp4"
Last edited by Selur; 12th Aug 2011 at 10:18.
-
seems to play fine,... uploaded to: http://www.megaupload.com/?d=AHJSJA5X
(also just made a fix to the command line call, needs to be '-cat' not '-add')
mp4box can't do any video editing so it can't change the frame count, only think you could do with mp4box would be to change the frame rate of the video,.. -
joining the files worked correctly. Now if only I could find a convertor to put them in a format that HandyAVI can understand.
-
You know, a framerate of "0.999209..." is awfully close to 0.999000999 which is 1FPS * 1000/1001. This is just like the B/W -> Color dropped frame adjustment. Maybe, if you set the camera's FPS to = 1 (exactly), then more apps would be able to handle it, and you could make corrective changes down the road if you truly needed to.
However, I would bet that QTPro should handle this (the MJPEG+AAC in MP4), although it wouldn't be able to do the bit about keeping only the 20th frame.
An alternative might be to convert in QTPro from MJPEG @ 1fps (aka 60 Frames/minute) to a BMP picture sequence. Then create a script which deletes all but the 20th frame (aka 20th second) in the temp folder. Then you re-constitute a movie file using the now-corrected 1/20th fps setting. I've done this before in QTPro, so I know it can be done.
I can see you having trouble though with the partial end frames (the part where the sound lasts 18 frames at the end and it doesn't match where the video now lasts 20 frames - that shouldn't matter if the clip TRULY is exactly 1 minute long)...
Scott -
Hello
My problem Videora Ipod Video Converter error code: 100301
Please help me ? -
I don't think he's worried about audio ? If you're selecting every 20th frame ?
Oner option is to use avisynth and ffms2, it will work on your files that have been re-wrapped with mp4box, but not the original files. You can join them with avisynth too
If you want every 20th frame:
ffvideosource("video.mp4")
selectevery(20)
assumefps(1) -
SOrry, my reply was for the original topic
Are you trying to convert to a format suitable for ipod?
Try a different converter like handbrake , xmedia recode, or mediacoder - I think they have ipod presets -
Webtasarim, I have removed your signature as unsolicited advertising is in violation of our rules. Contact the administrator if you wish to advertise. Please read our rules before posting: https://forum.videohelp.com/threads/72386-Forum-rules-Acceptable-Use-Policy-(AUP)
Moderator redwudz -
cezary - avisynth and ffms2 can handle the files if the original files have been re-wrapped with mp4box
So I would batch re-wrap with mp4box (make a batch script, a dos .bat file)
You can do the joining in avisynth and select every 20th frame
e.g
a=ffvideosource("video1.mp4")
b=ffvideosource("video2.mp4")
c=ffvideosource("video3.mp4")
.
.
.
a+b+c+....
SelectEvery(20)
AssumeFPS(1)
You feed that .avs file into any encoder that accepts avs scripts (there are many, it depends what you file format goal is) -
Personally I would join them with mp4box and open the output with ffmpeg, drop the audio (it's not really worth to do a speedup there) and reencode the video with a output framerate of 20fps,..
Cu Selur
Ps.:
1. if you extract the raw video track with mp4box:
Code:MP4Box.exe -add combine.mp4#video -raw 1 -new d:\test.jpg
Code:MP4Box.exe -add test.jpg#video:fps=20 -raw 1 -new d:\speedUpRemux.mp4
2. if you take a hex editor and change the 'mp4v' ot 'mpjg' mplayer can playback the files, without changing the fourcc ffplay is the only crossplatform tool that can play these files.Last edited by Selur; 19th Aug 2011 at 03:28.
-
Also, thank you so much for posting those instructions, I'll be trying them out on Monday morning.
-
yup, I normally use the command line (or write a tool that does it for me
)
btw. mplayer just got patched to handle these file for playback, withput the need of the hex editor changes, see: http://forum.doom9.org/showthread.php?t=162274
Cu Selur -
oh now I see why, it's doing what it is meant to. I actually want the video to be sped up (i.e for example only using the every 20th frame of the original), which is different to 20fps.
-
Well good news, finally got it to work. I'll post the steps that I used for future reference in case anyone has the same issue.
1. wrapped the files in mp4box using the following commands;
MP4Box.exe -add combine.mp4#video -raw 1 -new d:\test.jpg
MP4Box.exe -add test.jpg#video:fps=20 -raw 1 -new d:\output.mp4
2. Used a hexeditor to change 'mp4v' to 'mpjg'. (I'm not sure if this is necessary, but I haven't tested the procedure without it)
3. Using AviSynth I wrote a script with 'ffvideosource("output.mp4")' and then used WinFF to convert the file to AVI.
4. Used another script with 'AviSource("output.avi").AssumeFPS(60, true)' and again ran it with WinFF. -
Why the reencode?
if you:
1. join all files that need to be joined with
Code:MP4box -cat "Path to first file" -cat "Path to next file" combine.mp4
2. extract the videostream
Code:MP4Box.exe -add combine.mp4#video -raw 1 -new d:\test.jpg
Code:MP4Box.exe -add test.jpg#video:fps=20 -raw 1 -new d:\output.mp4
This should result in a file with the videostream @60fps. (works here, no need to reencode at all)
Cu Selur -
I was converting it so that I could use the command
Code:"AviSource("output.avi").AssumeFPS(60, true)"
However I just triedCode:ffvideosource("test.mp4").Selectevery(100)
-
.AssumeFPS(60, true) -> changes frame rate
.Selectevery(100) -> drop frames (only takes each 100th frame) -
When I use the command
Code:MP4box -cat "Path to first file" -cat "Path to next file" combine.mp4
It seems the first file is repeated twice followed by the second file.Last edited by Anonymous3; 29th Aug 2011 at 15:31.
Similar Threads
-
I have a problem with mp4 files in virtualdub, slow motion audio.
By barbur in forum Newbie / General discussionsReplies: 5Last Post: 12th Feb 2012, 14:16 -
ffmpeg help... convert mp4 to jpeg array, and back to mp4 - problem!
By SaskVideoMaker in forum Video ConversionReplies: 2Last Post: 4th Feb 2011, 05:53 -
how can i normalise the volume of a mp4 file which is a combined file
By sumeshkri in forum Newbie / General discussionsReplies: 4Last Post: 4th Sep 2010, 22:05 -
Best Conversion from AVI (Motion JPEG) to MP4
By cademichaels in forum Video ConversionReplies: 3Last Post: 12th Apr 2010, 22:34 -
Converting VOB file to MP4 file. Video is perfect, audio is nonexistent.
By jdfrosty in forum ffmpegX general discussionReplies: 6Last Post: 17th Jul 2007, 19:31