Results 1 to 4 of 4

Thread: Convert AVCHD to mpg

  1. #1
    Join Date
    Sep 2011
    Beans
    99

    Convert AVCHD to mpg

    Hi there. I did a little search, but didn't understand much of what was said.

    Could somebody pleas help and explain how to convert AVCHD (mts) video files to mp4, or even avi.
    These are videos of my kids so I would like to keep quality, while reducing space.
    Thanks in advance

  2. #2
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Re: Convert AVCHD to mpg

    hi kaizoku typically m2ts has very hi specs Blu ray

    so to reduce size of file maybe we can make the frame size a bit smaller [720p] and keep audio the same so as as to keep high quality see the sample i used below and the reductions [all in red]

    reduce video bit rate from 16000k to 5000k which is still very good quality
    and reduces the file size by two thirds but you can change that to 8000k or whatever you want it to be

    i chose mkv as extension but you can pick avi or mp4 or mpg if you wish. I have reduced the 1080p to 720p. If you want to retain 1080 simply replace -s hd720 with -s hd1080 [of course this will increase size of file]

    =========



    SO simply put your file(s) on desktop in a folder called conversion

    open terminal

    enter
    Code:
    cd Desktop/conversion
    then
    for f in *.m2ts ; do ffmpeg -i "$f" -b 5000k -s hd720 -ab 256k "${f%.m2ts}.mkv"; done

    and that is it


    check properties of new file as opposed to earlier should be about a third in size but still really good def



    Hope this is good for you





    =========






    mediainfo sample_1.m2ts



    Video
    ID : 4113 (0x1011)
    Menu ID : 1 (0x1)
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Main@L4.0
    Format settings, CABAC : Yes
    Format settings, ReFrames : 2 frames
    Format settings, GOP : M=2, N=15
    Codec ID : 27
    Duration : 17s 951ms
    Bit rate mode : Variable
    Bit rate : 11.2 Mbps
    Maximum bit rate : 16.0 Mbps

    Width : 1 440 pixels
    Height : 1 080 pixels

    Display aspect ratio : 16:9
    Frame rate : 29.970 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Interlaced
    Scan order : Top Field First
    Bits/(Pixel*Frame) : 0.240
    Stream size : 24.0 MiB (92%)


    mediainfo sample_1.mkv

    Video
    ID : 1
    Format : MPEG-4 Visual
    Format profile : Simple@L1
    Format settings, BVOP : No
    Format settings, QPel : No
    Format settings, GMC : No warppoints
    Format settings, Matrix : Default (H.263)
    Codec ID : V_MPEG4/ISO/ASP
    Codec ID/Info : Advanced Simple Profile
    Duration : 18s 35ms
    Bit rate : 3 782 Kbps
    Width : 1 280 pixels
    Height : 720 pixels

    Display aspect ratio : 2.35:1
    Original display aspect ratio : 2.35:1
    Frame rate : 59.940 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.068
    Stream size : 8.13 MiB (95%)
    Writing library : Lavc53.6.0
    Language : English
    Default : Yes
    Forced : No
    Last edited by shantiq; March 25th, 2012 at 11:26 AM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  3. #3
    Join Date
    Nov 2011
    Location
    bod
    Beans
    78

    Re: Convert AVCHD to mpg

    I do it according to the following link with ffmpeg, where the x264 codec compresses the file size. I'm running these commands in Ubuntu Studio 11.04. I know that there are differences between the versions, but at least if you have some flavour of 11.04, the standard version of ffmpeg does the job. You install it with the command
    Code:
    sudo apt-get install ffmpeg
    See the following link
    http://ubuntuforums.org/showthread.php?t=1920371

    I intend to wait until 12.04 is out to upgrade to that version, and then modify my scripts to work in the new environment.
    Last edited by pixiq; March 25th, 2012 at 11:07 AM. Reason: typing error

  4. #4
    Join Date
    Jun 2005
    Location
    Belgium
    Beans
    1,522
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Convert AVCHD to mpg

    I do not know in how far your are familiar with command line and ffmpeg instructions.
    With ffmpeg command line you might need to tune the options depending on the specs of the input video (aspect ratio, 25 p or 50 i, ...)
    Alternatives are GUI converters like Winff or Handbrake.
    You could also use a video editor that can open .mts and render it to whatever format you want. Kdenlive, Openshot and Blender VSE can open and render or edit AVCHD.
    I do not recommend to edit directly with the .mts. I render them first with xvid to .avi and do the editing with the .avi files.
    AMD64X2 3800+ 3GB Ram: 11.10
    ACER one T1810 : 11.10 64 bit

Tags for this Thread

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
  •