FORUMS: list search recent posts

ffmpeg adding white flash frame at end of .mov output file

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Mark Burton
ffmpeg adding white flash frame at end of .mov output file
on Aug 14, 2015 at 8:27:08 pm

When encoding a .mov file which has both audio and video into an H264 AAC .mov, the resulting file has a white frame at the end.

Command:
ffmpeg -i inputFile.mov -c:v libx264 -profile:v main -preset medium -b:v 2400000 -pix_fmt yuv420p -movflags +faststart -strict -2 -c:a aac -b:a 128k outputFile.mov

Others have also reported this issue, but I'm yet to find a work around (the '-shortest' method below does not help)
https://forums.creativecow.net/thread/291/681
https://trac.ffmpeg.org/ticket/2108#no1
https://ffmpeg.org/pipermail/ffmpeg-user/2012-May/006737.html

Since creating H264 AAC files with ffmpeg must be one of the most popular output choices, there must be a solution somewhere surely.
Anyone had any luck with this?

Thanks


Return to posts index

Lou Logan
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 15, 2015 at 4:43:07 am

Please show the complete console output from your command. Make sure to use the CODE button to format it properly; it makes it easier to read.


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 17, 2015 at 3:52:49 pm

Apologies, here is the full command and result.
Note - I have edited the inputfile and outputfile paths to remove the full path.
They are both located on the Desktop of the system.

Many thanks for any help you can offer,
Mark


ffmpeg -i input.mov -y -c:v libx264 -profile:v main -preset medium -b:v 2400000 -pix_fmt yuv420p -movflags +faststart -strict -2 -c:a aac -b:a 128k output.mov
ffmpeg version 2.5.2 Copyright (c) 2000-2014 the FFmpeg developers
built on Jan 1 2015 20:24:48 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --prefix=/Volumes/tempdisk/sw --as=yasm --enable-gpl --enable-pthreads --disable-ffplay --disable-ffserver --disable-shared --enable-static --enable-libvpx --disable-decoder=libvpx --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-libxvid --enable-zlib --enable-avfilter --enable-fontconfig --enable-libfreetype --enable-libass --enable-libutvideo --enable-filters --enable-postproc --enable-runtime-cpudetect
libavutil 54. 15.100 / 54. 15.100
libavcodec 56. 13.100 / 56. 13.100
libavformat 56. 15.102 / 56. 15.102
libavdevice 56. 3.100 / 56. 3.100
libavfilter 5. 2.103 / 5. 2.103
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘/input.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
creation_time : 2015-08-14 18:59:43
timecode : 01:00:00:00
Duration: 00:11:00.21, start: 0.000000, bitrate: 118696 kb/s
Stream #0:0(eng): Video: dnxhd (AVdn / 0x6E645641), yuv422p, 1920x1080, 116391 kb/s, 24 fps, 24 tbr, 24k tbn, 24k tbc (default)
Metadata:
creation_time : 2015-08-14 18:59:43
handler_name : Apple Alias Data Handler
encoder : Avid DNxHD Codec
Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, stereo, s32 (24 bit), 2304 kb/s (default)
Metadata:
creation_time : 2015-08-14 18:59:43
handler_name : Apple Alias Data Handler
Stream #0:2(eng): Data: none (tmcd / 0x64636D74) (default)
Metadata:
creation_time : 2015-08-14 19:03:29
handler_name : Apple Alias Data Handler
timecode : 01:00:00:00
[libx264 @ 0x7f8d8903b000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[libx264 @ 0x7f8d8903b000] profile Main, level 4.0
[libx264 @ 0x7f8d8903b000] 264 - core 142 r2479 dd79a61 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=36 lookahead_threads=6 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=24 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=2400 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mov, to '/output.mov':
Metadata:
major_brand : qt
minor_version : 537199360
compatible_brands: qt
timecode : 01:00:00:00
encoder : Lavf56.15.102
Stream #0:0(eng): Video: h264 (libx264) (avc1 / 0x31637661), yuv420p, 1920x1080, q=-1--1, 2400 kb/s, 24 fps, 12288 tbn, 24 tbc (default)
Metadata:
creation_time : 2015-08-14 18:59:43
handler_name : Apple Alias Data Handler
encoder : Lavc56.13.100 libx264
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp (24 bit), 128 kb/s (default)
Metadata:
creation_time : 2015-08-14 18:59:43
handler_name : Apple Alias Data Handler
encoder : Lavc56.13.100 aac
Stream mapping:
Stream #0:0 -> #0:0 (dnxhd (native) -> h264 (libx264))
Stream #0:1 -> #0:1 (pcm_s24le (native) -> aac (native))
Press [q] to stop, [?] for help
[mov @ 0x7f8d89081000] Starting second pass: moving the moov atom to the beginning of the file
frame=15845 fps= 82 q=-1.0 Lsize= 11956kB time=00:11:00.22 bitrate= 148.4kbits/s
video:1145kB audio:10362kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.906625%
[libx264 @ 0x7f8d8903b000] frame I:64 Avg QP: 0.16 size: 431
[libx264 @ 0x7f8d8903b000] frame P:3993 Avg QP: 0.02 size: 78
[libx264 @ 0x7f8d8903b000] frame B:11788 Avg QP: 0.04 size: 71
[libx264 @ 0x7f8d8903b000] consecutive B-frames: 0.8% 0.0% 0.0% 99.2%
[libx264 @ 0x7f8d8903b000] mb I I16..4: 100.0% 0.0% 0.0%
[libx264 @ 0x7f8d8903b000] mb P I16..4: 0.0% 0.0% 0.0% P16..4: 0.0% 0.0% 0.0% 0.0% 0.0% skip:100.0%
[libx264 @ 0x7f8d8903b000] mb B I16..4: 0.0% 0.0% 0.0% B16..8: 0.0% 0.0% 0.0% direct: 0.0% skip:100.0%
[libx264 @ 0x7f8d8903b000] final ratefactor: -46.80
[libx264 @ 0x7f8d8903b000] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter: 0.0% 0.0% 0.0%
[libx264 @ 0x7f8d8903b000] i16 v,h,dc,p: 99% 0% 1% 0%
[libx264 @ 0x7f8d8903b000] i8c dc,h,v,p: 100% 0% 0% 0%
[libx264 @ 0x7f8d8903b000] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7f8d8903b000] kb/s:14.20




