Tag Info

Hot answers tagged

30

ffmpeg -i q.mp4 -c copy -bsf h264_mp4toannexb q.ts ffmpeg -i r.mp4 -c copy -bsf h264_mp4toannexb r.ts ffmpeg -i "concat:q.ts|r.ts" -c copy -bsf aac_adtstoasc qr.mp4 How to concatenate flv file into one


26

I don't want to touch the actual quality of the video I want the conversion to be as fast as possible. Use FFmpeg with -c copy to just copy the contained data (video, audio, subtitles). ffmpeg -i file.mov -c copy out.mp4 ffmpeg -i file.mov -c copy out.mkv If there are more than one video / audio / subtitle stream, and you want to copy all, use: ...


22

First of all, install a more recent version of FFmpeg – grab a static build from the download page. The vpre option is deprecated and shouldn't be used anymore. You'll be much happier and experience less bugs using a recent version. The reasons you get low output quality are the following, for your two cases respectively: In the first case you use crf 25, ...


18

Which profile / quality to choose? I think the article you linked to is quite well written. You need a basic understanding of media encoding terminology to get started and not confuse codecs and containers as well as their properties. Moreover, not every video is the same. Depending on the content and your presentation scenario you may want to change the ...


17

What is a profile? A H.264 profile more or less defines what "bells and whistles" the encoder can use when compressing your video – and there are lots of H.264 features that the encoder can enable. Which ones it's allowed to enable is defined by the profile. Profiles ensure compatibility between devices that have different decoding capabilities. With ...


16

Judging from their extension, these videos probably are "raw" h264 files - they contain just the video data, without any audio and outside of the container. Because they don't contain any headers, media players are unable to understand their contents - however I believe that you can play such files if you declare that they do contain h264 video ! I can ...


15

But I'm wondering if there's a way to determine a "good" target bitrate … A good target bit rate is the bit rate that either: is supported by the network you're streaming the material from (e.g. a 3G network, home WiFi, etc.), which is pretty easy to calculate looks good to you, which is a very subjective measure 22 Mbit/s or 45 Mbit/s are indeed ...


12

MP4Box will do this for you: MP4Box -cat File01.m4v -cat File02.m4v File-joined.m4v MP4Box is cross-platform and works on OSX, however I tried this on Ubuntu Linux with H264 videos created by Handbrake for the iPhone 4S. This works quite fast as the files are not re-encoded.


8

FFmpeg won't show you this information, really. You could use AtomicParsley to parse the file, e.g.: AtomicParsley input.mp4 -T This will show you the location of the atoms in a tree. If the moov atom is at the beginning of the file, it'll have to come right after the ftyp atom, so you could try parsing the output, e.g. in Bash, only printing the ...


7

