FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (2024)

Index New Posts Today's Posts Rules Files

  • Register
  • Help

Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!

  • Forum
  • Video
  • Newbie / General discussions
  • FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs

+ Reply to Thread

Results 1 to 9 of 9

  • Thread Tools
    • Show Printable Version
    • Email this Page
    • Subscribe to this Thread

Thread

  1. 6th Jul 202414:01

    #1

    raywood

    • View Profile
    • View Forum Posts
    • Private Message

    FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (5)

    Member

    Jun 2021
    USA
    I have a short MP4 and a long MP4. Both measure 1136 x 1704, according to MediaInfo. I want to concatenate these two MP4s losslessly. I listed them in cliplist.txt and then tried this:

    Code:

    ffmpeg -f concat -safe 0 -i cliplist.txt -c copy output.mp4
    That concatenated correctly, but for some reason the first (i.e., short) MP4 was tiny (maybe 1/6 the dimensions of the long MP4) in output.mp4.

    The short (introductory) MP4 began life as a PNG. I time-stretched it to last five seconds and used that to produce MP4 output using Adobe Premiere Elements. But I don't know why that would matter.

    How can I get these two identically sized inputs to concatenate into a uniformly sized output.mp4?

    Quote

  2. 6th Jul 202417:26

    #2

    jagabo

    • View Profile
    • View Forum Posts
    • Private Message

    FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (12)

    Member

    Dec 2005
    Your concat procedure appears to be correct. So you're saying the new video starts playing with a small frame size and later switches to a large frame size? Maybe your first mp4 was encoded with a small frame size and the header metadata was used to specify a larger playback?

    Quote

  3. raywood

    • View Profile
    • View Forum Posts
    • Private Message

    FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (19)

    Member

    Jun 2021
    USA
    Yes, that's the situation: starts small, then switches to large.

    Would there be a way to eliminate Premiere Elements from the process, and just use FFmpeg to convert and concatenate that PNG to become a video prependix?

    Quote

  4. 6th Jul 202420:48

    #4

    jagabo

    • View Profile
    • View Forum Posts
    • Private Message

    FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (26)

    Member

    Dec 2005
    The easiest approach is probably to re-encode the intro sequence with a large frame size, ie, upscale to the large frame size before encoding. Then you won't have this problem.

    The other way is remux your existing file that plays oddly specifying the larger frame size at the container level. But that kind of flagging isn't obeyed by all players.

    Quote

  5. 6th Jul 202422:26

    #5

    raywood

    • View Profile
    • View Forum Posts
    • Private Message

    FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (33)

    Member

    Jun 2021
    USA
    Not sure what else I can do in this regard. Both MP4s measure 1136 x 1704.

    Quote

  6. 6th Jul 202422:56

    #6

    jagabo

    • View Profile
    • View Forum Posts
    • Private Message

    FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (40)

    Member

    Dec 2005

    Originally Posted by raywood

    Both MP4s measure 1136 x 1704.

    I was speculating that the first video wasn't really 1136x1704 -- that it's really a smaller frame size but flagged for 1136x1704 playback. Then when you concat that information is lose, hence the smaller frame size on initial playback.

    Can you make the videos available? Or maybe just the first?

    Quote

  7. 7th Jul 202416:06

    #7

    raywood

    • View Profile
    • View Forum Posts
    • Private Message

    FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (48)

    Member

    Jun 2021
    USA
    I can't post the videos. But I can tell you what I did. I started with a PNG of the specified size, cropped from a larger PNG using IrfanView. I used Adobe Premiere Elements to convert it to a five-second MP4, specifying the dimensions I used in IrfanView.

    They tell me APE can handle 4K. It did not balk at the specified 1136 x 1704 sizing.

    I may have misstated the appearance of the output video. When I put PotPlayer into full screen view, it replays the input video as a smallish rectangle in a sea of black. So the output writing surface may be of the correct size, but for some reason the input video is not expanded to fill the available space as APE seemed to indicate it would be.

    Quote

  8. 7th Jul 202416:39

    #8

    jagabo

    • View Profile
    • View Forum Posts
    • Private Message

    FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (55)

    Member

    Dec 2005
    Without seeing the actual videos all I can tell you is that I've used ffmpeg's concat filter many times and never had any problems like you are describing as long as each video has the same frame size. You can get unexpected behavior when using concat to join videos of different frame sizes -- different players will do different things when the frame size changes.

    Note that most players have a setting that lets them keep the source frame size upon playback when playing full screen. Ie, a 640x480 video will play as a small picture with big black borders in the middle of a 1920x1080 display. Make sure you don't have that setting enabled.

    Quote

  9. 8th Jul 202402:17

    #9

    raywood

    • View Profile
    • View Forum Posts
    • Private Message

    FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (62)

    Member

    Jun 2021
    USA
    I found a solution. Get away from Adobe Premiere Elements. Just use IrfanView's slideshow creator again. It produced the main body of the video; now (with different time duration setting) it produced the title screen and table of contents. Then the FFmpeg command worked just fine to concatenate. Not sure what the exact problem was, but this worked.

    Thank you very much for your help. It really helped to have your confidence that this was supposed to work, that there ought to be a fix.

    Quote

