Greetings, i've some dilemma here.
I'm trying to get the audio from a movie part (e.g. the opening, dialogues, etc.)
The problem is, mp3DirectCut, which the program i use to trim the unwanted parts, seems to display file length incorrectly.
WMP with LAV codec, displays the length properly. (for example the movie is 24 minutes long, mp3DirectCut displays the length is 25 minutes)
However, WinAmp also displays the file length incorrectly, 25 minutes.
What have i done is demux mkv with MKVcleaver, and open the AAC on mp3DirectCut.
FYI this is the properties
Code:Audio Format : AAC Format/Info : Advanced Audio Codec Format version : Version 4 Format profile : LC Bit rate mode : Variable Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 28.1 MiB (100%)
+ Reply to Thread
Results 1 to 27 of 27
-
-
Length is displaying incorrectly because the file is VBR and the app(s) don't know how to correctly calculate length for files of that type. CBR is usually "filesize = bitrate * running time", with running time being listed as # of samples or # of "frames/packets". You can't do that with VBR.
Not surprised. VBR audio is OFTEN a bitch to work with.
Can mp3directcut make the edits the way you'd like? If so, don't sweat it.
ScottLast edited by Cornucopia; 30th May 2013 at 01:05.
-
-
Does "Use TOC Correction for VBR" under the Settings menu make a difference if it's checked?
-
It seems that option do nothing to the file length.
fileforum.betanews.com/review/1010041409/1/view < proof -
You can cut (copy) it accurately with ffmpeg . Don't demux from the original mkv container . Some mkv's have variable frame rate, and that can cause some programs to give you the running time discrepancies . If you leave it in the mkv, this will keep the timecodes.
use -ss for start time (in hh:mm: ss.ms notation) , and -t for duration
e.g. copy audio from 10:00 minutes start time , for 1 minute , 5 seconds duration (until 11 minute , 5 second , playing time)
Code:ffmpeg -i input.mkv -vn -acodec copy -ss 00:10:00 -t 00:01:05 output.mp4
-
-
You don't have to demux it in a separate step; just change it to "output.aac" instead of "output.mp4"
I'm not sure how accurate ; it's within a few ms for audio.
But video , it isn't accurate for "cutting" - only to nearest keyframe -
Did you specify the precise .ms in ffmpeg ? hh:mm: ss.ms , and it was still 40ms off ?
You can also try cutting with mkvtoolnix with audio only ie. .mka using timecodes (with video, you can only cut to nearest keyframe, but with audio it should be much more precise. If the video was I-frame only, you can cut with frame accuracy) ,then demux it with mkvextract -
Yes it is I-frame, all of them, in VirtualDub, all frames are marked [k].
It was not 40ms off, ffmpeg appends some silence at the end..
EDIT: Console output
PS C:\Users\User\Documents\ffmpeg-20130606-git--win64-static\bin> .\ffmpeg -i '..\..\..\videos\Angel Beats!\[SS]_Angel
_Beats!_-_03_(1280x720_H.264)_[7378C000].mkv' -ss 12:12.690 -to 12:18.946 -acodec copy ..\..\output1.aac
ffmpeg version N-53868-gc51654f Copyright (c) 2000-2013 the FFmpeg developers
built on Jun 6 2013 03:06:23 with gcc 4.7.3 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfi
g --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetyp
e --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopenco
re-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libsp
eex --enable-libtheora --enable-libtwolame --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-lib
vpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib
libavutil 52. 35.100 / 52. 35.100
libavcodec 55. 15.100 / 55. 15.100
libavformat 55. 8.102 / 55. 8.102
libavdevice 55. 2.100 / 55. 2.100
libavfilter 3. 75.101 / 3. 75.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 3.100 / 52. 3.100
[matroska,webm @ 000000000249a440] Unknown entry 0x437E
Last message repeated 4 times
Input #0, matroska,webm, from '..\..\..\videos\Angel Beats!\[SS]_Angel_Beats!_-_03_(1280x720_H.264)_[7378C000].mkv':
Metadata:
title : Angel Beats! - Episode 03 - My Song
creation_time : 2010-04-29 05:29:20
Duration: 00:24:29.93, start: 0.000000, bitrate: 2144 kb/s
Chapter #0.0: start 0.000000, end 89.965000
Metadata:
title : Opening
Chapter #0.1: start 90.005000, end 735.944000
Metadata:
title : Part A
Chapter #0.2: start 735.984000, end 1348.556000
Metadata:
title : Part B
Chapter #0.3: start 1348.596000, end 1454.912000
Metadata:
title : Ending
Chapter #0.4: start 1454.952000, end 1469.885000
Metadata:
title : Preview
Stream #0:0(jpn): Video: h264 (High), yuv420p, 1280x720, SAR 185:187 DAR 2960:1683, 23.98 fps, 23.98 tbr, 1k tbn, 47
.95 tbc
Stream #0:1(jpn): Audio: aac, 48000 Hz, stereo, fltp (default)
Stream #0:2: Subtitle: ssa (default)
Metadata:
title : Character Colour Style
Stream #0:3(eng): Subtitle: ssa
Metadata:
title : Plain Style
Codec 0x18000 is not in the full list.
Stream #0:4: Attachment: unknown_codec
Metadata:
filename : Dutch 766 Bold BT.ttf
mimetype : application/x-truetype-font
Codec 0x18000 is not in the full list.
Stream #0:5: Attachment: unknown_codec
Metadata:
filename : Hamilton-Medium.otf
mimetype : application/x-truetype-font
Codec 0x18000 is not in the full list.
Stream #0:6: Attachment: unknown_codec
Metadata:
filename : ShinnBold.ttf
mimetype : application/x-truetype-font
Codec 0x18000 is not in the full list.
Stream #0:7: Attachment: unknown_codec
Metadata:
filename : ShinnBoldItalic.ttf
mimetype : application/x-truetype-font
Codec 0x18000 is not in the full list.
Stream #0:8: Attachment: unknown_codec
Metadata:
filename : ShinnDemiBold.ttf
mimetype : application/x-truetype-font
Codec 0x18000 is not in the full list.
Stream #0:9: Attachment: unknown_codec
Metadata:
filename : ShinnMedium.ttf
mimetype : application/x-truetype-font
Codec 0x18000 is not in the full list.
Stream #0:10: Attachment: unknown_codec
Metadata:
filename : ShinnMediumItalic.ttf
mimetype : application/x-truetype-font
Output #0, adts, to '..\..\output1.aac':
Metadata:
title : Angel Beats! - Episode 03 - My Song
encoder : Lavf55.8.102
Chapter #0.0: start 0.000000, end 3.254000
Metadata:
title : Part A
Chapter #0.1: start 3.294000, end 6.256000
Metadata:
title : Part B
Stream #0:0(jpn): Audio: aac, 48000 Hz, stereo (default)
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Press [q] to stop, [?] for help
size= 97kB time=00:00:06.27 bitrate= 126.7kbits/s
video:0kB audio:95kB subtitle:0 global headers:0kB muxing overhead 2.114934% -
Very unlikely this mkv is all I-frame (encoded with intra) , I'm 99.99% certain
The reason is you're decompressing the video in vdub (uncompressed video), because of the input filter used by vdub
Anyways, if you know the timecodes , you can remux a .mka (audio only mkv) , and try mkvtoolnix -
I don't know if external url is allowed, but this: http://forums.animesuki.com/showthread.php?t=34738 , explained why this job comes to incredibly hard.
-
Last edited by passlogin; 8th Jun 2013 at 19:42.
-
-
-
Technically , audio doesn't have "frame duration", but I guess you mean variable sample rate ? I remember some posts about WMA variable sample rates
I guess a better way of saying it is "VFR" refers to video only, not audio. The timecodes govern frame display time for the video, not audio playback .Last edited by poisondeathray; 8th Jun 2013 at 15:36.
-
But, strangely, why audio and video have different timecodes? My guess are they run at different speed
Sorry about that: the audio is VBR
Wait, wait. Why audio's timecode had more frames defined that its video counterpart?
Video:
# timecodes format v1
Assume 29.970
1,35243,23.976
# timecodes format v1
Assume 29.970
1,68903,46.953 -
VBR audio is difficult to edit precisely and can often be problematic, this was mentioned earlier by Scott
These timecodes are for CFR video . Notice there are no changes , every frame is the same . VFR video would have entries representing where the frame rate changes - again, that's the VIDEO frame rate
Audio doesn't use v1 timecodes like this (it's only for video), the reason it's different is just assuming a different timebase (notice it's double the fps, but double the number of frames) -
Well, just keep in mind that a video frame is a rectangle between two video timestamps
, whereas an audio frame is a small set of audio samples.
Variable playback-rate happens when an evil audio format is either wrapped in an inadequate container (AVI, which doesn't have such thing as audio timestamps), OR is parsed in a way that ignores the audio timestamps.
http://forum.doom9.org/showthread.php?p=1513679#post1513679
eac3to. BUT 1) it's a command-line application and 2) you must know what you're trying to achieve.Last edited by El Heggunte; 9th Jun 2013 at 03:26.
-
Thanks for your advice.
Then if audio don't use timecodes, what will it use?
Oh yeah, audio frame? never heard that before. -
-
-
It's also known as pull-down (not to be confused with Telecine's Pull-down: 24->23.976 is a pull-down of 0.1% and 23.976/24->29.97/30 is a pull-down of 20%).
Scott
Similar Threads
-
How to tell if audio is HE-AAC/AAC+/SBR
By Akai-Shuichi in forum AudioReplies: 3Last Post: 19th May 2013, 16:25 -
Which audio setting should I selected in XMedia? AAC or AAC (Faac)
By Greg2041 in forum AudioReplies: 3Last Post: 1st May 2013, 07:17 -
MKV AAC GUI Converter with Nero AAC Codec
By prijatelj.v in forum AudioReplies: 4Last Post: 26th Mar 2012, 08:41 -
AAC 5.1 to AAC 2ch conversion problem
By MR 3 in forum AudioReplies: 6Last Post: 2nd Feb 2010, 22:44 -
Convert AAC 6ch to AAC 2ch w/ Dolby Pro Logic II Surround info
By SiegeX in forum AudioReplies: 5Last Post: 28th Dec 2009, 16:58