[FFmpeg-user] JPGs->video1 ; MOV -> Mp4 video2 ; Concatenate - video2 audio OK but video is slow . .
Philip Rhoades
phil at pricom.com.au
Wed Mar 27 03:02:28 EET 2019
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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ffmpeg_concat_output.txt
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20190327/d497835a/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: add_silent_audio.txt
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20190327/d497835a/attachment-0001.txt>
More information about the ffmpeg-user
mailing list