VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member
    Join Date
    Jan 2013
    Location
    Albury, NSW, Australia
    Search Comp PM
    I have a web cam that I take a picture every minute of the day. At midnight I turn this into an .avi video with the command.

    ffmpeg -y -i img-%d.jpg -an -qscale 1 -vcodec msmpeg4v2 -b 5000k webcam2-video-hi.avi

    This produces an AVI file that is about 121 MB and runs for about 58 seconds on Youtube. I view this at 720p HD. In full screen it is still clear and not grainy.

    http://www.youtube.com/watch?v=rjfW6wHA5lQ

    When I convert the AVI file to mp4 the quality is poor and very grainy. I convert the file to mp4 so it is smaller and also able to be played on Ipad etc. The video is the same length about 58 seconds but is only about 10 mb in size. BUT the quality is all grainy even in 720p HD. The command I use currently is:

    mencoder webcam2-video-hi.avi -o webcam2-video-hi.mp4 -oac copy -ovc lavc -lavcopts vcodec=mpeg1video -of mpeg

    An example of this is on youtube at http://www.youtube.com/watch?feature=player_detailpage&v=JM33Xm3qsVM

    In full screen it is grainy and the quality is not very good compared to avi

    Is there a way to keep the same quality from the avi file when it is converted to .mp4 ??

    I have ffmpeg and mencoder loaded so either one or any other if you think it will work.

    Thanks
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    Use avc/h264 video codec instead of mpeg1video. You can use it directly in ffmpeg also.

    ffmpeg with the x264 h264 encoder:
    http://ffmpeg.org/trac/ffmpeg/wiki/x264EncodingGuide

    mencoder:
    http://wiki.quakeworld.nu/Mencoder_howto#2.2._x264_codec
    Last edited by Baldrick; 27th Jan 2013 at 06:55.
    Quote Quote  
  3. Member
    Join Date
    Jan 2013
    Location
    Albury, NSW, Australia
    Search Comp PM
    I have tried the following ommand and it sems to work will know tonight when the script runs. When I run from terminal I get an error but the file still seems to be created.


    mencoder webcam2-video-hi.avi -o webcam2-video-hi2.mp4 -ovc x264 -x264encopts bitrate=3000 pass=1 nr=2000
    MEncoder SVN-r31628-4.4.5 (C) 2000-2010 MPlayer Team

    WARNING: OUTPUT FILE FORMAT IS _AVI_. See -of help.
    success: format: 0 data: 0x0 - 0x790c0aa
    AVI file format detected.
    [aviheader] Video stream found, -vid 0
    AVI: No audio stream found -> no sound.
    VIDEO: [MP42] 1028x772 24bpp 25.000 fps 17623.1 kbps (2151.3 kbyte/s)
    [V] filefmt:3 fourcc:0x3234504D size:1028x772 fps:25.000 ftime:=0.0400
    Opening video filter: [expand osd=1]
    Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
    ================================================== ========================
    Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
    Selected video codec: [ffmp42] vfm: ffmpeg (FFmpeg MSMPEG-4 v2)
    ================================================== ========================
    Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
    x264 [info]: using SAR=1/1
    x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
    x264 [info]: profile High, level 3.1
    Writing header...9f ( 0%) 0.00fps Trem: 3min 0mb A-V:0.000 [0:0]
    ODML: vprp aspect is 4:3.
    Writing header...
    ODML: vprp aspect is 4:3.
    File not found: 'pass=1') 20.00fps Trem: 0min 18mb A-V:0.000 [2853:0]
    Failed to open pass=1.
    Cannot open file/device.


    Exiting...
    You have new mail in /var/spool/mail/root
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    I have no idea. I only use ffmpeg and I just googled that mencoder example. Try google for mencoder x264 for more examples.
    Quote Quote  
  5. Member
    Join Date
    Jan 2013
    Location
    Albury, NSW, Australia
    Search Comp PM
    Originally Posted by Baldrick View Post
    I have no idea. I only use ffmpeg and I just googled that mencoder example. Try google for mencoder x264 for more examples.

    If you were to use ffmpeg to convert the files what command would you use??

    The file created by the script did not upload to youtube by youtube upload script or manually running the script I got an error:


    EDIT:
    I just uploaded the video manually with firefox and it uploaded fine so maybe not a file probelm
    Last edited by gilesaj; 27th Jan 2013 at 07:32.
    Quote Quote  



Similar Threads

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