Return to posts index


Lou Logan
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 17, 2015 at 11:44:08 pm

Please test a build from recent git master. For OS X you can get a recent snapshot from here:
http://evermeet.cx/ffmpeg/

What player are you using? Does it occur with ffplay?
Does it occur if you do not encode the audio? (add -an option)
Does it occur with a different video encoder, such as mpeg4?
Does it occur with just one input file, or others too? Do you have a short input file you can share so the issue can be reproduced?


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 18, 2015 at 2:32:56 pm

As per the other threads linked, this appears to be limited to x264 and clips with both audio and video and has something to do with millisecond differences in the audio length compared to the frames of the video. Really hoping someone has found a workaround as making H264 files is a hugely popular use for this tool.

Please test a build from recent git master. For OS X you can get a recent snapshot from here:
http://evermeet.cx/ffmpeg/

No difference with latest 2.7.2 build.

What player are you using? Does it occur with ffplay?
It does not show in QT Player and other Quicktime based playback engines. It does show in VLC, Quicktime and another online viewing platform we use. I don’t use ffplay, but believe it does show the issue based on the other threads linked. Basically its there, its just that some players down't read it.

Does it occur if you do not encode the audio? (add -an option)
Only occurs when there is audio as well.

Does it occur with a different video encoder, such as mpeg4?
Issue seems to be limited to the x264 codec.

Does it occur with just one input file, or others too? Do you have a short input file you can share so the issue can be reproduced?
Happens across all clips, sometimes it doesn’t, but I believe this is luck based on the audio samples and video length.


Return to posts index

Lou Logan
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 18, 2015 at 5:26:44 pm

[Mark Burton] "No difference with latest 2.7.2 build."

I was referring to the git snapshot, not the release. General users are recommended to use a build from current git master. Releases are targeted for distributors and are never as up to date as git master.


Return to posts index


Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 20, 2015 at 11:24:02 am

Got it. Could you point me to the latest Mac OS X build from the current git master.
Thanks



Return to posts index

Lou Logan
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 20, 2015 at 6:07:42 pm

Go here: http://evermeet.cx/ffmpeg/

Click the first green box on the left. It will look something like:
ffmpeg-74581-g1bbb5ea.7z


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 20, 2015 at 6:39:48 pm

