Hot answers tagged

10

I have a large set of jpgs that I want to convert to a video losslessly You can probably just mux the jpg images: ffmpeg -framerate 30 -i input%03d.jpg -codec copy output.mkv Then compare the md5sums of each frame with the framemd5 muxer: $ ffmpeg -i input%03d.jpg -f framemd5 - 0, 0, 0, 1, 460800, ...


7

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 ...


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

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 ...


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

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

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

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 ...


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

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 ...


3

I think it is easier to combine 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 example you have to ...


3

You can use the pad video filter to add the required space on the bottom, and then the overlay video filter to place the image: ffmpeg -i video.vob -i image.png -filter_complex \ "[0:v]pad=0:ih+20[bg];[bg][1:v]overlay=0:H-h,format=yuv420p[v]" \ -map "[v]" -map 0:a -c:v libx264 -c:a aac -strict -2 -movflags +faststart output.mp4 I had to make some ...


3

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 ...


3

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


3

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 ...


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

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 ...


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: ...


2

In AE's "output module settings", with the format set to h.264, click "format options". Under the "video" tab, make sure "Level" is set to 5.1. Here is a wikipedia entry which contains a table on h.264 level dimension constraints.


2

You can create an avi animation as a series of png images ( png is lossless so the jpeg => png conversion should not degrade your pictures ): if your images a named img_0001.jpg ffmpeg -r 25 -start_number 1 -f image2 -i "img_%04d.jpg" -vcodec png video.avi where "25" is the frame rate you want in the resulting video. -start_number is not needed if it ...


2

If you are willing to use Adobe products, Premiere supports direct integration with Adobe Media Encoder and can be set with presets that include multiple output formats and sizes. Each encoding runs off the actual main project, thus you remove the extra generation of loss. Alternately, using a lossless quality intermediate file will prevent issues as no ...


2

Unfortunately you are not going to be able to accomplish your goal. Two major factors impact this. First, color processing on different systems is going to differ. This will result in slight differences in the colors that are displayed because many video players apply "enhancements" to video and what you actually see when viewing the video in a browser is ...



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