-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MP4Box does not concatenate videos #549
Comments
Hi, thanks for reporting. Would it be possible to share your input MP4s with us so that we reproduce your issue? https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95 |
Thank you, here is zip file with videos: http://www.mediafire.com/download/aulvr1lpv6bu1o8/videos.zip |
Files are not encoded the same by FFmpeg: sometimes the Aspect Ratio is set, sometimes not:
I remember having already seen this issue, let me check. |
No longer working, I will check tommorow and post updates. Thanks for helping |
We have PHP script that is converting videos with help of ffmpeg. Command is here:
and this:
and tried to add constant rate factor:
but still same result, after execution Awards video still does not have Pixel Aspect Ratio info. Any ideas ? |
I think the information is forwarded by FFmpeg i.e. it would come from the source input. Would you be able to share two of these files with me? |
I really don't understand, you mean input and output .mp4 files ? |
Yes, I mean the input of the FFmpeg compression command-line. |
Here are all files: http://www.mediafire.com/download/6q22s4gke1c4rjo/ffmpeg_data.zip I tried to get info from Input.mp4, but that video also does not have par info. |
Your command-line contains So either you have to force it or remove the options on all the encodings. Does it solve your issue? |
I just want to get full HD (1920x1080, 16:9) .mp4 videos from input .mp4 videos (that I can merge with MP4Box later), nothing else. Honestly I am not familiar with ffmpeg as we used this php script for long time and now we have problems (not sure what params and encodings we need as I didn't write script). Can you give me example of command line for both cases so I can try it and update you? |
I don't have the information to do this. You need to find a source using the same command-line as you provided that doesn't contain the PAR in the SPS after encoding. |
OK, I will try. Thank you! |
Note that in this case you could just use |
I will try today with only |
Changed command and can confirm this works like charm (even if video is missing PAR param info):
|
Excellent :) PS: could you report this on the stackoverflow thread too? |
Ofcourse, thank you for help! If you ever come to Split, Croatia, email me and you have free beer! :) |
Hi @rbouqueau, I am using MP4Box to concatenate my two videos. After concatenation, I cannot play the second part, the first part working fine. Kindly help me to solve this. I have used -force-cat also but no luck. MP4Box -force-cat -cat video1.mp4 -cat video2.mp4 final_video.mp4 Thanks in advance. |
@ShanthiniMichael Can you share a sample so that we can reproduce? |
@rbouqueau Sorry, I can't share those files. But I can share the info of the files. Is it enough. or is it required to find an issue? First video info Movie Info - 2 tracks - TimeScale 1000Duration 00:00:00.915 (recomputed 00:00:00.914) Meta-Data Tags: Track 1 Info - ID 1 - TimeScale 30000Media Duration 00:00:00.800 (recomputed 00:00:00.834) Track 2 Info - ID 2 - TimeScale 44100Media Duration 00:00:00.937 Second file info Movie Info - 2 tracks - TimeScale 1000Duration 00:00:34.468 Meta-Data Tags: Track 1 Info - ID 1 - TimeScale 30000Media Duration 00:00:34.467 (recomputed 00:00:34.501) Track 2 Info - ID 2 - TimeScale 48000Media Duration 00:00:34.485 |
There is an apparent diff with the audio ("1 Channel(s)" vs "2 Channel(s)"). Did you try with video only (e.g. by appending FYI we have an anonymous dropbox for sharing files (https://www.mediafire.com/filedrop/filedrop_hosted.php?drop=eec9e058a9486fe4e99c33021481d9e1826ca9dbc242a6cfaab0fe95da5e5d95). Most issues can't be fixed if we can't reproduce. |
This is likely due to the change of sample rate in the two files. I patched MP4Box to allow this |
@rbouqueau Sure. I am sharing the sample files. video1.mp4 video2.mp4 output.mp4 |
@jeanlf Okay. Do I need to reinstall again? |
yes |
@jeanlf I am using mac. I have reinstalled the MP4box using Brew. but still, I am facing the issue. |
You need to wait for installers to be updated, or recompile yourself |
@jeanlf I have recompiled the gpac. But still, I am facing the issue. |
It plays here with |
@rbouqueau I am using QuickTime Player. |
I don't have acces to a mac. I just realize Apple stopped updating QT on Windows at v7 (while they are at v10 now). |
@rbouqueau Okay, I will check with any other players and I will come back. |
@rbouqueau The first part of the audio missing in the VLC player & android mobile and the second part of the audio is missing in the Quicktime player. Can't I use it in any player? I used this also. gpac -play out.mp4, but the first part is missing. Is there anything I need to change in the format of the first part? |
With VLC it plays well but I lose the sound when I seek.
Yes, you need to prepare your content so that you don't need the CC @jeanlf In this case I need to add the explicit @ to avoid the audio out of the flist to be connected directly to the muxer (whereas the flist output pid is already connected to the encoder!). |
@rbouqueau I have tried, but still facing the issue. I have re-encoded the video also. But it is working fine for only one video. |
What did you try exactly? Can you share some command-lines based on some content I have access too? Which player fails (I can't try QT). |
@rbouqueau Sorry to ask this. Can we connect in meet or anydesk? |
No. This forum is handled by volunteers during their free time. |
@rbouqueau Okay. I have an audio, I am setting that audio to a video using ffmpeg. ffmpeg -i ${video_first_url} -i ${filename} -c:v copy -map 0:v:0 -map 1:a:0 -shortest ${output_video} After that I am merging this video into second video using MP4box. Guide me if i am doing anything wrong. |
This doesn't answer my questions. Based on the content you provided, what did you do with gpac (including the audio encoding command-line I shared with you) and why did you try that failed? Please detail your answer so that we can reproduce to further help you. |
I have tried gpac flist:srcs=video1.mp4,video2.mp4 @#audio c=aac @ @1#video -o cat.mp4 my second part audio, not coming. only video coming. |
Do you confirm you have the issue with samples you shared above? And which player did you use? |
@rbouqueau Thank you so much for your help. I found the solution. I have changed the sample rate and codec in both videos using the below command, it worked. ffmpeg -y -i video.mp4 -ar 44100 -acodec aac -ac 2 video-changed.mp4 |
Great. If you want to avoid the extra step, gpac can do it for you:
|
Okay. I will try this. Thank you :). |
Hi! I have problem with MP4Box, can't concatenate videos in one video. I get out.mp4 file (~103 MB) but omxplayer can not play it. I have 6 very simple .mp4 videos and I want them to merge in one video. Until now, I was able to do that with command, without any problems:
but now omxplayer (also vlc) can not play out.mp4 video. Here is mediainfo output for every one of 6 videos:
So all 6 videos have good mediainfo output but anways I tried executing command to test without 1 video (one by one), and then merging them, but same result. I get strange command line output when I execute mp4box command:
Here is mediainfo for out.mp4 video:
As you can notice there are exactly "#" videos parts as "No suitable destination track found..." lines, which is strange. So far closest thing for fixing my problem is this command:
but it is showing second video (Cornaro USLUGE video1.mp4) two times in row and then rest is normal. I am really out of idea what to do. Any help will be appreciated.
The text was updated successfully, but these errors were encountered: