<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вт, 17 сент. 2024 г., 15:12 Stefan de Konink via Cin <<a href="mailto:cin@lists.cinelerra-gg.org">cin@lists.cinelerra-gg.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There are quite some topics online mentioning the when MTS files <br>
(exceeding 2GB) are naively added to a timeline. The problem that then <br>
appears is that the audio is typically "shorter" than the video, and it <br>
does not appear in the interface. Cinelerra will even shift the audio <br>
track under the previous track.<br>
<br>
It is mentioned that Adobe Premiere is able to parse an AVCHD structure, <br>
including the ability to use meta information such as timecode, which is <br>
not available from MTS files directly.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">there seems to be bluray demuxer in ffmpeg, not sure about timecode but apparently it can use mpls playlists? </div><div dir="auto"><br></div><div dir="auto">libavformat/bluray.c in ffmpeg source tree.<br></div><div dir="auto"><br></div><div dir="auto">you might need to enable it in ffmpeg with libbluray headers present.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Other workarounds that are mentioned to first join the MTS files. FFmpeg <br>
has the option concat demuxer and concat protocol. But it pulls another <br>
surprise...<br>
<br>
<br>
ffmpeg -i "concat:00152.MTS|00153.MTS|00154.MTS" -vcodec copy -acodec <br>
copy test.ts<br>
ffmpeg version n7.0.1 Copyright (c) 2000-2024 the FFmpeg developers<br>
built with gcc 14.1.1 (GCC) 20240522<br>
configuration: --prefix=/usr --disable-debug --disable-static <br>
--disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm <br>
--enable-lto --enable-fontconfig --enable-frei0r --enable-gmp <br>
--enable-gpl --enable-ladspa --enable-libaom --enable-libass <br>
--enable-libbluray --enable-libbs2b --enable-libdav1d --enable-libdrm <br>
--enable-libdvdnav --enable-libdvdread --enable-libfreetype <br>
--enable-libfribidi --enable-libgsm --enable-libharfbuzz <br>
--enable-libiec61883 --enable-libjack --enable-libjxl <br>
--enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb <br>
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt <br>
--enable-libopus --enable-libplacebo --enable-libpulse --enable-librav1e <br>
--enable-librsvg --enable-librubberband --enable-libsnappy <br>
--enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh <br>
--enable-libsvtav1 --enable-libtheora --enable-libv4l2 <br>
--enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl <br>
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 <br>
--enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg <br>
--enable-mbedtls --enable-nvdec --enable-nvenc --enable-opencl <br>
--enable-opengl --enable-shared --enable-vapoursynth --enable-version3 <br>
--enable-vulkan<br>
libavutil 59. 8.100 / 59. 8.100<br>
libavcodec 61. 3.100 / 61. 3.100<br>
libavformat 61. 1.100 / 61. 1.100<br>
libavdevice 61. 1.100 / 61. 1.100<br>
libavfilter 10. 1.100 / 10. 1.100<br>
libswscale 8. 1.100 / 8. 1.100<br>
libswresample 5. 1.100 / 5. 1.100<br>
libpostproc 58. 1.100 / 58. 1.100<br>
Input #0, mpegts, from 'concat:00152.MTS|00153.MTS|00154.MTS':<br>
Duration: 00:25:04.36, start: 1.040000, bitrate: 24022 kb/s<br>
Program 1<br>
Stream #0:0[0x1011]: Video: h264 (High) (HDMV / 0x564D4448), <br>
yuv420p(top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn<br>
Stream #0:1[0x1100]: Audio: pcm_bluray (HDMV / 0x564D4448), 48000 Hz, <br>
stereo, s16, 1536 kb/s<br>
Stream #0:2[0x1200]: Subtitle: hdmv_pgs_subtitle (pgssub) <br>
([144][0][0][0] / 0x0090), 1920x1080<br>
File 'test.ts' already exists. Overwrite? [y/N] y<br>
Stream mapping:<br>
Stream #0:0 -> #0:0 (copy)<br>
Stream #0:1 -> #0:1 (copy)<br>
Output #0, mpegts, to 'test.ts':<br>
Metadata:<br>
encoder : Lavf61.1.100<br>
Stream #0:0: Video: h264 (High) (HDMV / 0x564D4448), yuv420p(top <br>
first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn<br>
Stream #0:1: Audio: pcm_bluray (HDMV / 0x564D4448), 48000 Hz, stereo, <br>
s16, 1536 kb/s<br>
Press [q] to stop, [?] for help<br>
[mpegts @ 0x600ed54cf540] Stream 1, codec pcm_bluray, is muxed as a <br>
private data stream and may not be recognized upon reading.<br>
<br>
This results in a video file cinelerra (and others) cannot read.<br>
<br>
Instead if we would say do it in pcm_sb16le we would be able to show <br>
that the MTS file does contain the audio and FFmpeg is able to read it. <br>
I have attached a screenshot showing what happens.<br>
<br>
I wonder: could we in Cinelerra implement something that would not open <br>
a file as single file or EDL, but instead a concat set of files?<br>
<br>
Something in the drop down: "Create a single new resource only". That <br>
single resource should be opened via the concat protocol, and then be <br>
able as single instance. An EDL, but then at protocol level.<br>
<br>
I think this would make sense for many recordings that are split due to <br>
filesystem limits, but even for image sequences, if they could be <br>
directly opened and edited as if they were single files.<br>
<br>
-- <br>
Stefan<br>
-- <br>
Cin mailing list<br>
<a href="mailto:Cin@lists.cinelerra-gg.org" target="_blank" rel="noreferrer">Cin@lists.cinelerra-gg.org</a><br>
<a href="https://lists.cinelerra-gg.org/mailman/listinfo/cin" rel="noreferrer noreferrer" target="_blank">https://lists.cinelerra-gg.org/mailman/listinfo/cin</a><br>
</blockquote></div></div></div>