ffmpeg

Rescaling and slowing down a movie at the same time with ffmpeg

我与影子孤独终老i 提交于 2021-02-05 11:38:50
问题 I would like with ffmpeg to slow down a movie I am creating using the flag: -filter:v "setpts=2.0*PTS" However the height of my still images is not divisible by 2, so to avoid the error: height not divisible by 2 (1238x833) , I am using the flag: -vf scale="trunc(iw/2)*2:trunc(ih/2)*2" (I also tried -vf scale=1238:-2 ). When I do this the film is generated but it isn't slowed down, like if the -filter:v "setpts=2.0*PTS" wasn't there. Is there something particular to do in order to have both

Rescaling and slowing down a movie at the same time with ffmpeg

僤鯓⒐⒋嵵緔 提交于 2021-02-05 11:38:16
问题 I would like with ffmpeg to slow down a movie I am creating using the flag: -filter:v "setpts=2.0*PTS" However the height of my still images is not divisible by 2, so to avoid the error: height not divisible by 2 (1238x833) , I am using the flag: -vf scale="trunc(iw/2)*2:trunc(ih/2)*2" (I also tried -vf scale=1238:-2 ). When I do this the film is generated but it isn't slowed down, like if the -filter:v "setpts=2.0*PTS" wasn't there. Is there something particular to do in order to have both

MPEG Audio Constant bit rate conversion

纵然是瞬间 提交于 2021-02-05 11:34:48
问题 I am trying to convert few .wav files to .mp3 format The desired .mp3 format is : I tried with FFmpeg with this code : ffmpeg -i input.wav -vn -ac 2 -b:a 160k output1.mp3 This is the output of this command on one .wav format I am getting the result but two things are different Overall bit rate mode and Writing library Writing library: LAME3.99.5 vs LAME3.100 ( I think this shouldn't make any problem?) bit rate mode Constant Vs variable How to change bit rate mode from variable to Constant?

MPEG Audio Constant bit rate conversion

房东的猫 提交于 2021-02-05 11:34:07
问题 I am trying to convert few .wav files to .mp3 format The desired .mp3 format is : I tried with FFmpeg with this code : ffmpeg -i input.wav -vn -ac 2 -b:a 160k output1.mp3 This is the output of this command on one .wav format I am getting the result but two things are different Overall bit rate mode and Writing library Writing library: LAME3.99.5 vs LAME3.100 ( I think this shouldn't make any problem?) bit rate mode Constant Vs variable How to change bit rate mode from variable to Constant?

Problem with extracting audio from a video file (android)

纵然是瞬间 提交于 2021-02-05 11:26:07
问题 I need to convert an mp4 (or any other video format) to mp3 or wav file. I am using C# Xamarin.Forms. Any library I used either doesn't work for me, or isn't compatible with android. I have tried using Xamarin.Android.FFMpeg and Xobe.FFMpeg. I repost this because it was marked as duplicate and I clearly stated that that solution isn't working for me. This is the post that was flagged as duplicate: How can I extract the audio out of a video file? (android) . Please, I tried it but it just

How I can I add audio to my ffmpeg stream

纵然是瞬间 提交于 2021-02-05 09:48:14
问题 I want to add audio to my ffmpeg cli bellow ffmpeg -framerate 25 -video_size 1920x1080 -f x11grab -i :0.0 -vf format=yuv420p http://localhost:8080/feed.ffm I tried -acodec libmp3lame, -c:a libmp3lame but it does not seam to work 回答1: You have to provide an audio input. Assuming ALSA: ffmpeg -framerate 25 -video_size 1920x1080 -f x11grab -i :0.0 -f alsa -sample_rate 48000 -channels 2 -i hw:0 -c:v libx264 -c:a aac -vf format=yuv420p http://localhost:8080/feed.ffm See FFmpeg ALSA input

How I can I add audio to my ffmpeg stream

你。 提交于 2021-02-05 09:46:34
问题 I want to add audio to my ffmpeg cli bellow ffmpeg -framerate 25 -video_size 1920x1080 -f x11grab -i :0.0 -vf format=yuv420p http://localhost:8080/feed.ffm I tried -acodec libmp3lame, -c:a libmp3lame but it does not seam to work 回答1: You have to provide an audio input. Assuming ALSA: ffmpeg -framerate 25 -video_size 1920x1080 -f x11grab -i :0.0 -f alsa -sample_rate 48000 -channels 2 -i hw:0 -c:v libx264 -c:a aac -vf format=yuv420p http://localhost:8080/feed.ffm See FFmpeg ALSA input

Can't give metadata of comment to MP3 file using ffmpeg

拥有回忆 提交于 2021-02-05 08:47:26
问题 I want to covert a AAC to MP3 and give metadata of comment to the MP3 file using ffmpeg. But -metadata comment doesn't work and ffmpeg doesn't return any error. My code is ffmpeg -i "test.aac" -ab 128k -metadata comment='this is test' "test.mp3" I tried -metadata description='this is test' and also update ffmpeg. Other function such as -metadata artist and -metadata album works well. What's wrong with this code? Output Stream mapping: Stream #0:0 -> #0:0 (aac (native) -> mp3 (libmp3lame))

FFmpegAndroid library rotates video after Compress

情到浓时终转凉″ 提交于 2021-02-05 08:11:07
问题 execFFmpegBinary(new String[]{"-y", "-i", path, "-s", "160x120", "-r", "25", "-vcodec", "mpeg4", "-b:v", "150k", "-b:a", "48000", "-ac", "2", "-ar", "22050", filePath}); video auto rotate after compress.. is there any solution? here is lib Link 回答1: it might be the autorotate issue in FFMPEG and you have to disable autorotate: ffmpeg -noautorotate -i input.mp4 output.mp4 if this solution doesn't solve your problem, you can get the input video rotation with Android APIs like this:

FFmpegAndroid library rotates video after Compress

梦想的初衷 提交于 2021-02-05 08:10:40
问题 execFFmpegBinary(new String[]{"-y", "-i", path, "-s", "160x120", "-r", "25", "-vcodec", "mpeg4", "-b:v", "150k", "-b:a", "48000", "-ac", "2", "-ar", "22050", filePath}); video auto rotate after compress.. is there any solution? here is lib Link 回答1: it might be the autorotate issue in FFMPEG and you have to disable autorotate: ffmpeg -noautorotate -i input.mp4 output.mp4 if this solution doesn't solve your problem, you can get the input video rotation with Android APIs like this: