Reuben Martin
Forum Replies Created
-
Yes, you can use the drawtext filter. https://ffmpeg.org/libavfilter.html#drawtext
Even though MP4 does not support timecode tracks, you can still embed timecode by adding an audio track. LTC timecode is basically timecode information modulated into an audio signal. You can create and LTC audio file and add it as an alternative audio stream within the MP4. Of course, that may not be of much use for your situation, and the person / software using the MP4 file would have to know what to do with an LTC track.
The LTCSMPTE library comes with a little tool that can generate LTC audio in case your interested. https://ltcsmpte.sourceforge.net/index.html
-
An image sequence input obviously has no frame rate information included in it, so ffmpeg by default assumes that the input frame rate is 25fps. You have set the output rate to 24, so it the fames get dropped from frame rate conversion.
The order of options in ffmpeg matters:
— An -r option set after the -i option sets output frame rate.
— An -r option set before the -i option set the input frame rate.So move your -r option around.
Also, 23.98 is just an approximation. The anal-retentive-correct way to specify an NTSC-FILM fame rate is “-r 24000/1001”
-
Well, that’s a balance you have to find that satisfies you. Time to encode and file size are inversely proportional to quality.
If you want something faster, reducing trellis to 1 or 0 will speed things up quite a bit, but quality will not be as good.
It’s all a matter of determining what is most important to you (time, quality or file size) and going from there.
Not sure why Quicktime is not playing back audio for you. Mp3 is supported by the spec, but Quicktime does not always support every option available in a spec. You could try VLC to verify that the audio stream is properly encoded, but if the resulting file must be compatible with Quicktime, you may have to look more deeply into what Quicktime supports. For instance I never use AAC+ when the content has to be Quicktime compatible, because Quicktime just doesn’t know what to do with it. However, flash players in browsers handle it just fine.
-
The options change between versions. The options I gave need 0.9 or better.
You can download binary builds of the latest versions here: https://ffmpegmac.net/
However, I’m not sure if they are built with libfaac support. If not you may have to build your own, or use the visualon aac encoder if it supports it. (change “-acodec libfaac” to “-acodec libvo_aacenc” in that case) Also you can encode the audio with mp3 rather than aac, which is a perfectly valid format to mux into an mp4. (For mp3 change “-acodec libfaac” to “-acodec libmp3lame”)
I mainly work from linux, so I have no idea what options are enabled in the mac builds. To get a listing of what codecs are supported with the build of ffmpeg you are using, run “ffmpeg -codecs”
-
Quicktime compatible, high quality, decent compression ratio, somewhat slow encoding time:
ffmpeg -i input.MPG -deinterlace -pix_fmt yuv420p -vcodec libx264 -preset slow -vprofile high -trellis 2 -crf 20 -acodec libfaac -ac 2 -ab 192k -f mp4 -y output.mp4
Requires that the version of ffmpeg being used is built with libfaac support. Also requires a fairly recent version of ffmpeg.
-
Reuben Martin
March 27, 2012 at 12:31 am in reply to: Export to MXF container in M-JPEG2000 codec possible in ffmepg?Ok, I just re-built OpenJPEG with the mj2 extension enabled, and it includes tools like:
mj2_to_frames
frames_to_mj2
extract_j2k_from_mj2
wrap_j2k_in_mj2The “extract_j2k_from_mj2” tool should allow you to dump to a sequence that could then be muxed into an MXF using the OpenDCP toolset.
-
Reuben Martin
March 27, 2012 at 12:14 am in reply to: Export to MXF container in M-JPEG2000 codec possible in ffmepg?OpenDCP incorporates the functionality of the OpenJPEG library, which supports mj2 if built with the extension enabled. So the code to do it is available in the library. It would be unfortunate if that functionality is not exposed in the tools provided. Perhaps OpenJPEG has tools to convert the mj2 to a sequence.
-
Reuben Martin
March 18, 2012 at 9:48 pm in reply to: Export to MXF container in M-JPEG2000 codec possible in ffmepg?I think you miss my point. It’s more than just a DCP solution. It has the tool set to encode an image sequence into JPEG2000 and mux into an MXF file. The only difference between what you described and DCP, is that you would probably want to turn off the XYZ colorspace conversion.
i.e. Use FFmpeg to render to image sequence and use that as the input source with OpenDCP to create the Mjpeg2k MXF file.
-
Reuben Martin
March 13, 2012 at 6:04 pm in reply to: FFMPEG muxing is a miracle (NOT) – I’m going nuts!Those builds are built from the git development branch. Not a good idea to use them in production. Find of build of the 0.10 release version.
-
MP4 is ok, but for a live stream, MPEG-TS is a much better option.
As for named pipes, they can be tricky, because processes are blocked until there are connections on both ends of the pipe. You can get more control and unblock processes creating file descriptors and using those to interface with the pipe.