VideoHelp Forum




+ Reply to Thread
Results 1 to 2 of 2
  1. Member
    Join Date
    Feb 2008
    Location
    Ukraine
    Search Comp PM
    Scope:

    I have two files of different format. The first one is wmv and the second one is mp4. All I need to do is to merge these files and then convert them to 3gp.
    This should be done in linux command string.
    I use ffmpeg software for this.

    What I've already done:

    At first step I tried to convert both files to 3gp with success.
    Then I tried to convert both to avi and then merge.

    I use the following command lines:

    Code:
    ffmpeg -i input.mp4 -f avi -s 352x288 -b 200 -r 25 - > temp.avi
    ffmpeg -i promo.wmv -f avi -s 352x288 -b 200 -r 25 - >> temp.avi
    ffmpeg -i temp.avi -acodec libamr_nb -s 352x288 -ar 8000 -b 120000 -vcodec h263 -ab 10.2k -ac 1 output.3gp
    After this I've merged video file where the first part is ok, but in the second one I've awful sound.
    The problem is not in the exact solution. I need to merge mov and flv, mp4 and 3pg, etc.
    The question is how I should do this correctly. Probably I need to convert both video to some kind of raw data file with some format (also may be I need to set the same bitrate, framerate, etc). After this I'll be able to merge the files and then convert to format I need.

    So the problem is more theoretical then practical.

    Any help is appreciated!
    Thanks.
    Quote Quote  
  2. Member
    Join Date
    Feb 2008
    Location
    Ukraine
    Search Comp PM
    Finally I've the following lines:

    Code:
    ffmpeg -i promo.mov -f avi -s 352x288 -r 29.97 -ar 44100 -b 120000 -ab 64k -ac 1 - > temp.avi
    ffmpeg -i input.mp4 -f avi -s 352x288 -r 29.97 -ar 44100 -b 120000 -ab 64k -ac 1 - >> temp.avi
    ffmpeg -i promo.wmv -f avi -s 352x288 -r 29.97 -ar 44100 -b 120000 -ab 64k -ac 1 - >> temp.avi
    ffmpeg -i temp.avi -f avi merged.avi
    ffmpeg -i merged.avi -vhook '/usr/local/lib/vhook/imlib2.so -x 0 -y 0 -i watermark.png' merged-watermark.avi
    ffmpeg -i merged-watermark.avi -acodec libamr_nb -s 352x288 -ar 8000 -b 120000 -vcodec h263 -ab 10.2k -ac 1 output.3gp
    This works fine.
    Quote Quote  



Similar Threads

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