Hi cats,
I have a example.mp4 that have the video track but no audio.
Simply I need to generate with ffmpeg a example.wav mute audio track that have the same lenght of the example.mp4
is it pobbile? thanks
+ Reply to Thread
Results 1 to 20 of 20
-
-
-
-
That's why I gave the command line for aac audio.
AFAIK ffmpeg would convert a .wav audio track to .aac or .mp3 automatically by removing-c:a copy .
Like this:
Code:ffmpeg -i input.wav -c:v copy output.mp4
Last edited by cholla; 20th Jul 2022 at 09:32.
-
Code:
ffmpeg -f lavfi -i anullsrc -t 300 -c:a pcm_s16le out.wav
Adjust the -t parameter to the needed length in seconds and replace pcm_s16le with the required type of sample format. See https://trac.ffmpeg.org/wiki/audio%20types for a list.Last edited by zing269; 20th Jul 2022 at 06:46. Reason: Fix code tags, spelling
-
maybe I have do a mess but in some way I think to have get the target, but exactly I don't know why. This is the subroutine
Code:IF NOT "%OnlyOneTrackMonoStereo%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" IF NOT EXIST "%cd%\decisor.mov" If NOT "%isMXF%"=="1" ffmpeg64bitAug2019.exe -loglevel quiet -y -threads auto -y -f concat -safe 0 -i concatList.txt -map 0:? -vcodec copy -acodec copy "%cd%\decisor.mov" IF NOT "%OnlyOneTrackMonoStereo%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" if NOT "%isMXF%"=="1" fart.exe "%cd%\decisor.avs" "###spaceForSource##" "%cd%\decisor.mov" IF NOT "%OnlyOneTrackMonoStereo%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" if NOT "%isMXF%"=="1" ffmpeg64bit2014.exe -y -loglevel quiet -threads auto -i "%cd%\decisor.avs" -acodec copy "%cd%\decisor.wav" IF NOT "%OnlyOneTrackMonoStereo%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" if NOT "%isMXF%"=="1" IF EXIST "%cd%\AllWav\canaleAudio1_2.wav" del "%cd%\AllWav\canaleAudio1_2.wav" IF NOT "%OnlyOneTrackMonoStereo%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" if NOT "%isMXF%"=="1" if NOT "%isMXF%"=="1" copy /y "%cd%\decisor.wav" "%cd%\AllWav\canaleAudio1_2.wav" IF NOT "%OnlyOneTrackMonoStereo%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" if NOT "%isMXF%"=="1" ffmpeg64bit2014.exe -y -threads auto -i "%cd%\decisor3OR4.avs" -acodec copy "%cd%\AllWav\canaleAudio3_4.wav" rem #### check duration of avigen file #### if exist aviGenDuration.txt del aviGenDuration.txt Set "aviGenDuration=undef" FFProbe64bit2014.exe -loglevel fatal -show_entries format=duration -of csv="p=0" -sexagesimal "%cd%\decisor.mov">aviGenDuration.txt set /p aviGenDuration=<aviGenDuration.txt if exist aviGenDuration.txt del aviGenDuration.txt echo durata pari a %aviGenDuration% IF "%testEsistenzaAudio%"=="0" ffmpeg34_64bit.exe -y -f lavfi -i aevalsrc=0 -i "%cd%\decisor.mov" -af "pan=stereo:c0=c0:c1=c1" -c:a pcm_s16le -ar 48000 -shortest -t %aviGenDuration% decisor.wav IF NOT "%OnlyOneTrackMonoStereo%"=="1" if NOT "%isMXF%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" v:\automazioneclip\core\ffmpeg34_64bit.exe -loglevel quiet -y -threads auto -i "%cd%\decisor.mov" -i "%cd%\decisor.wav" -i "%cd%\decisor.wav" -map 0:v:0 -map 1:a:0 -vcodec copy -c:a pcm_s16le -ar 48000 "%cd%\decisorRemuxed.mov" IF NOT "%OnlyOneTrackMonoStereo%"=="1" If NOT "%isMXF%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" IF NOT "%testEsistenzaAudio%"=="0" ren "%cd%\decisorRemuxed.mov" "concatHD.mov" & echo "%cd%\allwav\usataRoutineDecisorCon%numeroCanaliAudio%canaliAudio">"%cd%\allwav\usataRoutineDecisorCon%numeroCanaliAudio%canaliAudio.txt" IF NOT "%OnlyOneTrackMonoStereo%"=="1" If NOT "%isMXF%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" IF "%testEsistenzaAudio%"=="0" ren "%cd%\decisorRemuxed.mov" "concatHD.mov" & echo "%cd%\allwav\usataRoutineDecisorCon%numeroCanaliAudio%canaliAudio">"%cd%\allwav\AudioAssenteInOrigineVieneGeneratoAudioMuto.txt" IF NOT "%OnlyOneTrackMonoStereo%"=="1" If NOT "%isMXF%"=="1" IF NOT "%multipleAudioStreamDetected%"=="1" IF "%testEsistenzaAudio%"=="0" copy /y "%cd%\decisor.wav" "%cd%\AllWav\canaleAudio1_2.wav"
-
Yes a mess.
I believe you will end up with a .MOV file.
Is this correct?
Did you try this as it worked for me:
Code:ffmpeg -f lavfi -i aevalsrc=0 -i input.mp4 -c:v copy -c:a aac -map 0 -map 1:v -shortest output.mp4
A valid audio MP4 must contain an MPEG audio track (mp3 or aac).
This means you can not have a .WAV audio track in a .MP4 container.
Or a PCM audio track. -
-
-
[Attachment 65959 - Click to enlarge]
mmm it maybe good, but I don't know exactly if it works also for conCat input (ffmpeg.exe -loglevel quiet -y -threads auto -y -f concat -safe 0 -i concatList.txt ...) -
What is the purpose of using concat ?
Also why is the silent audio track needed? -
He will probably give the "excuse" that he's a "cat", as if that solves anything.
Scott -
because I need to concatenate all the .mp4 of the drone dji footage, and I need to put all in avisynth. But avisynth parse all with a necessary audio track (also if mute). Dji osmo for example does have audio inside each .mp4 but the drone does not have any audio track
-
First is the acc in the ffmpeg code I posted acceptable for the silent audio track ?
What is the codec of the audio tracks in the Dji Osmo .MP4s ?
Someone else is going to need to help with this.
I haven't used avisynth by itself only as part of other software.
I'm not good at creating batch files.
I have only used concat with a few DVDs.
I take it you are trying to put several drone videos together into one? -
Concatenation only works reliably when all elements have the same stream configuration. So either drop the audio of the osmo files prior to concat, and then do a video stream only concat, or do what cholla said and add an aac tracks to the drone files - prior to the concat - and then concat with video and audio streams.
Or, do separate concats for video-only streams vs v+a streams.
Avisynth scripts can be designed to work with audio, or ignore audio. If must have audio, avisynth can also generate a silent track for use with silent clips in combination along with tracks WITH audio.
But you must be consistent, as neither AVISynth nor ffmpeg, nor most other editing/processing apps I can think of will be happy with a checkerboard of audio-noaudio-audio-noaudio.
My recommendation to you is that you use fprobe to assist with script-based ffmpeg generation of an aac track for video-only clips, then remux, then when they are all consistent do the concat.
Scott -
This was the original post & what was asked for:
Since the .MP4 contaier can't have a .wav or PCM audio track I used aac.
The code I posted produces a silent audio track the same length as the video track.
It was afterwards all the concat or other joining came up.
If I was doing this I would join all the videos with silent & sound audio track with MKVToolNix.
Into one .mkv . Problem solved.
I might even try ProWo's Cleaver but I have only used it a little bit.
So I can't say that it would work for sure.
It would use FFMPEG though.
Similar Threads
-
How to create an empty/blank AVI file without sound?
By tetsuro1 in forum EditingReplies: 5Last Post: 4th Jun 2022, 21:37 -
How to create an empty/blank AVI file without sound?
By tetsuro1 in forum Newbie / General discussionsReplies: 2Last Post: 3rd Jun 2022, 11:22 -
Create batch file for ffmpeg to increment the file output
By Bassquake in forum Video ConversionReplies: 2Last Post: 25th Nov 2019, 06:03 -
Empty audio from MKV file
By ZetaStax in forum AudioReplies: 2Last Post: 2nd Aug 2019, 04:51 -
How do I combine a MPV video file and WAV audio file into an AVI?
By robertazimmerman in forum Newbie / General discussionsReplies: 17Last Post: 6th Mar 2019, 11:47