Sample below shows basic conversion video file from mkv to mp4 format: string output Path.Combine(Path.GetTempPath(), Guid.NewGuid() + '.mp4') var snippet (Resources. User can manipulate audio, video and subtitle through this class. That is, they have the same height, width, pixel formats, codecs, etc. is the main class to handle FFmpeg conversions. Stream #0:0: Video: h264 (Main) ( / 0x001B), yuv420p(progressive), 1920x1080, 30 fps, 30 tbr, 90k tbn, 60 tbc You can concatenate these files using the concat demuxer (documentation) easily if their properties match. \ts\01583-1329536.tsįfprobe version N-94664-g0821bc4eee Copyright (c) 2007-2019 the FFmpeg developersĬonfiguration: -enable-gpl -enable-version3 -enable-sdl2 -enable-fontconfig -enable-gnutls -enable-iconv -enable-libass -enable-libdav1d -enable-libbluray -enable-libfreetype -enable-libmp3lame -enable-libopencore-amrnb -enable-libopencore-amrwb -enable-libopenjpeg -enable-libopus -enable-libshine -enable-libsnappy -enable-libsoxr -enable-libtheora -enable-libtwolame -enable-libvpx -enable-libwavpack -enable-libwebp -enable-libx264 -enable-libx265 -enable-libxml2 -enable-libzimg -enable-lzma -enable-zlib -enable-gmp -enable-libvidstab -enable-libvorbis -enable-libvo-amrwbenc -enable-libmysofa -enable-libspeex -enable-libxvid -enable-libaom -enable-libmfx -enable-amf -enable-ffnvcodec -enable-cuvid -enable-d3d11va -enable-nvenc -enable-nvdec -enable-dxva2 -enable-avisynth -enable-libopenmpt The full result of the ffprobe for a single file is down bellow.
How to correctly concat files like these? I believe that the problem is in different duration of audio and video streams in all ts files. I've tried different hostings with same results. When I upload the output file to a video-hosting after it's processing the audio became intermittent. But I noticed that all these programs play the video at an increased speed: the seek time increases a little bit faster than the real time. I've tried the following command: ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4Īnd at first glance it looks fine: the output video works fine in MPC, VLC and Google Chrome. I'm trying to concat hundreds of short *.ts pieces into a single mp4 video.