Thanks for that. Have tested with the latest and its no different unfortunately.



Return to posts index


Reuben Martin
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 20, 2015 at 9:50:20 pm

If it really is a mismatch between audio and video stream length, add "-shortest" to the command arguments which stops encoding once the end of the shortest stream is reached.


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 21, 2015 at 12:30:18 pm

Thanks. I did try that before since it was mentioned in another thread - from my first post - the user in that post reported that it made no difference for them. I found it also made no difference for me. Although I wasn't 100% clear on the best place to put -shortest in the ffmpeg commend, where should it go in the command?

Many thanks to everyone for the continued help and ideas.



Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 22, 2015 at 2:02:34 pm
Last Edited By Mark Burton on Aug 22, 2015 at 2:04:01 pm

I have now tested doing an open and resave of the encoded file in MPEG Streamclip (which retains the fast start header I need) and the resaved file does not display the white frame!

Interestingly, looking the length of the file in our streaming player, the original encode shows its 1 frame longer than the resaved version. This all points to the fact the audio is being encoded a few milliseconds longer than the video and a 'false' frame is being created by the player to allow the audio to finish playing.

I need my files to be saved with the faststart header and obviously it would be great to avoid using MPEG Streamclip each time on top of the encode process.

Still keen to properly test the -shortest flag, as so far I'm not finding thats helping but may not be using it in the correct place.

Any other thoughts? I can't use another aac library as the other high quality libraries are not included in the binaries due to licensing restrictions I believe.



Return to posts index


len hugh
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 22, 2015 at 10:08:22 pm

These are not solutions, but might help confirm some things.

If you run your ffmpeg code without the fast start flag does it fix the white flash fault?
If so, if you run ffmpeg over the output and only add the fast start does the fault remain gone?
eg
ffmpeg -i outputFile.mov -movflags +faststart outputFile_with_faststart.mov

Is the Mpegstreamclip output the correct number of frames and the FFMPEG output is one frame longer then your avid sequence?

If you use -ss and specify the same start and end code as you have in avid does that effect the result?


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 23, 2015 at 9:53:39 am
Last Edited By Mark Burton on Aug 23, 2015 at 9:54:48 am

[len hugh]
If you run your ffmpeg code without the fast start flag does it fix the white flash fault?
Thanks for the ideas L, really appreciate having your help. I still see the white flash on files encoded without the fast start flag in the command.

If so, if you run ffmpeg over the output and only add the fast start does the fault remain gone?
eg
ffmpeg -i outputFile.mov -movflags +faststart outputFile_with_faststart.mov

Although removing the fast start flag didn’t work, I did try this and it actually makes the problem worse.

Looking at these files in iMediaHUD, the original Avid source file has a duration of 00:01:11.042, this is shown the same for both the video and audio tracks.

Encoding with ffmpeg (with or without fast start flag) shows a duration of 00:01:11:042 for the video track and 00:01:11:063 for the audio track.

Doing the fast start only command on the output file from above makes it even worse; now the video track has changed to 00:01:11.084 and the audio track has changed to 00:01:11.116.

Both of the above files show white frame at the end of the clip.

Is the Mpegstreamclip output the correct number of frames and the FFMPEG output is one frame longer then your avid sequence?
Exactly, MPEG Streamclip fixes the discrepancy between the video and audio tracks.

I have also tested doing the original ffmpeg command with the a:c set to copy and this produces a perfect file, albeit with uncompressed audio which is not much help to me. So we know its an AAC issue.

Looking at the available AAC encoders, I would have to compile ffmpeg myself in order to use alternate AAC (non free) encoders and I'm not sure they would make any difference (see link below).

If you use -ss and specify the same start and end code as you have in avid does that effect the result?"
Good idea. Although not sure -ss is the right one to use is it? I tried adding -t to the command and entering 00:01:11.042, but the audio track is still longer.

Reading this post, it seems like this has been an issue for a very long time and almost considered the correct behaviour. Very strange. Surely creating H264 AAC files is one of the most popular uses for ffmpeg, can’t believe this is an acceptable output.

Do you not see this on your AAC files?


Return to posts index

Reuben Martin
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 24, 2015 at 9:15:33 pm

I have never encountered this issue, but then again, I generally use the libfdk_aac encoder.


