[FFmpeg-user] JPGs->video1 ; MOV -> Mp4 video2 ; Concatenate - video2 audio OK but video is slow . .

LLB ciallb2 at yahoo.com
Sat Mar 18 23:37:18 EET 2023


 addendum
   
   - mail at philcorley.com <mail at philcorley.com>UnsubscribeTo:ffmpeg-user at ffmpeg.orgWed, Mar 15 at 4:11 AMI have a large number of MP4 files (all same format and no audio) which each have 4 video tracks per file.   
   
Does anyone know how I can use ffmpeg to concat/join all the files into one file preserving the 4 video tracks within the output file?   
   
Many thanks   
   
Phil   
_______________________________________________   
ffmpeg-user mailing list   
ffmpeg-user at ffmpeg.org   
https://ffmpeg.org/mailman/listinfo/ffmpeg-user   
   
To unsubscribe, visit link above, or email   
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".   

   - mail at philcorley.com <mail at philcorley.com>UnsubscribeTo:FFmpeg user questionsSat, Mar 18 at 10:56 AMNo worries - sorted it with ffmpeg -f concat -safe 0 -i videos.txt  -map 0 -c copy out.mp4   
   
It was the -map 0 I was missing   
   
> On 15 Mar 2023, at 11:10, mail at philcorley.com wrote:   
>   
> I have a large number of MP4 files (all same format and no audio) which each have 4 video tracks per file.   
>   
> Does anyone know how I can use ffmpeg to concat/join all the files into one file preserving the 4 video tracks within the output file?   
>   
> Many thanks   
>   
> Phil
    On Saturday, March 18, 2023 at 02:36:48 PM PDT, LLB <ciallb2 at yahoo.com> wrote:  
 
  Addendum   
   - mail at philcorley.com <mail at philcorley.com>UnsubscribeTo:ffmpeg-user at ffmpeg.orgWed, Mar 15 at 4:11 AMI have a large number of MP4 files (all same format and no audio) which each have 4 video tracks per file.   
   
Does anyone know how I can use ffmpeg to concat/join all the files into one file preserving the 4 video tracks within the output file?   
   
Many thanks   
   
Phil   
_______________________________________________   
ffmpeg-user mailing list   
ffmpeg-user at ffmpeg.org   
https://ffmpeg.org/mailman/listinfo/ffmpeg-user   
   
To unsubscribe, visit link above, or email   
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".   

   - mail at philcorley.com <mail at philcorley.com>UnsubscribeTo:FFmpeg user questionsSat, Mar 18 at 10:56 AMNo worries - sorted it with ffmpeg -f concat -safe 0 -i videos.txt  -map 0 -c copy out.mp4   
   
It was the -map 0 I was missing   
   
> On 15 Mar 2023, at 11:10, mail at philcorley.com wrote:   
>   
> I have a large number of MP4 files (all same format and no audio) which each have 4 video tracks per file.   
>   
> Does anyone know how I can use ffmpeg to concat/join all the files into one file preserving the 4 video tracks within the output file?   
>   
> Many thanks   
>   
> Phil
    On Tuesday, March 26, 2019 at 06:03:05 PM PDT, Philip Rhoades <phil at pricom.com.au> wrote:  
 
 Carl,

There has been some improvement - I will top-post for clarity but the 
slow motion video has disappeared and the only remaining problem is that 
the audio and video are out of sync:

I stuck with concat because it alllows me to specify image files more 
conveniently in the concat_demuxer?.txt file:

ffmpeg -f concat -i concat_demuxer1.txt -vf scale=1024:576 -r 30000/1001 
output1.mp4
ffmpeg -f concat -i concat_demuxer2.txt -vf scale=1024:576 -r 30000/1001 
output2.mp4
ffmpeg -f concat -i concat_demuxer3.txt -vf scale=1024:576 -r 30000/1001 
output3.mp4

- see attached output.

