Hi,
please respect for cats thanks
However I have this source that you can download
https://www.dropbox.com/s/193tnwcn9nd6yl8/examplePrem.MP4?dl=0
is a MP4 file with avc1 inside and two audio tracks.
Please load it adobe premiere and place the clip in timeline
Next: if I do
considering only the first audio track, place the .wav audio track below the mp4Code:ffmpeg.exe -y -i exampleprem.mp4 -vn -acodec pcm_s16le -ar 48000 outffmpeg.wav
but
[Attachment 66708 - Click to enlarge]
I get the outputted .wav (the green track) file that in premiere is 1 frame too long when compared to the original .mp4
I wonder: is there a way (possibly with ffmpeg or in commandline) to an audio .wav file (pcm_s16le) of exactly the same lenght of the original when the 2 clip are imported in adobe premiere, and get the audio sync? thanks
ps: I need to automate in batch processing
+ Reply to Thread
Results 1 to 10 of 10
-
Last edited by marcorocchini; 11th Sep 2022 at 18:16.
-
Having tried every trick I can think of, I cannot reproduce your error. It keeps behaving correctly. No duration mismatch
But rather than fool around with a CLI, why not just load your files into Adobe Media Encoder and batch export your wav files that way? Then you are assured the files are being interpreted the same way Premiere interprets them. -
try this here - https://lzone.de/blog/Easily-fix-async-video-with-ffmpeg
-
Your examplePrem.MP4 contains two ac3 audiostreams, no pcm stream there.
[Attachment 66714 - Click to enlarge] -
In attachement the outffmpeg.wav get with ffmpeg using this commandline on the original source examplePrem.MP4
Code:ffmpeg.exe -y -i exampleprem.mp4 -vn -acodec pcm_s16le -ar 48000 outffmpeg.wav
and below the .wav track outffmpeg.wav (the green track in the image)
but the .wav seems too long of 2 frames
[Attachment 66716 - Click to enlarge]
So I wonder if is there a way to batch calculate the duration of the original and tells to ffmpeg that have to generate a .wav cutted with the lenght that match exactly the original, the target is to have a .wav that have the same lenght when placed in timelineLast edited by marcorocchini; 12th Sep 2022 at 03:20.
-
ac3 and wav have exactly the same length.
The error is therefore due to the Adobe Premiere display.
[Attachment 66717 - Click to enlarge] -
Yes, the video has 182 frames at 25 fps. That makes the length 7.280 seconds. So the real question is why is the video only 7.0 seconds long in Premiere?
-
Code:
@Echo Off ffmpeg64bitAug2019.exe -loglevel quiet -y -i exampleprem.mp4 -map 0:a:0 -vn -acodec pcm_s16le -ar 48000 outffmpeg.wav if exist InputDuration.txt del InputDuration.txt FFProbe64bit2014.exe -loglevel fatal -show_entries format=duration -of csv="p=0" -sexagesimal exampleprem.mp4>InputDuration.txt set /p InputDuration=<InputDuration.txt echo InputDuration is %InputDuration% if exist wavFFmpegDuration.txt del wavFFmpegDuration.txt FFProbe64bit2014.exe -loglevel fatal -show_entries format=duration -of csv="p=0" -sexagesimal outffmpeg.wav>wavFFmpegDuration.txt set /p wavFFmpegDuration=<wavFFmpegDuration.txt echo wavFFmpegDuration is %wavFFmpegDuration% if exist InputDuration.txt del InputDuration.txt echo. if exist wavFFmpegDuration.txt del wavFFmpegDuration.txt pause
Code:InputDuration is 0:00:07.291000 wavFFmpegDuration is 0:00:07.290667
however ffprobe's duration is not exactly the same. So I wonder, is there a way - in batch - to do so that both the files in premiere have the same lenght? -
Similar Threads
-
FFmpeg - video with a PNG and a WAV as long as the WAV
By frenksisco in forum EditingReplies: 6Last Post: 8th Apr 2022, 13:07 -
Can't get FFMPEG Script to Remux to MP4 with Wav, It instead remuxes to MKV
By VideoFanatic in forum Video ConversionReplies: 3Last Post: 1st Aug 2021, 02:32 -
Convert 5.1 PCM WAV to Six Mono WAVs, Knowing Which WAV Goes to Which Chann
By koberulz in forum AudioReplies: 2Last Post: 28th Dec 2019, 12:53 -
Convert dts.wav to wav with foobar2000
By kirkmc in forum AudioReplies: 2Last Post: 4th Nov 2019, 20:59 -
Split mp4 file into specified size (part1.mp4, part2.mp4 etc.)
By TubeBar in forum EditingReplies: 7Last Post: 1st Feb 2019, 22:41