Return to posts index


Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Aug 27, 2015 at 12:38:13 pm
Last Edited By Mark Burton on Aug 27, 2015 at 12:39:43 pm

Have now tested libfdk_aac and libfaac and found the same problem. It seems likely this is more a decoder issue with a specific playback engine we use.

Having looked into how compressed aac audio is actually stored in the container (in this case a .mov), it does look like there is an incompatibility with the way ffmpeg does it and our decoder. Thats likely the reason the ffmpeg 'bug' reports around this issue always end with the developer stating its as expected, which is right. The emphasis is on the decoder to understand whats called the aac priming I believe.

This is all well above my pay grade, could well be on completely the wrong track, but as far as I can see, there is nothing 'wrong' with the files in and of themselves, its just that the layout is not as widely understood as Quicktime .mov's.

Thanks for all your ideas and help. The short of it is that there is nothing I can do in ffmpeg to change this behaviour. I need to either change the .mov container structure post encode (MPEG Streamclip 'fixes' the issue) or the decoder needs to be updated to handle ffmpeg files with aac audio better.



Return to posts index

Reuben Martin
Re: ffmpeg adding white flash frame at end of .mov output file
on Sep 1, 2015 at 4:44:28 pm

You might try to see if it works better in an mp4 container. I don't know if that causes conflict in your workflow, but since you seem to indicate quicktime is being used I've found that it handles mp4 files easily enough.

The mp4 format is loosely based on mov, but it is an official standard, so it is documented quite extensively. mov format on the other hand is apple's proprietary format, and while some documentation for it can be found, there are lots of things that are vague and open to interpretation, other things totally undocumented, and places where the implementation quirks diverge from the documentation.

It may not fix your problem, but if the content is being encoded to h264 + aac there's no reason not to try it out.


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Sep 7, 2015 at 5:48:23 pm

Unfortunately the mp4 route does not work for either. The platform we play on only accepts .mov files. I tried to see if making first as mp4 and then re-wrapping to .mov with ffmpeg worked, but no luck.

I may have found another workaround solution which is at least scriptable and can be included with the ffmpeg command. Using the QTCoffee toolkit (modmovie) to re-wrap the output into a new self contained .mov produces a file which is essentially the same as those that Quicktime creates. It does not have the 'offset' on the aac track and as a result plays without the white flash frame. Its doing the same as MPEG Streamclip, but since its command line based, its much more suited to our scripted workflows.

Still testing it to make sure there are no sync issues as a result, but I think this is probably the best workaround for now. Thanks for all the help everyone, much appreciated.



Return to posts index

Blake Sloan
Re: ffmpeg adding white flash frame at end of .mov output file
on Mar 31, 2016 at 11:45:31 pm

Here's a solution to the trailing white flash that seems to work for me when converting DnXHD to x264:

ffprobe

The result will have a line like:
> Duration:00:00:08.75 ...

When encoding x264 (or other format)
Subtract 0.04 from this time code when passing the -t arg to ffmpeg.

ffmpeg -i -ss 00:00:00.0 -t 00:00:08.71


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Apr 1, 2016 at 6:10:56 pm

I've tested that before and its not 100% reliable unfortunately, you will end up losing a frame of picture in some instances. The issue is a structural issue with the container rather than there actually being an extra frame I believe.



Return to posts index

Blake Sloan
Re: ffmpeg adding white flash frame at end of .mov output file
on Apr 1, 2016 at 9:20:16 pm

Doh. Yes. It may be possible (trying as I write this) to find the "sweet spot" duration parameter by iteratively encoding, reading the output duration with ffprobe and reducing the requested duration by some small number (trying with 1/100) until the output duration is less than the input, then using the previous iteration's encoding. It is no longer fun. :)


Return to posts index

len hugh
Re: ffmpeg adding white flash frame at end of .mov output file
on Apr 1, 2016 at 9:43:35 pm

My work around of late has been to create audio using afconvert. which is another commandline tool build into mac(windows has something similar i think) then make the h264 video with ffmpeg and copy the afconvert created audio into the h264.
its a bit of double handling and I love to know if there is a way to make the afconvert file in some sort of temp folder so it gets removed after I have my h264.
but it works.


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Apr 27, 2016 at 8:43:06 am

