Comments (7)
Attaching screen capture of the differences shown in "Atom Inspector"
Original comment by [email protected]
on 13 Jun 2011 at 4:24
Attachments:
- [Screen shot 2011-06-13 at 17.21.33.png](https://storage.googleapis.com/google-code-attachments/ffmbc/issue-48/comment-1/Screen shot 2011-06-13 at 17.21.33.png)
from ffmbc.
Hi Mark,
I think this has always been that way -t is not sample accurate.
Original comment by [email protected]
on 15 Jun 2011 at 3:06
- Added labels: Type-Wish
- Removed labels: Type-Defect
from ffmbc.
I've tried using '-ss 2 -vframes 75' instead, but that doesn't give complete
audio frames either.
Do you know if there is any method to get complete frames of audio?
Original comment by [email protected]
on 16 Jun 2011 at 10:28
from ffmbc.
Humm I'm not sure what you mean by "complete frames of audio". In PCM a
complete frame is 1 sample. If now you think duration of pcm audio frame ~=
duration of video frame.
There is no method currently, but it is an interesting idea.
Original comment by [email protected]
on 16 Jun 2011 at 9:54
from ffmbc.
Haha. Yes, that is an interesting different point of view.
Coming from a background of 20 years of Video Editing, I expect a frame of
audio to be 1920 samples long (48K sampling/25 FPS).
As a video editor, if I am using a tool that lets me extract a subclip (using
-ss and -t or -vframes) I expect to extract complete frames of video, and the
corresponding samples of audio that completely and exactly match the complete
duration of the video frames.
I can see how that is not possible with, for instance, mpeg2 audio frames who's
timestamp start and end points do not necessarily exactly map to the start and
end point timestamps of the video frames.
But, as a video editor, I've always worked with uncompressed video.
That thought lead me to an interesting experiment, excuse me while a ramble on
for a while:
compare:
ffmbc -i primary.mov -ss 2 -vframes 75 -vcodec copy -acodec copy 1.mov
with:
ffmbc -i primary.mov -ss 2 -vframes 75 -vcodec copy -acodec pcm_s16le 1.mov
I find that consistently (for the same input file) that -acodec copy always
gives me audio in lumps of 1024 samples until a small part of the last video
frame has audio, then it stops (except for -vframes 1, where you get no audio
at all).
My example of -vframes 75 gives me 142336 samples (according to Atom
Inspector).
75 frames of audio is 144000 samples (48000/25*75).
74 frames of audio is 142080
but I get 142336 samples, which is 139 * 1024
As it happens, 138 * 1024 = 141312, which is less than 142080
So 142336 samples is the first multiple of 1024 that completely satisfies
142080 samples, but is 1664 samples too few to completely fill 75 frames of
'PAL' video.
I find that consistently (for the same input file) that -acodec pcm_s16le
always gives me audio in similar lumps of 1024 samples offset by 639 samples
(except for -vframes 1, where you get no audio at all).
My example of -vframes 75 gives me 142975 samples (according to Atom
Inspector).
75 frames of audio is 144000 samples (48000/25*75).
74 frames of audio is 142080
but I get 142975 samples, which is 139 * 1024 + 639
As it happens, 138 * 1024 + 639 = 141951, which is less than 142080
So 142975 samples is the first multiple of 1024 + 639 that completely
satisfies 142080 sample, but is 1025 samples too few to completely fill 75
frames of 'PAL' video.
Wow - I wasn't expecting to see either 1024 or 639 in those calculations, but
at least 1024 makes some sense!
Now, I know 'NTSC' audio is more complex with your crazy 1001, but it is a
predictable sequence.
Anyway - rant over ;-)
Original comment by [email protected]
on 17 Jun 2011 at 3:08
from ffmbc.
Mark, I understand your rant, but let me correct you on one point:
"As a video editor, if I am using a tool that lets me extract a subclip (using
-ss and -t or -vframes) I expect to extract complete frames of video, and the
corresponding samples of audio that completely and exactly match the complete
duration of the video frames."
FFmbc is _not_ a video editing tool. I have to redirect you to FCP or Media
Composer for this, -ss and -t are convience tools but in no case guarantee what
you seem to require.
Original comment by [email protected]
on 17 Jun 2011 at 9:25
from ffmbc.
Original comment by [email protected]
on 26 Jul 2011 at 10:54
- Changed state: WontFix
from ffmbc.
Related Issues (20)
- Segmentation fault on XDCamHD encoding HOT 5
- When creating AVC-Intra 100 MXF vs MOV, the output bitrate of MOV is incorrect HOT 2
- Implementing subtitle tracks for QuickTime HOT 1
- Question about difference in CodecID in AVC-I MOV/MXF (FPS 23.976 vs 25) HOT 2
- Incorrect CodecID used for AVC-I 100 1080p 23.976fps HOT 2
- FFMBC crashes when attempting to produce audio file HOT 1
- Problem of ffmbc's 23.976fps AVC-I MOV file HOT 5
- segfault when trying to create mxf from wav HOT 3
- segfault when trying to make mov from an image (when some command option is not provided) HOT 6
- failed test on make fate ( tests/data/fate/lavfi-pixdesc) / segfault in version 0.7.1 HOT 6
- segfault combining rawvideo and audio HOT 6
- ffplay v 0.7.1 drop frames (lag) on mkv HOT 2
- ffprobe -print_format not functioning HOT 1
- LXF File Input Not Supported HOT 1
- Unkown pixel format for DnxHD in Avid MXF container HOT 2
- Piping rawvideo from ffmpeg into ffmbc will result in cutted file HOT 4
- Output Quicktime Clips Have Very Small (1 Frame) Chunks, Expensive for Playback HOT 1
- Download through wget HOT 2
- Support prores XQ - 4cc ap4x HOT 1
- doc typo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffmbc.