Hello everyone, i'm newbie here, and i'm requesting for some help
I have some FLAC files, which has the total duration is 41:59 and when i was trying to concatenate these files with ffmpeg:
And this is my command in CMD:file 1.flac
file 2.flac
file 3.flac
file 4.flac
file 5.flac
file 6.flac
file 7.flac
file 8.flac
file 9.flac
file 10.flac
As you can see, the output file just has the duration 00:41:51.99, but the actual file only has duration 5:11, which is the same duration of 1st file in the list.txtCode:ffmpeg -f concat -i D:\exported\list.txt -c copy out.flac ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers * built with gcc 10.2.0 (Rev6, Built by MSYS2 project) * configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint * libavutil* * * 56. 70.100 / 56. 70.100 * libavcodec* ** 58.134.100 / 58.134.100 * libavformat* * 58. 76.100 / 58. 76.100 * libavdevice* * 58. 13.100 / 58. 13.100 * libavfilter* ** 7.110.100 /* 7.110.100 * libswscale* * * 5.* 9.100 /* 5.* 9.100 * libswresample** 3.* 9.100 /* 3.* 9.100 * libpostproc* * 55.* 9.100 / 55.* 9.100 Input #0, concat, from 'D:\exported\list.txt': * Duration: N/A, start: 0.000000, bitrate: N/A * Stream #0:0: Audio: flac, 44100 Hz, stereo, s16 Output #0, flac, to 'out.flac': * Metadata: * * encoder* * * ** : Lavf58.76.100 * Stream #0:0: Audio: flac, 44100 Hz, stereo, s16 Stream mapping: * Stream #0:0 -> #0:0 (copy) Press [q] to stop, [?] for help size=* 290444kB time=00:41:51.99 bitrate= 947.2kbits/s speed= 544x video:0kB audio:290436kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.002787%
I don't know how this can happen, but if you know it, please tell me and it might help a lot!
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 5 of 5
Thread
-
-
This is the concat demuxer syntax in list.txt:
file '/path/to/file1.wav'
file '/path/to/file2.wav'
file '/path/to/file3.wav' -
The above user didn't forget to put the path in; if you simply refer to the file name then it looks in the current working directory.
And if they were to use the full path, the error would be the same.
I've made 2 files; half_sec.flac and 1_sec.flac. half_sec is 0.5 second of silence and 1_sec is 1.0 s of silence.
mylist.txt:
Code:file '/path/to/half_sec.flac' file '/path/to/1_sec.flac'
ffprobe output.flac
Code:Input #0, flac, from 'output.flac': Metadata: encoder : Lavf60.5.100 Duration: 00:00:00.50, start: 0.000000, bitrate: 145 kb/s Stream #0:0: Audio: flac, 44100 Hz, stereo, s16
The second file is not concatenated.
This is from ffmpeg version N-110642-g6b2ae90411
Also reproduced in the most recent snapshot version, N-110692-gc4b3e882f8Last edited by slycordinator; 21st May 2023 at 23:50. Reason: adding in version info
-
If you use the stream copy, the file produced will be of the wrong duration.
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.flac
or
ffmpeg -f concat -safe 0 -i mylist.txt -c:a copy output.flac
output.flac will have the duration/contents of the first file in mylist.txt
But if you re-encode it as flac, it'll have the correct duration/contents.
ffmpeg -f concat -safe 0 -i mylist.txt -c:a flac output.flac
output.flac will have the duration/contents of all of the files concatenated together.Last edited by slycordinator; 22nd May 2023 at 00:43. Reason: formatting
Similar Threads
-
problem on concatenate files ffmpeg
By lomero in forum EditingReplies: 0Last Post: 6th May 2021, 11:37 -
Can't seem to remux .TS files with ffmpeg
By CursedLemon in forum Video ConversionReplies: 4Last Post: 6th Oct 2019, 22:58 -
[FFMPEG] How to merge flac and image to mkv (Wrong Color)
By Anonymous20 in forum Video ConversionReplies: 2Last Post: 7th Feb 2019, 09:34 -
24 Bits 5.1 FLAC Lower kHz than 16 Bits Stereo FLAC?
By draig-llofrudd in forum AudioReplies: 5Last Post: 17th Dec 2016, 08:03 -
(Help Needed with ffmpeg) how do i batch merge audio files to video files
By wander799 in forum Newbie / General discussionsReplies: 5Last Post: 20th Nov 2016, 14:40