Lou Logan
Forum Replies Created
-
Lou Logan
February 12, 2013 at 7:17 pm in reply to: How to convert mp3 to m4a without losing qualityPlease include the complete ffmpeg console outputs for each ffmpeg command (and wrap them in the code tag for readability). Your first command will most likely complain:
[ipod @ 0x19694a0] track 0: could not find tag, codec not currently supported in containerHowever it will probably work with mp4 as your output container.
Your second command uses the native AAC encoder. It is not a great encoder, especially at lower bitrates, but it shouldn’t be terrible at higher bitrates. Can you tell a difference between “file.mp3” and “output.m4a”? If yes, and if you must re-encode to AAC, then I recommend using another encoder, such as “libfdk_aac” or “libfaac” as described in the FFmpeg and AAC Encoding Guide (specifically the VBR examples). However, it is recommended to avoid re-encode from a lossy format to another lossy format if possible.
-
Also see the FFmpeg and AAC Encoding Guide at the FFmpeg Wiki for examples and details on each AAC encoder supported by ffmpeg.
-
[Peter Robertson] ” Thanks. So the precompiled binary will have libx264, libfaac and libmp3lame?”
Not with libfaac (same with libfdk_aac or libaacplus). It requires the ffmpeg configure option of “–enable-nonfree” and therefore the resulting ffmpeg binary is non-distributable.
[Peter Robertson] “Another question–anyone running ffmbc? I want to be able to transcode HDV to ProRes.”
ffmpeg can encode to ProRes too:
ffmpeg -i input -c:v prores -profile:v 0 -c:a pcm_s16le output.mov
The “-profile” option will determine the specific ProRes type:- 0 proxy
- 1 lt
- 2 standard
- 3 hq
What’s the difference? See the Apple ProRes White Paper.
-
Why didn’t you mention what program you are trying to compile? It’s likely that it isn’t up to date with current FFmpeg.
-
Lou Logan
January 21, 2013 at 10:23 pm in reply to: NellyMoser codec support in ffmpeg being withdrawn ??Hello. There have been no mention of Nellymoser decoder and/or encoder removal in any of the usual FFmpeg development channels as far as I know. What is the source of this rumour?
-
Lou Logan
January 21, 2013 at 10:16 pm in reply to: 911101 – how to make an h264 video from jpeg files?[stephen dixon] “ffmpeg -i myjpeg_0%3d.jpg -vcodec libx264 -preset slow -profile main -crf 20 -r 30 movie.mp4”
Default input frame rate is 25, so setting frame rate as an output option will cause ffmpeg to duplicate frames to deal with going from 25 to 30. Sometimes this is desired but usually not. Instead, “-r 30” can be used as an input option (before “-i”) and the output will inherit that same frame rate.
[hamid sherkat] “i’ve some jpeg files. i want to put them into sequence in an h264 video.”
In addition to what stephen mentioned see the FFmpeg and x264 Encoding Guide for a detailed explanation and examples.
If your input files are not in sequential order see Using ffmpeg with decimal wildcard for other methods and examples.
-
Lou Logan
December 27, 2012 at 7:02 pm in reply to: [ffmpeg] Best settings for quick images @ 720p MP4[Alex Harzy] “Well I probably don’t know the difference between muxing and encoding.”
Think of it as a copying and pasting the video and audio into another media container format.
[Alex Harzy] “what would that “-c copy” and “-map 0″ command do?”
“-c copy” enables stream copy mode, and “-map 0” will copy all streams of input 0 (the first input). By default ffmpeg includes only one stream of each type (video, audio, subtitle) present in the input files and adds them to each output file. “-map 0” overrides this default. I usually explicitly include it because users often don’t know that the default behaviour may not include all streams of the input: such as in input with multiple audio streams.
See the documentation on stream copy, stream selection, and stream specifiers. Also see info on “-codec (or ‘-c’ as an alias)” under Main options, and “-map” under Advanced options.
This is my 14th post and they are still being moderated for approval. I wonder how long that lasts.
-
Lou Logan
December 25, 2012 at 9:08 pm in reply to: [ffmpeg] Best settings for quick images @ 720p MP4[Alex Harzy] ”
1) Sometimes, the aspect ratio of the output file is scrumbled. I mean, sometimes the video converted is unnaturally stretched in a 4:3 screen aspect. I don’t know why this happens, I solved this problem by adding “-s 960×540″ in the command in the video section.”With what player(s) does it appear to be incorrect? It’s hard to say what might be going on without the complete ffmpeg console output that appears after you run your command (excluding “-s 960×540”).
[Alex Harzy] ”
2) Sometimes, when I convert a two hour mkv to a mp4, the audio is out of sync by a second or two, progressively.”Does this occur using the same command you showed, or are you modifying it? Also, instead of re-encoding the MKV, you can probably simply re-mux into a MP4 container since the video stream in the MKV is most likely H.264 video which works just fine in MP4 container. Assuming your audio stream is compatible with MP4 container:
ffmpeg -i input.mkv -c copy -map 0 output.mp4 -
Lou Logan
December 9, 2012 at 10:48 pm in reply to: [ffmpeg] Best settings for quick images @ 720p MP4[Alex Harzy] ”
Can they vary *that* much?
I’m asking you because I couldn’t find a sort of a table displaying couples regarding # crf <—> kbit/s bitrate.”You won’t find such information, and if you did the data would only apply to the inputs used to create the table. If you crate your own data it may give you a rough idea if your inputs all contain similar scenes. As in where the content does not vary much between each input.
To overgeneralize, think of -crf as a ratecontrol mode to choose a certain quality. A ratecontrol will decide how many bits are give per frame–which will determine file size and how quality is distributed. With -crf the bitrate will fluctuate due to the encoder attempting to achieve the target quality. A more complex input will use more bits to achieve the desired quality, so not all inputs will use the same amount of bits to achieve a certain quality. One thing you can can estimate is that a crf value of +6 is roughly half the bitrate, and -6 is roughly twice the bitrate; meaning -crf 20 will probably use ~2x as many bits as -crf 26. The CRF Guide contains some more information.
-
Lou Logan
December 7, 2012 at 10:41 pm in reply to: [ffmpeg] Best settings for quick images @ 720p MP4[Alex Harzy] “-crf XX values:
0 – 18 for lossless
20 for about 2500-3000 kbit/s bitrate
21 for about 2000-2500 kbit/s bitrate
22 for about 1500-2000 kbit/s bitrate
23 for about 1000-1500 kbit/s bitrate
24 – 28 for low quality files (useful for still images)”These values are probably not very useful since they can vary depending on your input and your preset.