+ Reply to Thread

Quick NavigationNewbie / General discussionsTop

  • Site Areas
  • Settings
  • Private Messages
  • Subscriptions
  • Who's Online
  • Search Forums
  • Forums Home
  • Forums
  • Video
    1. Latest Video News
    2. Newbie / General discussions
    3. VR Player and Hardware
    4. Video Streaming Downloading
    5. Authoring (Blu-ray)
    6. Authoring (DVD)
    7. Camcorders (DV/HDV/AVCHD/HD)
    8. Capturing
    9. Audio
    10. Video Conversion
    11. Blu-ray Ripping
    12. DVD Ripping
    13. Editing
    14. Software Playing
    15. Media
    16. Subtitle
    17. DVB / IPTV
    18. Restoration
    19. Programming
    20. Mac
    21. Linux
  • Hardware
    1. Portable Video
    2. Media Center PC / MediaCenters
  • How To's
    1. User guides
    2. Glossary
  • Other
    1. Computer
    2. Off topic
    3. Feedback
    4. Polls
  • Archived Forums
    1. Authoring (VCD/SVCD)
    2. ffmpegX general discussion
    3. VCDEasy General

Similar Threads

  1. Which are better cameras ? The enormous sized TV cameras or movie cameras?

    By Truthler in forum Camcorders (DV/HDV/AVCHD/HD)

    Replies: 10

    Last Post: 28th Sep 2021, 07:55

  2. problem on concatenate files ffmpeg

    By lomero in forum Editing

    Replies: 0

    Last Post: 6th May 2021, 11:37

  3. How can I Concatenate an entire folder with xfade+fade out? (FFMPEG)

    By Aorin in forum Video Conversion

    Replies: 0

    Last Post: 22nd May 2020, 08:18

  4. [FFMPEG] Non-Interleaved AVI in Concatenate

    By giroro in forum Editing

    Replies: 9

    Last Post: 27th Feb 2020, 05:39

  5. Concatenate video in ffmpeg -> time stamps problem

    By nsenada in forum Editing

    Replies: 0

    Last Post: 30th Jan 2020, 14:38

«Previous Thread|Next Thread»

  • Contact Us
  • VideoHelp
  • Privacy Statement
  • Top

All times are GMT -5. The time now is 02:26.

Powered by vBulletin
Copyright 2014 vBulletin Solutions, Inc. All rights reserved.

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

FFmpeg: Same-Sized Input MP4s Concatenate into Differently Sized Outputs (2024)

FAQs

Can mp4 files be concatenated? ›

mp4 and file2. mp4 . You can concatenate these files using the concat demuxer (documentation) easily if their properties match. That is, they have the same height, width, pixel formats, codecs, etc.

How to merge two videos using FFmpeg? ›

FFmpeg append videos with two different methods: the 'concat' demuxer method or the 'filter_complex' method. You have to make a text file in case you are using the 'concat' demuxer method to merge your videos. Make sure videos have the exact attributes for a smooth merge.

How to change the resolution of a video using FFmpeg? ›

To change the resolution of a video file, we can use the scale filter: $ ffmpeg -i input. mp4 -vf "scale=1280:720" output. mp4 The -vf "scale=1280:720" argument tells FFmpeg to scale the video to 1280 pixels by 720 pixels.

How does FFmpeg work? ›

ffmpeg calls the libavformat library (containing demuxers) to read input files and get packets containing encoded data from them. When there are multiple input files, ffmpeg tries to keep them synchronized by tracking lowest timestamp on any active input stream.

How do I string multiple MP4 files together? ›

How to merge MP4 videos.
  1. Select. Upload MP4 videos and images from your device that you'd like to merge. ...
  2. Merge. Organize your content and use the Trim tool to control when one clip cuts and merges into the next.
  3. Continue editing.

Does MP4 support file level concatenation? ›

The concat protocol works only on video formats that support file-level concatenation like MPEG-2 TS. It cannot be used for other video formats like MP4 and WEBM.

How to concat files in FFmpeg? ›

5.1. Concatenating Videos With a Single Audio Stream
  1. Supply input files with the -i flags.
  2. Use -filter_complex to select streams from the input files.
  3. Select the actual streams in a specific order: video and audio from the first, second, and third file.
  4. Use the filter concat=n=3:v=1:a=1 [v] [a]
Mar 18, 2024

How do I concatenate two videos? ›

How to merge videos
  1. Start a video project. Open Canva and create a blank video project. ...
  2. Merge your videos. For every video file you need to merge, add a page on the video timeline. ...
  3. Edit your clips. Modify your videos after you combine them together. ...
  4. Personalize your video. ...
  5. Share your video.

