Tag Info

New answers tagged

1

I had similar issues with the concat filter and I think it's due to the differing time bases used for the inputs. I overcame it with the concat protocol method. I think it's showing variable framerate for your trim-only output because with a 1/90000 base time a 60Hz video will have expect a frame every 1500, but the concat filter may have smushed two ...


1

Can I know if in the file exists on a specific date (for example, January 1, 2014)? Can I analyze the meta-data stream of the h264 ? No, because the stream is simply an H.264 bitstream with (simply speaking) one frame after another. It does not contain any metadata. When you want metadata, you need a container, e.g. an MPEG-2 Transport Stream, which is ...


1

ffmpeg on its own cannot do that. You have to figure out the duration of the individual segment yourself, as there's no way to specify a minimum duration. For this you'd probably iterate over the total length of the video twice. In the first run, determine the length of the segments. If you find that the last segment is shorter than, say, 15 seconds, you ...


1

As far as I can tell, the FLV format does not officially support uncompressed audio in PCM format (see the spec). However, you can still multiplex PCM audio into FLV with ffmpeg. There seems to be a bug or incompatibility with ffplay not playing the audio correctly, but it works for me in VLC: ffmpeg -i sample.mkv -c copy sample.flv If you want to be more ...


1

The answer therefore seems to be: Method 1 is verified to work, but is libx264-specific, and comes at the cost of eliminating the very useful scenecut option in libx264. Method 3 works as of the FFMPEG version of April 2015, but you should verify your results with with the script included at the bottom of this post, as the FFMPEG documentation is unclear ...


0

No, there isn't an option in ffmpeg to specify a subtitle track that should be shown by default. (ffmpeg version 2.6.1 built with gcc 4.9.2 (GCC) 20150304 (prerelease) as default on Arch, see end of answer for compile flags) Resources highlighting the lack of command line options for setting default/forced subtitles stream in ffmpeg include the following: ...


2

From the options in your question, I would use Method 1, as it's the most robust. You should simply set the keyint and min-keyint to the same value and disable scene detection. If you don't disable scene detection, the "counter" will indeed be reset, and your keyframes end up at irregular intervals. Note that I am not assuming variable framerate sequences ...


1

There is a difference between Sample Aspect Ratio (SAR) and Display Aspect Ratio (DAR). If you want to change the video to display at 4:3, you will need to resize the image. If you want to use FFmpeg to resize without re-encoding, try: ffmpeg -i [INPUT] -s 720x540 -c copy [OUTPUT] You can also try changing just the DAR with: ffmpeg -i [INPUT] -aspect ...


1

You cannot codec copy when applying a filter. Also, Youtube has a max framerate of 60fps, so if that is your end goal, you will be dropping frames from your variable framerate file at some point within the transcoding chain anyway. It's hard to give better advice without having more specific knowledge of your file type, and what your desired end format is. ...


1

In general it is not safe to parse the output of ls(see below) and similarly "*.*". I suggest to use find it protects you from unusual file name with special character. #!/bin/bash #Convert files using ffmpeg OrDir="/Volumes/Misc/To Convert 2/" find "$OrDir" -type f -exec /bin/bash -c \ 'f2=$(basename "$1"); \ ffmpeg -i "$1" -c:v libx264 -crf 19 ...


2

As the directory name contains spaces, you need to quote "$DIR" to prevent spaces from being parsed as word separators. I would also suggest you slightly change the for loop: #!/bin/bash DIR="/Volumes/Misc/To Convert 2" cd "$DIR" for i in *.*; do ffmpeg -i "$i" -your_option "/Volumes/Misc/Converted/${i%.*}.m4v" done


0

If you want ACCURATE duration, forget FFMEG. It only gives an estimate based on filesize and average bitrate. I've found, in some case, the estimated duration time off by 2x! On Linux, if file is created and modified only during the said video recording, an alternate solution would be to use creation and last modification time to calculate duration, ...


0

Your guess is correct, that the video quality has nothing to do with the video encoding, but the deinterlace filter. You are using yadif, but if you are unsatisfied with its quality have a look at the other deinterlacing filters kerndeint, mcdeint and w3fdif. You can find usage details and options in the ffmpeg documentation.


1

Steam selection By default one stream per stream type will be selected. If you use -map then this default stream selection behavior will be disabled. However, it is generally recommended to explicitly define your filter inputs and outputs instead of relying on the defaults to avoid unexpected stream selection issues. Scale Instead of trunc(oh*a/2)*2 you ...


3

Some games as well as movie editing softwares installs and uses ffmpeg and automatically adds it to %PATH%. I've had it be installed with virtualdub and even with some smaller indie games.


0

