VideoHelp Forum




+ Reply to Thread
Results 1 to 14 of 14
  1. Member
    Join Date
    Jul 2007
    Location
    Australia
    Search Comp PM
    Hi

    Im using a JVC HDD camera in a school environment and they output a file extension of .mod

    I have researched it and discovered it is just a renamed mpeg2 file. I have renamed the extension to .mpg, but Windows Movie Maker seems to struggle with this file when imported. When i looked that up i have heard many people say this is common!?

    I have decided the best remedy would be to convert them to RAW AVI (to avoid loss for further editing) however i want other student to be able to do this so i want a conversion tool that can be run from the command prompt so i can script the conversion for them automatically.

    Can anyone please help me to find such a tool or suggest a better method?

    Thanks
    Josh
    Quote Quote  
  2. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    ffmpeg

    http://esby.free.fr/CelticDruid/mirror/ffmpeg/ffmpeg.rev9767.7z



    all 1 line

    ffmpeg -i yourfile.mod -vcodec rawvideo -acodec pcm_s16le -r 15 -s 720x480 -aspect 4:3 yourfile.avi
    Quote Quote  
  3. Member
    Join Date
    Jul 2007
    Location
    Australia
    Search Comp PM
    wow thanks for the fast reply!


    youll have to excuse my ignorance...

    i just tried your method and it worked great except one thing. The file converted fine and its file size indicates it has worked but when i go to play it i get the sound ok, but no video. WMP connects and looks for a codec.

    I looked online for a solution and most ppl said it is missing the codec which i tend to agree with, but the problem is i did all these steps on a computer which has just had windows xp installed last week, then the Dscaler MPEG2 codecs and then DivX codecs.

    Any ideas?
    Quote Quote  
  4. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Well, it is raw video, so you actually need a way to decode it. FFdshow will allow you to do so.
    Quote Quote  
  5. Member
    Join Date
    Jul 2007
    Location
    Australia
    Search Comp PM
    Firstly Thanks for your advice

    2 Problems however. i will need to deploy to/reimage over 200 computers. which is possible just not preferred.

    Secondly,
    I installed FFDShow enabled the RAW Video & Allowed MovieMaker To Use FFDShow etc. in WMP i was able to play the video but if i try and import it into movie maker, movie maker says it cant find the codecs.

    Is there a more simple way to get these videos to work in movie maker? what should i do, easiest solution possible as its only going to be used inmovie maker with some kids, no crazy advanced editing happening at all.

    Thanks
    Quote Quote  
  6. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Yeah, I can understand that.... Well, ffmpeg will output into many different file types. From the command line, if you type

    ffmpeg -formats


    you'll see the myriad assortment of different ones.... So, the question becomes, which lossless one won't require the installation of additional codecs on the workstations....

    BTW, here's syntax for ffmpeg for many different applications and formats.

    http://itbroadcastanddigitalcinema.com/ffmpeg_howto.html

    I'm going to look around. There are many ways to do this. FFmpeg is just the most painless method.


    out of curiosity, what happens when you try this:

    ffmpeg -i input.mpg -vcodec copy -acodec pcm_s16le -y output.avi

    That might work and doesn't require converting the mpeg video.
    Quote Quote  
  7. Member
    Join Date
    Jul 2007
    Location
    Australia
    Search Comp PM
    I tried your command and it unfortunately did the same thing, audio but no video and it trys to acquire a codec.

    As for trying other formats i will attempt that shortly. thanks
    Quote Quote  
  8. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by Soopafresh
    out of curiosity, what happens when you try this:

    ffmpeg -i input.mpg -vcodec copy -acodec pcm_s16le -y output.avi
    Originally Posted by jwoodsfsp
    I tried your command and it unfortunately did the same thing, audio but no video and it trys to acquire a codec.
    It wouldn't.
    you can't just stream mpeg2 video into an avi container. mpeg in avi is vfw encoded.
    perhaps there is the analogous of avc2avi somewhere, but i've never seen it.
    probably died at inception, or with vdubmod's birth

    (however if it's mpeg2 without b frames, it should work fine if you set the fourcc to MPG2 and enable ffdshow's mpeg VFW decoding)

    use huffyuv.

    gl
    Quote Quote  
  9. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    use huffyuv

    Yes, the best idea, but he didn't want to install an additional codec on his farm of PCs.


    ffmpeg -i input.mpg -vcodec huffyuv -acodec pcm_s16le -y output.avi
    Quote Quote  
  10. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    dv then
    Quote Quote  
  11. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    -rawvideo should output raw video will output raw YUV. You would need to add -pix_fmt rgb24, then no decoder would be needed, however I just tried it and the video is flipped (converting YV12 to RGB results in a vertical flip) and U/V are reversed (blue skin look). Maybe use mencoder?

    Could also frameserve via AVISynth with converttoRGB24().flipvertical(), but then you need AVISynth installed.
    Quote Quote  
  12. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by celtic_druid
    -rawvideo should output raw video will output raw YUV. You would need to add -pix_fmt rgb24, then no decoder would be needed, however I just tried it and the video is flipped (converting YV12 to RGB results in a vertical flip) and U/V are reversed (blue skin look). Maybe use mencoder?
    the thought crossed my mind, but i wasn't too bothered with trying it out.
    other solutions seemed better.

    anyway pix_fmt=bgr24 returns correct colours.
    I guess you should be able to mirror vertical flip in the editing program

    I can't get mencoder to do it.
    mencoder whatever.mpg -ovc raw -oac pcm -vf format=bgr24,flip -o raw.avi
    is rubbish, i tried -ffourcc which does nothing
    i tried messing with another fourcc changer,
    i tried going raw and muxing with ffmpeg but ffmpeg can't read the mencoder raw file.

    if you have any ideas i'm interested in trying them

    ty
    Quote Quote  
  13. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    Evening guys.

    I've been gathering various command line tool's param scripts for use in several
    projects that I am workiong on .. ffmpeg and mencoder are some examples. And after
    reading this topic, I became interested in the problem.

    @ 45tripp

    Q: is it possible that maybe the problem could be in the mencoder version you are using ??

    To my knowledge, I only have one version: mencoder 1.0pre7-3.4.2

    I was curious about the issue you were having (above) and you are correct in
    that mencoder is not performaning as expected -- for RGB, (bgr24) conversions.
    In an effort to try and help out (if I can) I've tried many attempts at different
    variations .. bgr2rgb=yes / bgra / rgba / rgb24 / rgb32 / .. and many others that
    I found on my own and through google searching, last night. The thing just won't
    work for anything that is RAW and RGB/BGR related together.

    In one of my command line projects, (set to mencoder), I ran the following
    cmd-line parm scripts below and at least these worked like a charm:

    --> MPEG Video_Source -to- RAW_yuv AVI format

    mencoder input.mpg -ovc raw -oac pcm -vf format=yuy2 -o output.avi
    mencoder input.mpg -ovc raw -oac pcm -vf format=yv12 -o output.avi

    For MPEG-2 sources (assuming by commercial or recorded dvd medium) it would prob
    be wiser to convert to its native YUV->YV12 color space format to begin with, rather
    than RGB. I realize that the above was an exercise for the discussion -- although I
    sometimes go against the prefered beneficial routes

    -vhelp 4371
    Quote Quote  
  14. Member
    Join Date
    Dec 2004
    Location
    Triptonia
    Search Comp PM
    Originally Posted by vhelp
    Q: is it possible that maybe the problem could be in the mencoder version you are using ??
    I think not.
    I use sherpya builds,
    ever since soopafresh pointed to them
    http://oss.netfarm.it/mplayer-win32.php

    Originally Posted by vhelp
    To my knowledge, I only have one version: mencoder 1.0pre7-3.4.2
    update to latest svn snapshot.

    Originally Posted by vhelp
    mencoder input.mpg -ovc raw -oac pcm -vf format=yuy2 -o output.avi
    yuy2 output is default

    Originally Posted by vhelp
    I realize that the above was an exercise for the discussion -- although I
    sometimes go against the prefered beneficial routes
    the object was to get rgb and avoid decoders.

    another viable solution is to output to an image sequence with mplayer.

    i still wonder about the rgb avis not working and would like it if info became available,
    but i'm not loosing much sleep.


    tripp
    Quote Quote  



Similar Threads

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