Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
ffmpeg unable to find a suitable output format for '\'
20 août 2017, par Blueeyes789I am trying following command to concatenate my 4 MP4 video files using FFmpeg with concat filter, but it gives the error:
Unable to find a suitable output format for '\'
Command:
F:\Partition C Backup\Downloads\Compressed\ffmpeg-20170817-92da230-win64-shared\ ffmpeg-20170817-92da230-win64-shared\bin>ffmpeg -i "long name with spaces 1.mp4" -i "long name with spaces 2.mp4" -i "long name with spaces 3.mp4" -i "long name with spaces 4.mp4" \ -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] [2:v:0] [2:a:0] [3:v:0] [3:a:0] concat=n=4:v= 1:a=1 [v] [a]" \ -map "[v]" -map "[a]" E:\FFmpeg.mp4
Please help me to find what is wrong syntax in this command.
-
Android ffmpeg restreaming video bind failed address already in use
20 août 2017, par mSappsI am receiving udp streaming from a camera(go pro camera) , I want to re streaming that stream to remote server. Here is the command I have tried
"ffmpeg -i 'udp://@10.5.5.9:8554' -fflags nobuffer -f:v mpegts -probesize 8195 -vcodec libx264 copy http://103.x.x.x:8090/feed1.ffm"
in my
build.gradle
I have included the followingcompile 'com.github.hiteshsondhi88.libffmpeg:FFmpegAndroid:0.2.5'
Here is my code
exec("ffmpeg -i udp://@10.5.5.9:8554 -fflags nobuffer -f:v mpegts -probesize 8195 -vcodec libx264 copy http://103.x.x.x:8090/feed1.ffm"); public void exec(String command){ try { // to execute "ffmpeg -version" command you just need to pass "-version" // Now, you can execute your command here ffmpeg.execute(command, new ExecuteBinaryResponseHandler() { @Override public void onStart() {} @Override public void onProgress(String message) {} @Override public void onFailure(String message) { Log.d("FFMPEG", "FAILED with output: "+message); // i got bind failed address already in used error } @Override public void onSuccess(String message) { Log.i("SUCCESS", message); } @Override public void onFinish() {} }); } catch (FFmpegCommandAlreadyRunningException e) { // Handle if FFmpeg is already running }
-
ffmpeg inaccurate seeking keyframes with H265 vcopy
20 août 2017, par dsagillesI've got an H265 4K MP4 29.97fps video with a GOP-size of exactly 30 frames. When I try to cut from the start using :
ffmpeg -ss 1 -i INPUT.MP4 -vcodec copy OUTPUT_1SEC.MP4 ffmpeg -ss 2 -i INPUT.MP4 -vcodec copy OUTPUT_2SEC.MP4 ffmpeg -ss 3 -i INPUT.MP4 -vcodec copy OUTPUT_3SEC.MP4 ffmpeg -ss 4 -i INPUT.MP4 -vcodec copy OUTPUT_4SEC.MP4 ffmpeg -ss 5 -i INPUT.MP4 -vcodec copy OUTPUT_5SEC.MP4 ffmpeg -ss 6 -i INPUT.MP4 -vcodec copy OUTPUT_6SEC.MP4 ffmpeg -ss 7 -i INPUT.MP4 -vcodec copy OUTPUT_7SEC.MP4 ffmpeg -ss 8 -i INPUT.MP4 -vcodec copy OUTPUT_8SEC.MP4 ffmpeg -ss 9 -i INPUT.MP4 -vcodec copy OUTPUT_9SEC.MP4
The output videos starts at either 0 (-ss 1~4), 4 (-ss 5~8) or 8 sec (-ss 9) as shown below:
So it seems ffmpeg somehow detect a GOP of 4 seconds instead of 1 seconds. Is it normal ?
Also, how can I burn the correct timecode in the output video ? For example, I tried many combinations such as:
ffmpeg -ss 5 -i INPUT.MP4 -vcodec copy -timecode 00:00:05:00 OUTPUT_5SEC.MP4 ffmpeg -ss 5 -i INPUT.MP4 -vcodec copy -copyts OUTPUT_5SEC.MP4 ffmpeg -start_at_zero -ss 5 -i INPUT.MP4 -vcodec copy -copyts OUTPUT_5SEC.MP4
But it either give me the exact timecode I put (first line) or starts at zero (two last lines)
Originally, I was thinking about seeking at the exact second (or a few frame after) so I knew I would get a keyframe so I could guess the exact timecode the output would start, but it seems ffmpeg -ss is not exactly based on keyframes ? Maybe I'm missing something here ? Thanks for the help.
Additionnal infos
I'd like to script the cut process, that's why I want to know where this 4-sec "keyframe interval" come from.
Here is the ffprobe output of my input:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'INPUT.MP4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2mp41 encoder : Lavf57.72.101 comment : DE=None, Mode=M, DSW=0001 location-{ : +XX.4914-0XX.5164+XX.000000/ location : +XX.4914-0XX.5164+XX.000000/ Duration: 00:01:45.31, start: 0.000000, bitrate: 100065 kb/s Stream #0:0(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, bt709), 4096x2160 [SAR 1:1 DAR 256:135], 100062 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 29.97 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(eng): Subtitle: mov_text (tx3g / 0x67337874), 2 kb/s (default) Metadata: handler_name : SubtitleHandler
Here is the command I used to check gop-size ('I' type at 1,31,61,... and 'P' in between):
ffprobe -i INPUT.MP4 -select_streams v -show_frames -show_entries frame=pict_type -of csv > OUTPUT.CSV
ffmpeg version N-86330-gbd1179e and ffmpeg version N-86330-gbd1179e
Edit : Sample video here
-
How to pass http headers using ffmpeg to play streaming ?
20 août 2017, par Wellington OliveiraI need to take a screenshot from a streaming with:
ffmpeg -y -ss 00:00:05 -i "http://xxxxx/live/767.ts" -vframes 1 -q:v 2 "/var/www/iptv/screenshots/file.jpg"
Most cases I received a message saying:
"Server returned 401 Unauthorized (authorization failed)".
But, when I running using VLC or KODI, my url is playing OK!
This is a restriction on streaming webserver that is blocking access from a request without header.
I have checked all ffmpeg documentation and I found no information about streaming headers.
-
FFMPEG distorting when resampling audio
19 août 2017, par jsamaudioI'm making an mp3 from a flac file with ffmpeg. This is usually hum-dum for me.
Tonight, for some reason, the converted audio is distorting when I use the same commands I've always used. After troubleshooting, it appears the problem is the "-out_sample_rate" flag.
My command:
ffmpeg -i input.flac -write_id3v1 1 -id3v2_version 3 -dither_method modified_e_weighted -out_sample_rate 44.1k -b:a 320k output.mp3
The audio in the mp3 is then incredibly distorted by a jacked gain resulting in digital clipping.
I've tried updating ffmpeg, and then problem remains. I've tried converting various sample rates (44.1k source files, 48k source files, 96k source files) to both 44.1k and 48k mp3s, problem remains whenever there's a conversion.
I'm on macOS, and I installed ffmpeg via homebrew.
Any ideas?