Tag Archives: ffmpeg

How to Combine a JPG and WAV File to FLV File

Motivation:

  • You have a JPG and WAV file.
  • You want to combine them to a FLV file in order to upload it to YouTube without losing audio quality.

Solution:

  1. Download ffmpeg.
  2. Unzip the downloaded package to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build folder.
  3. Copy your Image.jpg and Audio.wav file to C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build/bin folder.
  4. Open Command Prompt.
  5. Execute the commands below.
    cd C:\Users\admin\Downloads\ffmpeg-7.0.1-essentials_build\bin
    ffmpeg -r 1 -loop 1 -i image.jpg -i audio.wav -acodec copy -r 1 -shortest -vf scale=1280:720 Video.flv
  6. Open Video.flv file to verify result.
  7. Upload Video.flv file to YouTube.

 

How to Trim, Cut or Combine MP4 Files Without Re-Encoding

Motivation:

  • You have MP4 files with unwanted portions. You want to trim these portions.
  • You want to cut a MP4 file into files with equivalent length for uploading to specific storage that limits length of an uploaded video.
  • You want to combine multiple MP4 files into single file for copying to specific storage in a single upload.

Trimming MP4 file:

  1. Download XMedia Recode.
  2. Unzip the downloaded package.
  3. Click on the XMedia Recode.exe file to open the application.
  4. Open a MP4 file.
  5. Under the Format tab set
    Profile = Custom
    Format = MP4
    File Extension = mp4
  6. Click the Video tab and set Mode = Copy on the middle panel.
  7. Click the Audio tab and set Mode = Copy on the middle panel.
  8. Click the Filters/Preview tab and set Start Time and to (End Time) value text boxes.
  9. Click the Add to queue button (with the + icon) on the tool bar.
  10. Click the Encode button on the tool bar.

Splitting MP4 file to multiple files with equivalent length:

    1. Download XMedia Recode.
    2. Unzip the downloaded package.
    3. Click on the XMedia Recode.exe file to open the application.
    4. Open a MP4 file.
    5. Under the Format tab set
      Profile = Custom
      Format = MP4
      File Extension = mp4
    6. Click the Video tab and set Mode = Copy on the middle panel.
    7. Click the Audio tab and set Mode = Copy on the middle panel.
    8. Click the Filters/Preview tab and specify appropriate time range for each file, for example from 00:00:00:0000 to 00:09:00:0000.
    9. Click the Add to queue button (with the + icon) on the tool bar.
    10. Click the Encode button.

    Repeat the procedure for the same file with different time ranges.

    For example use time range from 00:09:00:0000 to 00:18:00:0000 for creating the second file, then time range from 00:18:00:0000 to 00:27:00:0000 for creating the third file, etc.

    Combining multiple MP4 files into single MP4 file:

    1. Download ffmpeg.
    2. Unzip the downloaded package.
    3. Copy MP4 files to the bin folder.
    4. Create vidlist.txt with the content below in the bin folder.
    file 'Part 1.mp4'
    file 'Part 2.mp4'
    file 'Part 3.mp4'
    file 'Part 4.mp4'
    file 'Part 5.mp4'
    file 'Part 6.mp4'

    4. Open Command Prompt, navigate to the bin folder and execute the command below.

    ffmpeg -f concat -safe 0 -i vidlist.txt -c copy output.mp4