Hot answers tagged

13

Just mux the images You can simply mux the JPG images to make a video: ffmpeg -framerate 30 -i input%03d.jpg -codec copy output.mkv Note that if you omit -framerate then a default of -framerate 25 will be applied to the input. Lossless optimization You can use jpegtran to perform lossless optimization on each frame which may provide significant file ...


8

tl;dr: Since Youtube reencodes all videos regardless of the upload format, it really isn't that important. Just export your video with a high bitrate to preserve quality. Also see my answer here regarding quality loss caused by Youtube. Long answer: Each reencoding of a video to a compressed format lowers the quality. Usually, that means you'll lose quality ...


7

This will output a lossless H.264 video where frames will use information from other frames ffmpeg -f image2 -r 30 -i %09d.jpg -vcodec libx264 -profile:v high444 -refs 16 -crf 0 -preset ultrafast a.mp4 Explanation of options: -f image2 - tells ffmpeg to select a group of images -r 30 - tells ffmpeg to encode at 30 frames (or images) per second (change ...


6

Ffmpeg can encode video using ProRes, and runs cross-platform ffmpeg -i input.avi -c:v prores -profile:v 3 -c:a pcm_s16le output.mov will do the trick.


5

What you are describing is effectively what 2-pass VBR does for you. It makes a first path that calculates the level of change for each particular time in the video and then uses this information to make the best possible use of the available storage space. It is, however, entirely possible to do the process manually by doing multiple encodings with ...


5

I've answered a similar question some time ago. YouTube added a few codecs since then but all the info there still applys: What codec will my Youtube uploads be output in and what codec should I use to upload? Short answer: Yes if you are concerned about maximum quality a lossless codec or visually lossless codec is the way to go. Re-encoding always means ...


5

Yes, you have the right idea. If stib's suggestion of making multiple outputs in parallel with the same ffmpeg commandline doesn't quite do the trick, then use a temp file to hold a lossless copy of the output of any slow filtering: ffmpeg -i src.mkv -vf yadif=3:1,mcdeint=2:1 -c:a copy -c:v libx264 -preset ultrafast -qp 0 deinterlaced.mkv (never use ...


5

YouTube will re-encode whatever you give it. VP9 is currently too slow to encode. So the best choice is to either: Give it the original footage, or if it is not accepted by YouTube or is too big to upload, then... Re-encode to H.264 ffmpeg ffmpeg will accept just about any input and will provide a great quality output. Development is very active, so it ...


4

To expand on LordNeckbeard's answer, yes, just mux the JPEG data into an MJPEG video stream. That will be the smallest representation of the exact sequence of output images, even though MJPEG is a terribly inefficient codec by today's standards. (no temporal redundancy, and not even any intra prediction. You can make a variable-framerate MJPEG video to ...


4

I'm not sure how it will behave at very low frame rates, but it is worth pointing out this would also limit your options on how and when you could change frames since they would have to follow on the clock cycles. What is more likely to work in this case is a long keyframe interval. The majority of frames in a compression like H.264 only store the changes ...


4

There might not be a way. Based on your description of the problem, it sounds like the processing is the slow part. While the video encoder itself is able to do multi-threaded processing, the image processing you are doing may not be able to. By default, Premiere has always done as much parallel processing as possible for me and I frequently see it hit 99%...


4

I think it's probably easier to combine (stack) a full dimension background image (720x500px) with your video in ffmpeg instead of adding the 20px footer to the video. You can simply use the overlay filter for this: ffmpeg \ -loop 1 -i 720x500.jpg \ -i 720x480.mp4 \ -filter_complex overlay=0:0 \ -t 0:01.48 \ out.m4v Note: In this ...


4

The article you linked is not very good. Normally, single pass bitrate encodings convert your bitrate into a RF value with a maximum bitrate limit and takes it from there. x264's one-pass ABR ratecontrol is not implemented as CRF + limit. He's right that 2pass is by far the best way to hit a target bitrate, though. And he apparently doesn't ...


4

Rotate without re-encoding You can add rotation metadata: ffmpeg -i input.3gp -c copy -metadata:s:v rotate=90 output.3gp -c copy will enable stream copy mode, so it will just re-mux instead of re-encode. Player and device support for the rotate metadata may vary, so your player or device may not actually rotate the video. If that is the case you may ...


4

If the frame-rate is not too high and you can associate a frame with a precise timestamp then the easiest would be to add the metadata as textual subtitles. The other option is to mux the metadata as standard headers in .mp4 or similar container format. .mp4 can be broken down into multiple fragments, each one with its own header, and theoretically this can ...


4

Although @stib's advice is sound, I disagree with "to get an appreciable size reduction you would have to throw away a lot of quality". Cameras have to compress on-the-fly, so they use constrained baseline mode, which is to say, they skip most of the tricks that H.264 codec uses to efficiently compress videos. If space isn't a pressing concern, keep them as-...


4

MP4 isn't an ideal format for intermediate saves. If you know you'll be re-opening the file, save it as losslessly as practicable, and use MP4 only for the final output. That said, depending on the encoder and settings you probably don't lose much if anything on subsequent saves. MP4 and similar codecs work by decimating the higher frequencies (details, ...


4

No, because it's content dependent. Video with high motion contains more information than a nearly still scene does. Hence it takes more bits to encode.


3

It looks like a problem with the playback engine. I would try updating your video card drivers and/or making sure the playback engine (in the project/ project settings/general menu) is set to Mercury Playback Engine Software Only. If that doesn't work, I'd try uninstalling and re-installing Premiere. I don't know what can cause it on Mac OS, but on ...


3

If compatibility is your top priority, then you should include two alternative versions of your video on your website, like in this HTML example. As for the exact formats I would suggest: H.264 and AAC in MP4: Chrome, Firefox 22+ on Windows, IE9, Safari 3.1 VP8 and Vorbis in WebM: Firefox fallback for Mac and older versions on Windows. (If you need ...


3

While there are video encoders that do this kind of thing, most commonly this is the work of a video switcher or mixer. A video switcher is a device used for mixing live video from multiple sources. The bad news is they generally aren't cheap. An HD capable switcher is typically in the $6000+ range with the absolute cheapest one I know of being the Black ...


3

To understand this you need to understand how codecs actually work. A plain uncompressed video frame e.g. a single picture is pretty large. I'm talking about a bitmap, not a lossless encoded video, no encoding at all, just plain pixel information. Here simple example of a Full HD frame for some perspective: We have a resolution of 1920x1080 that equals to ...


3

This isn't a phenomenon, this is compression. It is simply how it works. Compression works by taking an input, runs it through some algorithms and then gets an output that matches up either exactly (lossless) or approximately (lossy) with the original input. It is not stored like normal video data as a set of pixels, but rather some form of data that ...


3

Use the vstack filter: ffmpeg -i video.mp4 -i image.png -filter_complex vstack output.mp4 If the image is not the same width as the video then resize it with the scale filter: ffmpeg -i video.mp4 -i image.png -filter_complex "[1:v]scale=320:-1[bottom];[0:v][bottom]vstack" output.mp4


3

On Windows, I recommend FootageStudio 4K. It is a commercial converter (not cheap) that supports many professional formats, including ProRes.


3

Players buffer streams. The bigger the buffer size, the longer window the encoder has to use higher bitrates for hard content, and then fewer bits earlier or later on easy content, to achieve similar quality for the whole video. I'll assume you're going to use h.264 (aka AVC) as a codec, as it's the de-facto standard for streaming video on the Internet. ...


3

You can only estimate the bitrate as proportion of your crop. If you have 30,000 Kbps for 1920*1080 pixel, then for 1080*1080 pixel this would mean 16,875 Kbps. If there is more complexity inside the crop region than outside, I would even increase the target bitrate further. However, if your videos are not that long and not intended for streaming I wouldn't ...


3

Judge based on the quality rather than the bitrate value. Use CRF mode encoding and if the quality isn't what you can accept, decrease the CRF value. ffmpeg -i "%%a" -s 3840x2610 -c:v libx264 -crf 18 -acodec copy D:\%%~na.mp4


3

The fourth stream apparently is a CEA-608 subtitle stream, which during the days of analog television signal transmission was caption data embedded within the video data. Apparently FFmpeg can extract it but can't mux it to a new container. As for stripping only the audio, MP4Box may be of help.


3

I would get as far away from EE as possible. Using the x264 tool, and mp4box, you can convert and segment out the files which are ready to be streamed to any dash compatible players. Especially since you mentioned using batch scripts, this is a great solution I think. This is a good guide: http://www.dash-player.com/blog/2014/11/mpeg-dash-content-generation-...



Only top voted, non community-wiki answers of a minimum length are eligible