I currently have an FFmpeg command that looks like the following (i.e. uses the remap filter operation):
ffmpeg -y -i camera.mp4 -i x.pgm -i y.pgm -lavfi remap output.mp4
I am now interested in doing this same processing in real-time using GStreamer.
Does an equivalent GStreamer element exist?
If not, is there a way to use the FFmpeg remap filter inside of the GStreamer framework?
Related
I'm using the highpass audio filter then trying to use showfreqs on the resulting audio stream but it's not working. The showfreqs filter uses the original audio stream instead of the filtered one.
Command:
ffmpeg -i audio.mp3 -filter_complex highpass,showfreqs,format=yuv420p highpass.mp4
I tried naming the highpass output but it didn't make any difference:
ffmpeg -i audio.mp3 -filter_complex highpass[hi],[hi]showfreqs,format=yuv420p highpass.mp4
How do I structure my command so showfreqs uses the output from highpass?
UPDATE
I'm using FFMPEG 4.1.4 installed on Mac via Homebrew.
Source audio: https://dsc.cloud/weavermedia/audio.mp3
Commands and resulting files:
Run highpass on audio.mp3:
ffmpeg -i audio.mp3 -filter_complex highpass highpass.mp3
result: https://dsc.cloud/weavermedia/highpass.mp3 CORRECT
Run showfreqs on audio.mp3:
ffmpeg -i audio.mp3 -filter_complex showfreqs,format=yuv420p showfreqs.mp4
result: https://dsc.cloud/weavermedia/showfreqs.mp4 CORRECT
Run showfreqs on highpass.mp3:
ffmpeg -i highpass.mp3 -filter_complex showfreqs,format=yuv420p showfreqs.mp4
result: https://dsc.cloud/weavermedia/highpass-showfreqs.mp4 CORRECT
Run highpass and showfreqs in series on audio.mp3:
ffmpeg -i audio.mp3 -filter_complex highpass,showfreqs,format=yuv420p highpass.mp4
result: https://dsc.cloud/weavermedia/highpass.mp4 INCORRECT
I tried several different source audio files and always get the same results.
I tried on 2 different Macs, albeit both with FFMPEG 4.1.4 installed via Homebrew.
I tried with different highpass settings and get same results (the default highpass settings are enough to hear the difference anyway).
UPDATE 2
Looking at the resulting videos side by side in QuickTime I see that showfreqs does actually appear to be using the audio stream from highpass but the final video contains the original unfiltered audio.
So my problem is actually how to get the resulting video to use the filtered audio stream instead of the original.
showfreqs converts its audio input to a video output, so ffmpeg will fallback on the original audio for audio output. In order to avoid this, split the highpass result and pass one copy to showfreqs while leaving the other for audio output.
ffmpeg -i audio.mp3 -filter_complex highpass,asplit=2[sf][aud];[sf]showfreqs,format=yuv420p;[aud]anull highpass.mp4
I want to stream a video over http server i can do this easily with ffmpeg exe using below command
ffmpeg -i abc.mp4 -f mpeg1video -vf "scale=640:480" -r 20 https://localhost/XXXX
but i want to achieve same result using ffmpeg library instead of exe. i can easily play/record video using ffmpeg libraries.
I need to decode .mp3 file using libmp3lame decoder in ffmpeg, this ffmpeg build contains libmp3lame. Decoded output can be .wav/.raw format.So can anyone help me how to decode this using ffmpeg command line.I'm using windows 8.1 os.
Why not use LAME directly, since you are relying on the libmp3lame anyways?.. as in
LAME.EXE --decode myfile.mp3 myfile.wav
Novice user of ffmpeg but going thru whatever docs I can find online.
For a current project I will need to composite 2 videos together to create a .flv file.
Does anyone know the commands to do this?
This works for me:
ffmpeg -i background_file.l -i file_to_overlay.flv -filter_complex overlay=0:0 -acodec aac -strict -2 out.flv
See http://ffmpeg.org/ffmpeg.html#overlay-1 for more details.
Also you can add the scaler in the filter chain and scale things appropriately too.
Do a ffmpeg -filters to see the filters available.
I have three 3gp file,and I use sox to combine them
sox --combine sequence C:\1.3gp C:\2.3gp C:\3.3gp C:\newaudio.3gp
but It's show that "FAIL formats:no handler for file extension 3gp"
Its means that I have to install some extension?
I'm trying to do it with sox,Can anybody give me any suggestions ?
Or It's possible do it with ffmpeg ?
3gp is a multimedia container and not supported by sox.
You can extract the audio with ffmpeg and further process it with sox although ffmpeg can also do a lot of audio processing.
Here's one way to convert the data to wav, concatenate and convert back to 3gp:
ffmpeg -i 1.3gp 1.wav
ffmpeg -i 2.3gp 2.wav
ffmpeg -i 3.3gp 3.wav
Concatenate, maybe other things with sox (sequence is default so no need to specify):
sox 1.wav 2.wav 3.wav long.wav
Convert back to 3gp:
ffmpeg -i long.wav newaudio.3gp