for i in 1 2 3
do
  ffmpeg -ar 44100 -acodec pcm_s16le -f s16le -ac 2 -i /dev/zero \
    -i output${i}.mp4 \
    -vcodec copy \
    -acodec aac \
    -shortest output${i}_silent.mp4
done

- see attached output.

#!/bin/sh

ffmpeg -f concat -i inputs.txt -vcodec copy -acodec copy 
2019-03-22_#1_XR_ClimateEmergencyDeclarationDayNSW_LoRes.mp4

- see attached output.




On 2019-03-27 10:48, Carl Eugen Hoyos wrote:
> 2019-03-27 0:23 GMT+01:00, Philip Rhoades <phil at pricom.com.au>:
> 
>> On 2019-03-27 07:22, Carl Eugen Hoyos wrote:
>>> 2019-03-26 21:15 GMT+01:00, Philip Rhoades <phil at pricom.com.au>:
>>> 
>>>> I converted 21 JPGs to a video with:
>>> 
>>> Usually, converting jpgs with the image2 input works better than
>>> concat.
>> 
>> Right - I will try that.
> 
> This is probably not your issue but the concat demuxer
> has the disadvantage that the console output is not
> very helpful.
> 
>>>>    ffmpeg -f concat -i concat_demuxer1.txt -vf scale=1024:576 -r 
>>>> 29.97
>>> 
>>> This framerate is never correct, a possible frame rate is 30000/1001
>> 
>> Hmm . . I was just using what was reported for the frame for the MOVs 
>> .
>> . so using:
>> 
>>    "-r 30000/1001"
>> 
>> is OK?
> 
> It is better if that is the framerate of the mov (as I assume).
> 
>>> You can add the audio already in this step.
>> 
>> I did have a few attempts at that but couldn't get it working so I
>> resorted to a two-step process - I will have another look.
>> 
>> 
>>>> output1.mp4
>>>> 
>>>> I then added a silent audio track with:
>>>> 
>>>>    ffmpeg -ar 44100 -acodec pcm_s16le -f s16le -ac 2 -channel_layout
>>>> 2.1
>>> 
>>> The channel number and layout do not match.
>> 
>> Should it be just "stereo"?
> 
> Or drop channel_layout, for -ac 2 it should not be needed.
> 
>>>> -i /dev/zero \
>>>>      -i output${i}.mp4 \
>>>>      -vcodec copy \
>>>>      -acodec aac \
>>>>      -shortest output${i}_silent.mp4
>>> 
>>>> I had another MOV file (fr=29.97) that I converted with:
>>>> 
>>>>    newfn=`basename $fn .MOV`
>>>>    ffmpeg  -i $fn -vf scale=1024:576 ./${newfn}.mp4
>>>> 
>>>> When I concatenate them with (and other converted JPGs and MOVS on 
>>>> the
>>>> end) using:
>>>> 
>>>>    ffmpeg -f concat -i inputs.txt -vcodec copy -acodec copy \
>>>> 2019-03-22_#1_XR_ClimateEmergencyDeclarationDayNSW_LoRes.mp4
>>>> 
>>>> the concat succeeds OK but when I play the video, the audio is OK 
>>>> but
>>>> then when it gets to the converted MOV section, people are moving in
>>>> slow motion . .
>>>> 
>>>> Another odd thing, the first 21 converted JPGs at 4 sec each 
>>>> correctly
>>>> shows 84 sec when viewed with mpv but when the converted MOV starts 
>>>> it
>>>> jumps to ~3m 50s . .
>>>> 
>>>> So there is at least one problem but maybe two?  Can anyone tell me
>>>> what
>>>> I am missing?
>>> 
>>> You may have to re-encode, feel free to provide the complete, uncut
>>> console output.
> 
> ..feel free to provide the complete, uncut console output for the
> command line you already tried and also ffmpeg -i output for
> the input files (as concat doesn't show it).
> 
> Carl Eugen

-- 
Philip Rhoades

PO Box 896
Cowra  NSW  2794
Australia
E-mail:  phil at pricom.com.au_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".    


More information about the ffmpeg-user mailing list