Hi mate, sorry I didn't come to you on this. If I were you, I'd just do it all in ffmpeg in one hit and use another tool to rewrap the .mov. Its not so much the encode of the aac thats the issue with ffmpeg, but the way it creates the .mov wrapper where the problem occurs I believe.



Return to posts index

len hugh
Re: ffmpeg adding white flash frame at end of .mov output file
on Apr 27, 2016 at 9:25:10 am

What I have working thru avconvert seems to work. I have not used pix so I cant be 100% sure if its pix friendly but checking it back thru avid and protools I can see the difference.


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Apr 27, 2016 at 11:46:04 am

OK cool. How are you combining the two together?



Return to posts index

len hugh
Re: ffmpeg adding white flash frame at end of .mov output file
on May 27, 2016 at 1:18:19 pm

Apologies for the delay.
busy.
The script I was using involved taking 3 wavs and a .mov picture and combining.
I recently went to create a script that would work with only one .mov file as the input.
I found that afconvert does not like .mov files. All I get out is the sound of static. If anyone can tell me why that would be great.
WAV files seem ok.
So it means I have to first get ffmpeg to create a wav file from the original, then give that to afconvert, then ffmpeg can use that afconvert file in its encode. I store the wav and the afconvert audio in the temporary files. If you are using applescript then this code helps....
set wav_intermediate_audio to quoted form of (POSIX path of (path to temporary items)
To connect the ffmpeg script to strip the WAV, and the afconvert, and the final encode I use ";" between each section. In a bash script this will daisy chain the scripts so they run one after another.
Here is my latest script.
/usr/local/bin/ffmpeg -threads 0 -y -i 'original.mov' -vn '/private/var/folders/wb/sdb3ggw90k52h17chk5pt9qr0000gp/T/TemporaryItems/wav_intermediate_audio.wav';afconvert -v '/private/var/folders/wb/sdb3ggw90k52h17chk5pt9qr0000gp/T/TemporaryItems/wav_intermediate_audio.wav' -o '/private/var/folders/wb/sdb3ggw90k52h17chk5pt9qr0000gp/T/TemporaryItems/primed_acc.wav' -q 127 -b 128000 -f m4af -d aac;/usr/local/bin/ffmpeg -threads 0 -y -i '/private/var/folders/wb/sdb3ggw90k52h17chk5pt9qr0000gp/T/TemporaryItems/primed_acc.wav' -i 'original.mov' -map 0 -c copy -map 1:v -vcodec libx264 -crf 22 -pix_fmt yuv420p -preset faster "output.mov"
I have only just finished it so I have not tested the speed of it. But audio is pretty quick to encode.


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on May 31, 2016 at 7:17:17 pm

Thanks mate. Not sure I understand the batch command though, why is the output from afconvert called 'primed_acc.wav'? Are you not trying to make an AAC file to go back into the .mov at the end or was this just a typo?

I'm not sure there is a way for afconvert to handle a .mov file, it is called Audio File Convert after all!


Return to posts index

len hugh
Re: ffmpeg adding white flash frame at end of .mov output file
on May 31, 2016 at 11:04:18 pm

your right, there is probably a more sensible containter to use, .wav works as a container as well. the codec within it is still aac.
.aac as an output extension doesnt seem to work. I get
"Error: ExtAudioFileOpenURL failed ('sync')"
from afconvert if I try an output with .aac esxtention.

I checked the file compatibility of afconvert and it sheds light on it all.
afconvert -hf
3gpp' = 3GP Audio (.3gp)
data_formats: 'Qclp' 'aac ' 'aace' 'aacf' 'aach' 'aacl'
'aacp' 'samr'
'3gp2' = 3GPP-2 Audio (.3g2)
data_formats: 'Qclp' 'aac ' 'aace' 'aacf' 'aach' 'aacl'
'aacp' 'samr'
'adts' = AAC ADTS (.aac, .adts)
data_formats: 'aac ' 'aach' 'aacp'
'ac-3' = AC3 (.ac3)
data_formats: 'ac-3'
'AIFC' = AIFC (.aifc, .aiff, .aif)
data_formats: I8 BEI16 BEI24 BEI32 BEF32 BEF64 UI8 'ulaw'
'alaw' 'MAC3' 'MAC6' 'ima4' 'QDMC' 'QDM2'
'Qclp' 'agsm'
'AIFF' = AIFF (.aiff, .aif)
data_formats: I8 BEI16 BEI24 BEI32
'amrf' = AMR (.amr)
data_formats: 'samr'
'm4af' = Apple MPEG-4 Audio (.m4a, .m4r)
data_formats: 'aac ' 'aace' 'aacf' 'aach' 'aacl' 'aacp'
'ac-3' 'alac' 'paac'
'm4bf' = Apple MPEG-4 AudioBooks (.m4b)
data_formats: 'aac ' 'aace' 'aacf' 'aach' 'aacl' 'aacp'
'paac'
'caff' = CAF (.caf)
data_formats: '.mp1' '.mp2' '.mp3' 'AC-3' 'QDM2' 'QDMC'
'Qclp' 'Qclq' 'aac ' 'aace' 'aacf' 'aach'
'aacl' 'aacp' 'ac-3' 'aes3' 'alac' 'alaw'
'dvi8' 'ilbc' 'ima4' I8 BEI16 BEI24 BEI32
BEF32 BEF64 LEI16 LEI24 LEI32 LEF32 LEF64
'ms\x00\x02' 'ms\x00\x11' 'ms\x001' 'ms \x00'
'paac' 'samr' 'ulaw' 'zaac' 'zach' 'zacp'
'MPG1' = MPEG Layer 1 (.mp1, .mpeg, .mpa)
data_formats: '.mp1'
'MPG2' = MPEG Layer 2 (.mp2, .mpeg, .mpa)
data_formats: '.mp2'
'MPG3' = MPEG Layer 3 (.mp3, .mpeg, .mpa)
data_formats: '.mp3'
'mp4f' = MPEG-4 Audio (.mp4)
data_formats: 'aac ' 'aace' 'aacf' 'aach' 'aacl' 'aacp'
'ac-3'
'NeXT' = NeXT/Sun (.snd, .au)
data_formats: I8 BEI16 BEI24 BEI32 BEF32 BEF64 'ulaw'
'Sd2f' = Sound Designer II (.sd2)
data_formats: I8 BEI16 BEI24 BEI32
'WAVE' = WAVE (.wav)
data_formats: UI8 LEI16 LEI24 LEI32 LEF32 LEF64 'ulaw'
'alaw'

I guess I should be using .mp4 as an output really. but WAV is working fine.


Return to posts index

Mark Burton
Re: ffmpeg adding white flash frame at end of .mov output file
on Jun 1, 2016 at 12:55:32 pm

Got it. I gave this method a go and for me the resulting .mov file displays an audio track duration which is too long, its as ffmpeg would do on its own for me. If I take a 00:00:15.00 (15 seconds exactly) 24fps file and process with this method, the resulting file has a duration of 00:00:15.062. Using modmovie, the file is 00:00:15.00.
Are you getting a resulting file with an audio track which matches exactly the source file?



Return to posts index

len hugh
Re: ffmpeg adding white flash frame at end of .mov output file
on Jun 11, 2016 at 12:14:46 pm

No, my audio is longer then my source wav file but after I finally sat down and properly read this
https://developer.apple.com/library/ios/technotes/tn2258/_index.html

Reading this it seems that a longer duration for aac audio is correct and that its up to the player to offset 2112 samples so its in sync.

2112 silent samples at the head and then a number of samples at the tail to round it up to the next 1024 packet would mean that it is always longer then the original audio, and longer then the video

I have been putting various tests thru afinfo.
its built into macs.
(into the terminal type afinfo and then the file you want the info on)

my test original is a 10 second count down with a pip at 10, another at 2 and one at the very last frame.

I am still working thru a variety of tests,
Its worth putting a pip at the first and last frame of your files to check your results. I get some strange results. eg. avid dnx mov put thru Mpegstreamclip and the result mp4 with aac audio has the pip on the last frame missing.

the only thing to say at this point is a wav output from avid then put that thru afconvert(aac audio) provides an afinfo report of...
audio 480000 valid frames + 2112 priming + 192 remainder = 482304
and so far its the only way I have found to hear both the first frame pip and the last frame pip is to go via afconvert.
yes the audio is longer then the wav but it seems to behave as the apple developer page says.
If you are getting an aac file the same duration as a wav I would check that its not dropping samples of your audio.

Ill update you later when I get time to study more methods and tests.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]