I am not familiar with KDENLive, or Ubuntu .... so take the following with a grain of salt... that said, most non-linear editors will need to parse the MPEG-2 streams before rendering them properly. You could try transcoding the media into another file format before bringing them into KDENLive. If you want to maintain file quality, and don't have an issue ...


0

As mentioned in ticket #2166 you need to double-escape the colon: movie=x\\:/test1/video.mov


2

Two things: Your parentheses and quotes are wrong. You had "][1] at the end but that'd be one bracket too much, and you should close the quote at the very end only. For Windows, you need to double-escape the colon in the movie filter. Otherwise, it'll be interpreted as an option-separator. I don't know why exactly, but ticket #2166 mentions it. This ...


1

Try specifying -ss 00:03:00 before your input file. I haven't tried this with screen capture/livestreaming, but I know that this works with standard ffmpeg transcoding syntax. For example, the following command will input a file, transcode the entire file to h264, and then only save the output starting at the 3 minute mark. ffmpeg -i [INPUT] -ss 00:03:00 ...


1

ffmpeg does not automatically map all tracks; default stream selection will only map one audio, one video, and one subtitle track to the output. If you want to map all streams, use -map 0. If you want to be able to select what to map, you'll have to parse the input file first (ffmpeg -i input.mkv) and use some scripting to construct the final conversion ...


1

I gave up of using ffmpeg for this. I solved the problem using afconvert (included by default on MacOS). For example: afconvert test.mp3 -o test.caf -d ilbc


0

We have used IQMango 3D Converter and the result is impressive http://iqmango.com/3DVideo_Converter.html


1

You can use the channelsplit filter. Assuming a stereo input: ffmpeg -i input -filter_complex \ "[0:a]channelsplit[l][r]; \ [l]showspectrum=color=intensity,pad=0:ih*2[left]; \ [r]showspectrum=color=intensity[right]; \ [left][right]overlay=0:h[v]" \ -map "[v]" -map 0:a -c:v libx264 -c:a copy output.mkv This is just an example to show how channelsplit ...


1

The way I got around this was using my own RTMP server to stream the video to the host. I pipe my video to the local RTMP server using mkfifo x ytdl http://youtube.com/watch?v=12345 > x ffmpeg -re -i x -c copy -f flv rtmp://mylocalRTMPserver/stream Then create a stream from that to the host using ffmpeg -re -i rtmp://mylocalRTMPserver/stream ...


1

You must also set the gop size. -g [fps * segment time]


0

-open command promt (windows+r ->cmd->enter) -then go to inside the folder where you have audio and video file apply this cmd "ffmpeg -i videoFile.mp4 -i audioFile.mp3 -shortest outPutFile.mp4" Enter....you will get a new file named outPutFime.mp4 (a merged file of audio and video)


3

It is possible to apply temporal and spatial blurring to a segment/section – assuming the area you want to blur is a static location. Original and blurred black lab pup. Example command ffmpeg -i derpdog.mp4 -filter_complex \ "[0:v]split=2[v0][v1]; \ [v0]crop=200:200:60:30,boxblur=10[fg]; \ [v1][fg]overlay=60:30[v]" -map "[v]" -map 0:a -c:v libx264 ...


1

even 20 days ago 19 is well past EoL so the repos you are attempting to pull off of are dead. On 20 or 21 the method you are using WILL work as those repos are still active.


1

I found the best solution was to actually just overwrite the image locally. I played around a lot with pipes and processes in Python, but nothing worked as well as just running ffmpeg from the command line and overwriting the image. I ended up doing this on Linux, but it should work on Windows. ffmpeg command: ffmpeg -re -loop 1 -i out.jpg -re -f lavfi -i ...


0

You forgot an -i: ffmpeg -i audio.ogg -i video.webm … ^ | |


0

Sheikh Aman, your problems sounds like it's because you are not consuming the stderr stream from ffmpeg and it gets backed up and everything stops working. I solved this problem using '-loglevel', 'quiet'


2

As documented -r tells the encoder to ignore timestamps in the input file and assume a constant frame rate. The frame rate is the number of images per second that are available in the video. -b gives the bitrate for the video. This is the number of bits per second for the video stream. There is no direct relation between the two numbers.


1

This is odd that no-one suggested the trim filter. Drop everything except the second minute of input: ffmpeg -i INPUT -vf trim=60:120 Keep only the first second: ffmpeg -i INPUT -vf trim=duration=1 Drop everything except from second 13 to second 58: ffmpeg -i INPUT -vf trim=13:58 OUTPUT


1

Yes, it's possible. However, you can't do it with ffmpeg. Automatically creating a 3D picture from a 2D source is a hard problem, since there is no actual depth information or any disparate source image to work with. This kind of automatic 2D-to-3D conversion will therefore look quite bad if not done properly—and even then, you might have troubles watching ...



Top 50 recent answers are included