Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: AVCHD-video (.MTS) to AVI, fast and easy way

  1. #21
    Join Date
    Feb 2008
    Beans
    157
    Distro
    Ubuntu Development Release

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    I just tried this again on a new install, 9.10 64-bit.

    1.
    Code:
    sudo apt-get install build-essential subversion zlib1g-dev
    2.
    Code:
    svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
    cd mplayer
    ./configure
    make
    sudo make install
    Then, just do it (this command does not downscale the picture)
    Code:
    mencoder 00001.MTS -o 1.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=10000 -fps 50 -vf scale=1920:1080
    There's also another variation, a bit higher quality but about 3 or 4 times larger file size.. There's no point, actually, but anyway (if someone knows how to make video quality ALMOST identical but with smaller file size, let us know...)
    Code:
    mencoder 00001.MTS -o 1.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vqscale=2 -fps 50 -vf scale=1920:1080
    This script just works, just follow the commands above and you should be good with it!

    And then converting the whole directory:

    Code:
    sudo apt-get install csh
    Make a file, name it convert and place it in /bin -folder. Then open the convert-file and put the stuff in it:
    Code:
    #!/bin/csh
    
    # For NTSC change -fps 50 tp -fps 60000/1001 below
    
    foreach f ($*)
       mencoder $f -o ${f:r}.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=10000 -fps 50 -vf scale=1920:1080
    end
    Allow the file to execute as a program. Now, just go to your .MTS-folder and write
    Code:
    convert *.MTS
    See all your files converting...
    Last edited by uhappo; January 17th, 2010 at 09:49 PM. Reason: Typo
    My PC
    Ubuntu user from 18.2.2008
    Oh, my studio and my band

  2. #22
    Join Date
    Jan 2010
    Beans
    12

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    Thank you for some excellent advice, very much appreciated.

    This has worked for me, however when viewing the .avi the picture is not clear at all.

    So the conversion worked and a standard player can see the .avi, but the picture or sound is not clear.

    I get the following errors on the conversion - not sure if this is standard or not ? Can anyone assist. (there are pages and pages of it)

    [h264 @ 0x8815750]mb_type 27 in B slice too large at 77 1
    [h264 @ 0x8815750]error while decoding MB 77 1
    [h264 @ 0x8815750]concealing 6120 DC, 6120 AC, 6120 MV errors
    [h264 @ 0x8815750]PAFF interlacing is not implemented A-V:0.032 [10655:256]
    [h264 @ 0x8815750]concealing 3060 DC, 3060 AC, 3060 MV errors
    [h264 @ 0x8815750]PAFF interlacing is not implemented A-V:0.030 [10644:256]
    [h264 @ 0x8815750]negative number of zero coeffs at 40 1
    [h264 @ 0x8815750]error while decoding MB 40 1
    [h264 @ 0x8815750]illegal short term buffer state detected
    [h264 @ 0x8815750]concealing 6120 DC, 6120 AC, 6120 MV errors
    [h264 @ 0x8815750]PAFF interlacing is not implemented A-V:0.030 [10652:256]
    [h264 @ 0x8815750]concealing 3060 DC, 3060 AC, 3060 MV errors
    [h264 @ 0x8815750]PAFF interlacing is not implemented A-V:0.032 [10651:256]
    [h264 @ 0x8815750]mb_type 54 in B slice too large at 86 1
    [h264 @ 0x8815750]error while decoding MB 86 1
    [h264 @ 0x8815750]concealing 6083 DC, 6083 AC, 6083 MV errors
    [h264 @ 0x8815750]PAFF interlacing is not implemented A-V:0.032 [10650:256]
    [h264 @ 0x8815750]concealing 3060 DC, 3060 AC, 3060 MV errors
    [h264 @ 0x8815750]PAFF interlacing is not implemented A-V:0.034 [10648:256]
    [h264 @ 0x8815750]cbp too large (65) at 83 2

    [h264 @ 0x8815750]PAFF interlacing is not implementedb A-V:0.032 [10400:255]
    [h264 @ 0x8815750]concealing 3060 DC, 3060 AC, 3060 MV errors
    Pos: 12.4s 623f (100%) 13.55fps Trem: 0min 15mb A-V:0.034 [10390:255]
    Flushing video frames.
    Writing index...
    Writing header...
    ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

    Video stream: 10390.797 kbit/s (1298849 B/s) size: 16105736 bytes 12.400 secs 623 frames

    Audio stream: 256.000 kbit/s (31999 B/s) size: 398336 bytes 12.448 secs

    My player is JVC Everio and I am in the UK. 1920 output is the highest quality I am working with.

    Im on Ubuntu 8.04 32 Bit version

  3. #23
    Join Date
    Dec 2006
    Beans
    96

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    Being the thicko of all time I am having difficulty in following your excellent and well prepared conversion method. Where is the bin folder you refer to and how do I make a file called convert?

  4. #24
    Join Date
    Feb 2008
    Beans
    157
    Distro
    Ubuntu Development Release

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    Quote Originally Posted by heracles View Post
    Being the thicko of all time I am having difficulty in following your excellent and well prepared conversion method. Where is the bin folder you refer to and how do I make a file called convert?
    Maybe easiest way could be:
    Code:
    gksudo gedit /bin/convert
    Then place
    Code:
    #!/bin/csh
    
    # For NTSC change -fps 50 tp -fps 60000/1001 below
    
    foreach f ($*)
       mencoder $f -o ${f:r}.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=10000 -fps 50 -vf scale=1920:1080
    end
    inside that file and tada!
    My PC
    Ubuntu user from 18.2.2008
    Oh, my studio and my band

  5. #25
    Join Date
    May 2009
    Location
    Finland
    Beans
    9
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    Quote Originally Posted by uhappo View Post
    Maybe easiest way could be:
    Code:
    gksudo gedit /bin/convert
    You'll need to also do this:
    Code:
    gksudo chmod a+x /bin/convert
    I would also recommend using a different name eg. convertmts, since convert is a program coming with imagemagick (image converter). Not that everyone has that installed, but still.

  6. #26
    Join Date
    Feb 2008
    Beans
    157
    Distro
    Ubuntu Development Release

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    Quote Originally Posted by Wizzu View Post
    You'll need to also do this:
    Code:
    gksudo chmod a+x /bin/convert
    I would also recommend using a different name eg. convertmts, since convert is a program coming with imagemagick (image converter). Not that everyone has that installed, but still.
    You're right. You can use whatever you like, convertmts etc.

    But the main point is that this method works once it's done!
    My PC
    Ubuntu user from 18.2.2008
    Oh, my studio and my band

  7. #27
    Join Date
    Sep 2010
    Beans
    54

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    I tried this:
    Code:
    mencoder 00050.MTS -o 1.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=10000 -fps 60000/1001 -vf scale=1280:720
    but the resulting video is in slow motion. Any ideas?

    David

  8. #28
    Join Date
    Dec 2006
    Beans
    7,349

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    Hi uhappo,

    Does adding vhq:v4mv:trell add much to the quality of the encoding? That is:

    Code:
    -lavcopts vcodec=mpeg4:vhq:v4mv:trell:vqscale=3
    which in theory should give better quality with equivalent or smaller filesize. Other options are available of course but this might be a simple and effective addition?

    Andrew
    You think that's air you're breathing now?

  9. #29
    Join Date
    Nov 2010
    Beans
    6

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    I've tried many mencoder settings found in various forums to convert my sony cybershot mts files, but usually it resulted either in slow motion or audio out of sync.

    finnaly i found settings that worked in this blog:
    http://publicvideos.posterous.com/ho...to-diracogg-th

    mencoder inputfile -fps 50 -oac pcm -demuxer lavf -vf pp=ci,detc,softskip,scale=1440:1080 -ofps 25 -ovc lavc -lavcopts vcodec=mpeg4:format=YV12:vstrict=-1:aspect=16/9:vqscale=1 -o outputfile

  10. #30
    Join Date
    Oct 2009
    Location
    Jakarta
    Beans
    14
    Distro
    Ubuntu

    Re: AVCHD-video (.MTS) to AVI, fast and easy way

    Didn't work for me.
    The MTS files come from a Sony CX760 camcorder and I am running Ubuntu 11.04, 32 bit.

    Running any of the mencoder commands mentioned, e.g.

    mencoder 00001.MTS -o 1.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=10000 -fps 50 -vf scale=1920:1080

    invariable gives an error about 40 seconds into the conversion:


    1 duplicate frame(s)!
    Pos: 68.1s 1903f ( 6%) 41.14fps Trem: 10min 373mb A-V:0.019 [2770:448]
    Too many video packets in the buffer: (319 in 33583582 bytes).
    Maybe you are playing a non-interleaved stream/file or the codec failed?
    For AVI files, try to force non-interleaved mode with the -ni option.



    The -ni option doesn't affect this issue. Also, mencoder normally works for me on other file formats. Can someone please let me know how to get the MTS files converted (so that I can e.g. edit with OpenShot).

    Many thanks
    Ole
    Last edited by uniomni; September 25th, 2012 at 07:39 PM.

Page 3 of 3 FirstFirst 123

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •