this is the following ffmpeg command line i use for encoding audio
but the output file is coping the original file audio stream size.Code:-c:a ac3 -b:a 640K
Original Mediainfo
Code:Audio ID : 2 Format : DTS XLL Format/Info : Digital Theater Systems Commercial name : DTS-HD Master Audio Codec ID : A_DTS Duration : 57 min 35 s Bit rate mode : Variable Bit rate : 1 753 kb/s Channel(s) : 6 channels Channel layout : C L R Ls Rs LFE Sampling rate : 48.0 kHz Frame rate : 93.750 FPS (512 SPF) Bit depth : 16 bits Compression mode : Lossless Stream size : 722 MiB (6%) Title : DTS-HD MA 5.1 Language : English Default : Yes Forced : No
Encoded media info
is there anyway i can get the correct stream size for the encoded file?Code:Audio ID : 2 Format : AC-3 Format/Info : Audio Coding 3 Commercial name : Dolby Digital Codec ID : A_AC3 Duration : 57 min 35 s Bit rate mode : Constant Bit rate : 640 kb/s Channel(s) : 6 channels Channel layout : L R C LFE Ls Rs Sampling rate : 48.0 kHz Frame rate : 31.250 FPS (1536 SPF) Bit depth : 16 bits Compression mode : Lossy Stream size : 722 MiB (39%) Title : DTS-HD MA 5.1 Writing library : Lavc58.65.103 ac3 Language : English Service kind : Complete Main Default : Yes Forced : No
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 13 of 13
Thread
-
Last edited by iKron; 14th May 2022 at 10:23.
-
The size of the encoded Ac3 IS 722Mb. (real info, not copied).
You can test this encoding with 320k instead of 640k. This will give you a smaller output. -
@ProWo, i tried 128K, it's still same.
Code:Audio ID : 2 Format : AC-3 Format/Info : Audio Coding 3 Commercial name : Dolby Digital Codec ID : A_AC3 Duration : 57 min 35 s Bit rate mode : Constant Bit rate : 128 kb/s Channel(s) : 6 channels Channel layout : L R C LFE Ls Rs Sampling rate : 48.0 kHz Frame rate : 31.250 FPS (1536 SPF) Bit depth : 32 bits Compression mode : Lossy Stream size : 722 MiB (42%) Title : DTS-HD MA 5.1 Writing library : Lavc59.18.100 ac3 Language : English Service kind : Complete Main Default : Yes Forced : No
@jagabo after demux 640K, ac3 file size gave 263mb. is there anyway we can set the proper stream size? mkvmerge or run another ffmpeg command line? -
Mux the demux'd AC3 file with the video stream.
It looks to me like ffmpeg is copying the metadata (size, language, etc.) of the original DTS track and MediaInfo is reading that, not calculating the actual size of the AC3 stream. -
@ProWO
Code:ffmpeg -i file.mkv -map 0 -c:v copy -c:a ac3 -b:a 640K -c:s copy file_out.mkv
@jagabo i actually have batch file like 100+ files. one thing i can do find batch script to extract AC3 file, then remove the AC3 file from the mkv and next merge the AC3 file with themkv file. but it will take some time may be 4~5 min to do the process for each file. do i have any other option?
one source file audio "Bit rate mode : Variable" shows like this and there is no stream size info. when i encode the audio file it gave the correct stream size.
is there anyway we can remove stream size info before encode, may be ffmpeg will give correct stream size info after encode?
`-map_metadata -1` i found this command but it remove all the meta tag from the mkv file. like audio, subtile language info etc.Last edited by iKron; 14th May 2022 at 13:19.
-
it's not perfect but this one will fix the issue:
Code:mkvpropedit file.mkv --add-track-statistics-tags
-
i tried latest one, still same issue. well mkvpropedit does not take much time, it's almost instant.
Similar Threads
-
Find the correct audio stream with FFmpeg
By FFtvuser in forum Newbie / General discussionsReplies: 5Last Post: 1st Dec 2021, 03:40 -
AVS2DVD ffmpeg encoding incorrect SAR.
By SF01 in forum Authoring (DVD)Replies: 95Last Post: 28th Aug 2020, 14:35 -
Reduce File Size fast and quality ok for stream
By tomasrage in forum Video ConversionReplies: 5Last Post: 6th Dec 2019, 17:23 -
ffmpeg, Interlace, Frame Rate and File Size
By chris319 in forum Video ConversionReplies: 4Last Post: 15th Jun 2018, 02:08 -
auto-select audio/subtitle stream when processing a video via ffmpeg
By mrjayviper in forum Video ConversionReplies: 5Last Post: 17th Nov 2017, 17:34