The correct FFmpeg command is: ffmpeg -i video.mp4 -i audio.mp4 -map 0:0 -map 1:0 -c copy output.mp4 This will supply two input streams, the video you already have and the audio, e.g. from an MP4 file with AAC audio, and merge them together using the -map options. Here, the first number in 0:0 is the input file (0 for the video file and 1 for the audio ...


7

.h264 is just a raw H.264 bytestream. That's just video content, which can be played back by sophisticated players, but usually you want to put everything into a container format, such as MPEG-4 Part 14 ("MP4"). So, run: ffmpeg -i file.avi -c:v libx264 -pix_fmt yuv420p file.mp4 For HTML5 progressive download you may want to move the moov atom of the MP4 ...


7

You can do this with Handbrake, which comes in both GUI and CLI flavours and uses ffmpeg on the backend to do the transcoding. HandBrakeCLI -Z "High Profile" -i a_movie.iso -o a_movie.mp4 Alternatively, if you have some funky FFmpeg voodoo that you can't easily replicate in HandBrakeCLI, you could mount the ISO locally and copy the VIDEO_TS folder up to ...


7

Using Handbrake the answer would be no. Handbrake is a CPU-only h.264 encoder, though it now is able to use OpenCL for video scaling and has some support for DXVA for video decoding. The question linked by slhck mentions MediaCoder, but it requires either an Nvidia graphics card or an Intel CPU with a 2nd generation graphics core. There are a couple of ...


6

It is considered encumbered because there is a group (MPEG LA) which manages the portfolio of patents which make up the H.264 standard. The license for H.264 (AVC) states: Includes right to manufacture and sell AVC encoders and decoders with the right of End Users to use them for personal and consumer (including internal business) purposes without ...


6

Without going into the details of video encoding: There's no such thing as "minimal quality loss" when your constraint is a specific video codec (h.264) or a certain bit rate. A limiting factor will always be there – if there was a way to conserve even more quality, that'd be the holy grail of video encoding, so to speak. There's only so much an encoder ...


6

H.264 isn't an open codec. The patent is owned by MPEG LA, which for several years, has allowed it to be used more or less freely. However, this can change at any time. So, rather than standardize on a codec that may or may not be free tomorrow, the Chrome team decided to base all their video on an open standard. On one hand, that's good because Theora and ...


6

Using this qtfaststart (not the same as ffmpeg's qt-faststart), qtfaststart -l input.mp4 will display the order of the top-level atoms. $ qtfaststart -l bad.mp4 ftyp (32 bytes) free (8 bytes) mdat (559619 bytes) moov (52916 bytes) $ qtfaststart -l good.mp4 ftyp (32 bytes) moov (52916 bytes) mdat (559619 bytes) $


5

VLC allows you to switch containers. Select Media->Convert/Save, select files, Convert->Save, click "Create New Profile" icon, change container, mark keep original video and audio tracks.


4

It's possibly a container problem, copying it to a new container format with avconv -i input.ts -c copy output.mp4 may well fix your problem. This will be 100% lossless. If that doesn't work, a crf of 18 is normally considered 'visually lossless'; you can set this is HandBrake (under the 'video' tab), or with avconv: avconv -i input.ts -c:a copy -c:v ...


4

My brother has the same issue. I am still working out how to convert these files which are full of errors. To play the files use mplayer Run the following commands, if one does not work, attempt the other mplayer -fps 25 filename.264 mplayer -fps 30 filename.264 You have to run mplayer from a DOS/Command window but the effort is worth it as it will ...


4

To be honest with you there are a number of ways to answers to that question. I work on a lot of medical conferences were I am given many presentations with a variety of videos; many formats do work, but many do not, most notably the quicktime container does not natively work in PowerPoint (Though can be achieved with an ActiveX Plugin). The codecs you ...


4

Matroska is just a "container" format. You can use any sort of video and audio compression for the streams stored in it. You can convert Matroska files with VLC (http://www.videolan.org), ffmpeg (http://www.ffmpeg.org), and mencoder (http://www.mplayerhq.hu)


4

When you pass -c:v libx264 after -i, you're telling FFmpeg to encode the input video stream to x264 video. However, you're telling it to write the video to an image2 format, within a JPEG file. This, naturally, won't work. You can actually see this in the stream mapping: Stream mapping: Stream #0:0 -> #0:0 (h264 -> libx264) So let's make FFmpeg ...


4

Finally we got the actual solution for 'Why our mp4(h.264)' videos are not playing in iphone . The solution is : remove or comment compress.conf file from httpd.conf(apache server config file). Compress.conf file is used to compress output before send it to client , If you don't want to remove compress.conf than you may comment few lines inside ...


4

If the video and audio is already encoded properly, use the following FFmpeg command: ffmpeg -i input.mkv -c copy output.mp4 This will copy the bitstreams without encoding. To convert AVI files you usually want to re-encode them, since they will often contain MPEG-4 visual video and MP3 audio instead of the required (or recommended) h.264 / AAC.


4

Note that for this, you should always use the latest ffmpeg version, and preferably compile it yourself. This gives you access to the most recent libx265 and libfdk-aac for audio encoding. Also, the data rate savings will be quite drastic if you're going from a ~10 MBit/s DVD to around 1–2 MBit/s for H.264 video and 0.5–1 MBit/s for H.265 video. Changing ...


3

Ok, after banging my head against the wall on this one for some time, it seems the answer was the H.264 level. It looks like ffmpeg defaulted to level 4.0 and that does not seem to be supported by iOS. When I set the level down to 3.1, I got an error about the DPB size from ffmpeg. So, I added a -refs 11 flag and now the video plays. I was even able to get ...


3

The issue here is that YouTube caps the bitrate of 1080p videos to 6Mbps since the overwhelming majority of their users average sustained download speed of 5.8Mbps. (The majority of their users are also too stupid to muck with settings, or even know what might be causing their lag, so they made the change (in the July-August time frame I believe) to fix the ...


3

Handbrake has presets for the iPhone, AppleTV 2 and 3, iPod and other devices. These make use of a rather recent bundled version of libx264 – so it usually produces really good quality. When choosing settings, make sure you use the Constant Rate Factor instead of a fixed or average bitrate (or check that it's not over 2 Mbit/s; see later for more). It ...


3

While slhck has a pretty comprehensive answer, a simpler way is to use the tools Apple has included in the OS. Apple's Automator has an encode movie option. Setting this up (at least on Mac OS X 10.7 and later) is a pretty quick process: Set up an Automator action that is a folder action Select the folder Add encode media action Specify 720p setting and ...



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