VideoHelp Forum




+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 50
  1. 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.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Can you post a sample?
    Quote Quote  
  3. sure can. Please see attached.
    Image Attached Files
    • File Type: mp4 01.mp4 (14.36 MB, 195 views)
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Hmm. You are right. Nothing works.


    Or maybe VLC, it can convert.
    Quote Quote  
  5. Code:
    MP4box -cat "Path to first file" -cat "Path to next file" "Path to output file"
    seems to work fine here to join such files.
    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.
    Quote Quote  
  6. Thanks for that Selur. Did the combined file display correctly?

    If it did, I guess my next question is does mp4box have the ability to output a file from another file that only contains every x frames? i.e to create a speeded up version of the first.
    Quote Quote  
  7. 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,..
    Quote Quote  
  8. joining the files worked correctly. Now if only I could find a convertor to put them in a format that HandyAVI can understand.
    Quote Quote  
  9. Never used HandyAVI (to be frank it's the first time I even heard of it), if you have some infos what format HandyAVI support, it's probably not really hard to use i.e. mencoder or ffmpeg to convert the file.
    Quote Quote  
  10. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    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
    Quote Quote  
  11. Hello

    My problem Videora Ipod Video Converter error code: 100301



    Please help me ?
    Quote Quote  
  12. 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)
    Quote Quote  
  13. Thank you for your reply.I examine the links
    Quote Quote  
  14. Originally Posted by Webtasarim View Post
    Thank you for your reply.I examine the links
    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
    Quote Quote  
  15. yes ipod for.

    Thank you poisondeathray
    Quote Quote  
  16. Mod Neophyte Super Moderator redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    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
    Quote Quote  
  17. Thank you for all your suggestions. I tried mencoder, ffmpeg, mp4box, qt pro, plus about 10 other programs, nothing can handle the files. Oh well.
    At least I know how to do the second part now thanks to poisondeathray!
    Quote Quote  
  18. 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)
    Quote Quote  
  19. Thank you for all your suggestions. I tried mencoder, ffmpeg, mp4box, qt pro, plus about 10 other programs, nothing can handle the files.
    Strange I can join the files with mp4box and reencode with ffmpeg without a problem,...
    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
    and mux the raw stream with:
    Code:
    MP4Box.exe -add test.jpg#video:fps=20 -raw 1 -new d:\speedUpRemux.mp4
    the output plays at 20fps.
    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.
    Quote Quote  
  20. I think the problem may lie with me being lazy and using the gui versions rather than going for command line. Selur, I assume you were using command line of mp4box and ffmpeg?
    Quote Quote  
  21. Also, thank you so much for posting those instructions, I'll be trying them out on Monday morning.
    Quote Quote  
  22. 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
    Quote Quote  
  23. ok so I used those 2 commands in mp4box and created a file called speedUpRemux.mp4. It's not sped up in any way though. Selur did it work for you?
    Quote Quote  
  24. 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.
    Quote Quote  
  25. I'm going to try re-wrapping them first in mp4box and then using AviSynth as suggested by poisondeathray.
    Quote Quote  
  26. 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.
    Quote Quote  
  27. 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
    (add additional -cat "Path to Xst file" before "Path to output file" to join more files)
    2. extract the videostream
    Code:
    MP4Box.exe -add combine.mp4#video -raw 1 -new d:\test.jpg
    3. create a newMp4 files form the videostream
    Code:
    MP4Box.exe -add test.jpg#video:fps=20 -raw 1 -new d:\output.mp4
    4. use a hexeditor to change 'mp4v' to 'mpjg'.

    This should result in a file with the videostream @60fps. (works here, no need to reencode at all)

    Cu Selur
    Quote Quote  
  28. I was converting it so that I could use the command
    Code:
    "AviSource("output.avi").AssumeFPS(60, true)"
    which didn't work for .mp4 files.

    However I just tried
    Code:
    ffvideosource("test.mp4").Selectevery(100)
    , which worked great. Actually better because the file size produced is much smaller.
    Quote Quote  
  29. .AssumeFPS(60, true) -> changes frame rate
    .Selectevery(100) -> drop frames (only takes each 100th frame)
    Quote Quote  
  30. When I use the command

    Code:
    MP4box -cat "Path to first file" -cat "Path to next file" combine.mp4
    On two files, both of which are exactly 1 min in length, the resulting file comes out to be 3 minutes. I'm not sure what's happening.


    It seems the first file is repeated twice followed by the second file.
    Last edited by Anonymous3; 29th Aug 2011 at 15:31.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!