Newest 'ffmpeg' Questions - Stack Overflow
Les articles publiés sur le site
-
how to convert h264 to flv with ffmpeg(using code not bin) [on hold]
28 août 2017, par Alan XieI want to convert h264 to flv with ffmpeg. I copied the file from FFmepg remuxing example,and try to convert h264 to flv with it.It runs with no exception,but the output seems error.It just keep staying in the first frame.How to solve this problem?
-
Bento4 MP4Dash fails with audio ?
27 août 2017, par CMOSI am running Bento4 Mp4Dash to convert my fragmented video files into MPEG-DASH streaming videos. However I seem to get this error
ERROR: unsupported input file, more than one "traf" box in fragment
but only if I have audio enabled. I have found that if I run -an in FFMPEG (to ignore the audio tracks) my MP4Dash command runs just fine, any ideas as to why this would happen?
-
Separate speakers from stereo microphones
27 août 2017, par AlexI have two audio tracks of dialogue - first - speech of client, second - speech of manager. The recording is done with two microphone. Unfortunnatelly every of recording contains the little sound of each other (for example the audio with client contains the soft voice of manager). How I can сlearly separate this audios?
-
`FFmpeg` `segment_time` inserts blank frames at the beginning of segment
27 août 2017, par asdfI am using the following command to cut videos in parts. I need parts to be less than passed max_length param, I do not need precise cuts.
ffmpeg -i input.mov \ -segment_time 20 -f segment -reset_timestamps 1 input_%d.mov
Every first part video file cut by
ffmpeg
is not 20s, but 20.5s long. And it has several black frames at the beginning inserted byffmpeg
.I don't mind having 19.5s long parts if that is needed because of keyframes. But I need to get rid of those black frames at the beginning so that videos cut in parts could be concatenated in a single video later without any troubles.
Could you give me an advice?
Upd:
There were no black frames in an original video which was 23 seconds long. I made a cut setting 12 as a segment length.
I also had to add
-c copy
because I would like to keep original quality if that's possible.Leading black frames were added after a cut to part 1 which is 12 seconds long.
Trailing black frames were added after a cut to part 2 which is 10 seconds long.
https://www.dropbox.com/sh/zo8evta3w1xho3o/AABpTB3w3CuPa1WcghkSIVfna?dl=0
The command used was
ffmpeg -y -i /Users/nt/Desktop/cut/AAL_CrSlowMo_041413_1.mov -c copy -segment_time 12 -f segment -reset_timestamps 1 /Users/nt/Desktop/cut/AAL_CrSlowMo_041413_1_%d.mov
Here's output of
ffmpeg
: https://gist.github.com/nmtitov/ad102539f95fa03b95f10a46f8d99663 -
rtsp to rtmp using ffmpeg or any tool wrapper
27 août 2017, par ChakriI have a requirement where I need to restream the RTSP stream from camera source to RTMP server. I know this may sound a repeated question but my exact scenario is I cannot do it manually over command line with ffmpeg command. I need a wrapper where I receive the rtsp and rtmp url from external source say through REST invocation. Then the code can trigger the ffmpeg restream.
Basically flow is like this:
- Camera source application sends RTSP read event(could be basic HTTP(REST) request with RTSP url, metadata about camera info, serial no etc) to my streamer app
Ex: /usr/bin/ffmpeg -i rtsp://10.144.11.22:554/stream1 -f flv rtmp://10.13.11.121:1935/stream1
Streamer app computes the RTMP server url for corresponding camera and triggers a ffmpeg command to stream RTSP to RTMP
Streamer app triggers above(2) in separate thread and keeps reading the logs for monitoring purpose. Also identifies the end of RTSP stream and sends an update(Example: RTSP END) event to UI
Now at point(2) I need a suggestion. Here I need a stable wrapper/api which can help. I tried this through some Java wrappers but the process hangs or fails to read the output from ffmpeg. Also I need to handle streams from many cameras where spawning thread for each one could be exhaustive.
So I am looking for some similar api/wrapper in C++ or Go Lang which might have more closer interaction in handling ffmpeg command.
Please point if similar issue is addressed elsewhere