Can I merge 3 videos together? ›

If you have two or more videos (or images) that you would like to put next to each other and merge into one video, you can easily do this with Clipchamp. Add the clips to a video editing project, add them to the timeline one after the other, and when they are placed next to each other, they will play as one clip.

Does FFmpeg reduce video quality? ›

FFmpeg supports a variety of video codecs including MPEG-1, MPEG-2, VP8, and H. 264, which is currently the most popular video codec. It offers high-quality and efficient compression.

How to resize an mp4 with FFmpeg? ›

Part 1. How to Use FFmpeg to Resize Videos
  1. Download and Install FFmpeg to Your Computer.
  2. Determine your file format and name.
  3. Open your computer's command prompt.
  4. Switch the command line.
  5. Input your new video width.
  6. ffmpeg -i input.mp4 -vf scale=480:-1 output.mp4.
  7. Input your new video height.
Apr 18, 2024

How do I resize but keep aspect ratio in FFmpeg? ›

In FFmpeg, if you want to scale a video while retaining its aspect ratio, you need to set either one of the height or width parameter and set the other parameter to -1 . That is if you set the height , then set the width to -1 and vice-versa.

What is better than FFmpeg? ›

Other important factors to consider when researching alternatives to FFmpeg include videos. The best overall FFmpeg alternative is Handbrake. Other similar apps like FFmpeg are PotPlayer, VideoLan, AWS Elemental MediaTailor, and Compressor. FFmpeg alternatives can be found in Other Video Software.

Is FFmpeg still being used? ›

It is widely used in digital media production and broadcasting, as well as in applications for video editing, transcoding, and streaming. FFmpeg is a command-line tool that is available for many platforms, including Windows, macOS, and Linux.

Is HandBrake better than FFmpeg? ›

Handbrake offers you literally a GUI over ffmpeg. And sane defaults, setting ffmpeg gets overwhelming fast. And also some nice queue management, a bit better than what you'd get from shell scripting. The downside is that it's a GUI.

Can you splice an MP4? ›

You can use VEED's online video splitter. Upload your MP4 file, use the video cutter and splitter tool, and export your new MP4 video. You can split your video into as many parts as you want, join clips together, and delete the parts you don't want to save.

How do I combine MP4 files without losing quality? ›

Wondershare UniConverter is a free and easy-to-use video editor that offers powerful editing features to merge video files into one seamless video. Supporting MP4, AVI, MOV, FLV, and all other famous video file formats, this tool can merge video without losing quality with only a few taps.

Top Articles
The Orlando Sentinel from Orlando, Florida
The Orlando Sentinel from Orlando, Florida
Davita Internet
Doublelist Paducah Ky
Caroline Cps.powerschool.com
27 Places With The Absolute Best Pizza In NYC
Optum Medicare Support
Free Robux Without Downloading Apps
Mylife Cvs Login
Bbc 5Live Schedule
Phillies Espn Schedule
Seafood Bucket Cajun Style Seafood Restaurant in South Salt Lake - Restaurant menu and reviews
What is the difference between a T-bill and a T note?
Springfield Mo Craiglist
Magicseaweed Capitola
Dirt Removal in Burnet, TX ~ Instant Upfront Pricing
2020 Military Pay Charts – Officer & Enlisted Pay Scales (3.1% Raise)
Hermitcraft Texture Pack
Craigslist Personals Jonesboro
Ppm Claims Amynta
Where to eat: the 50 best restaurants in Freiburg im Breisgau
Who is Jenny Popach? Everything to Know About The Girl Who Allegedly Broke Into the Hype House With Her Mom
Fleet Farm Brainerd Mn Hours
Urban Dictionary Fov
Page 2383 – Christianity Today
Giantbodybuilder.com
Craigslist Brandon Vt
NV Energy issues outage watch for South Carson City, Genoa and Glenbrook
Skepticalpickle Leak
Nacogdoches, Texas: Step Back in Time in Texas' Oldest Town
Xfinity Outage Map Lacey Wa
Haley Gifts :: Stardew Valley
Black Adam Showtimes Near Amc Deptford 8
Chilangos Hillsborough Nj
Collier Urgent Care Park Shore
The Thing About ‘Dateline’
Fototour verlassener Fliegerhorst Schönwald [Lost Place Brandenburg]
Www Craigslist Com Brooklyn
Nba Props Covers
Wal-Mart 140 Supercenter Products
Memberweb Bw
Random Animal Hybrid Generator Wheel
Maplestar Kemono
Craigslist Chautauqua Ny
Theatervoorstellingen in Nieuwegein, het complete aanbod.
Rovert Wrestling
Used Auto Parts in Houston 77013 | LKQ Pick Your Part
Fresno Craglist
Msatlantathickdream
Hsi Delphi Forum
Ssss Steakhouse Menu
Tamilblasters.wu
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 6574

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.