Export Audio in FLAC container

Hello folks.

I did make my files somewhat edit friendly with Handbrake. Did not use the “convert to edit friendly” option in Shotcut, because I could not convert FPS of the different sources. My edit friendly files have FLAC-Audio, because this seems to be the best for editing/seeking and is good quality-wise.

I am working with multi cameras and for the current Video project. I have 2 video tracks, one for Camera 1, and the other for Camera 2.
I need the Audio from Camera 1 on Video track 1(already made some cuttings to the Video clips of camera 1 on this track to have perfect sync).

Now I guess, the best workflow would be to export the Audio from the Current project/VideoTrack 1?
I would like to export to FLAC, but don’t see the Option in Shotcut. Only other formats. Surprising, because the best version to convert to edit friendly in Shotcut r

e-encodes with FLAC-Audio.

Any suggestions, or am I missing something?

Try disabling video in the codec tab.
image
Set format and codec to flac in the audio tab.
image

Export. Add flac as the file extension when the export dialogue comes up.

Well, that seems like a great suggestion.

Thank You!

I am facing a weird error. My content on the Timeline is approx. 25 minutes.
The exported FLAC file is thousands of hours - must me an encoder issue?

I used the Beta version for my test export. Exported a 4 second section of video from source. It worked fine.

Today exported a 4 min+/- video from timeline to flac and it worked as well.

Edit:
The flac exported from Shotcut plays fine in media players.
I opened the exported flac in Shotcut. The duration is wonky. The flac can be added to the playlist, it plays in the viewer. Cannot add it to a video or audio track on the timeline. Shotcut becomes unresponsive.
Tried opening a few flac music files. They all worked fine, could be added to the timeline.

It might be better to export audio to flac using Audacity.

Thank you.

Same issue as here. As far as I see it, Shotcut becomes unresponsive, if track is added to the timeline, because of the excessive duration.

Wanted to avoid an external program, because I already made cuts on the timeline. Using an external program would mean that I have to export a whole Video (time consuming).
Did for now export to wav.

I reproduce this. MediaInfo shows no Duration. ffprobe shows duration=N/A. Change the Format to matroska, and the problem is gone. Using ffmpeg to write flac as flac has no problem. So, this is a bug in MLT, which is low on the list of priorities. For me, the file size difference is about 5KB for a 30 second clip.

Thank You.

Where/how do I switch from MLT to Matroska? As far as I am aware, Matroska is the container? MLT seems to be another one? I can’t find anything about, not do I know anything about “MLT”. So here I am lost and would appreciate some input.

You can use one of the 2 lossless exports to export to mkv.
FFV1
HffYUV
image

Or you can use the default export. Change the format to matroska.

image
Set the audio codec to flac and disable video.

image

You will need to add mkv extension when exporting.

MLT is the framework used by Shotcut, not a format (https://github.com/mltframework).
So the problem with FLAC in Shotcut lies in this framework and not in ffmpeg.

@shotcut

Would a possible workaround/feature for this kind of thing and other situations where
very customised outputs/formats not be possible if a “raw” output from SC was available
to be piped/parsed to any encoder?

The simplified block diagram below illustrates what I mean.
As it stands, a user imports a media file into SC.
SC then makes use of ffmpeg (and it’s libs) to decode the media file and send the data
to SC to be edited, filters applied and so on.

Once done, the user selects encoding options and SC parses the data to ffmpeg and the final file is created/exported.

However, as you have said many times in the past, SC is not simply a frontend to ffmpeg.
I get that, but there are times when other encoders would be a better fit for a given format/wrapper.

This would also negate the need for a user to export from SC then use another external application to get to final format.
It would also negate the need for you to support any other encoders, you simply provide the option for SC to send to any required external executable and it would be the users responsibility to make sure they have set the proper flags, encoding options and so on.

An example of this would be AVCintra, where X264 is infinitely better than ffmpeg.
(Can ffmpeg even write AVCintra-100 files?).

Another example would be using the official (and free) flac encoder from xiph.org.

Hoping you give this some consideration as I think it would massively increase the versatility of SC.

08%20PM

MLT and FFmpeg has support for NDI, and I may add support for that to Shotcut. That is all I am willing to do in this direction. Maybe also other similar, open protocols later. However, this is low priority for me. Meanwhile, people who choose not to use Shotcut’s integrated encoder can export lossless.

Thank you @shotcut NDI would certainly be a welcome addition.
(I often use SDI output that SC supports and to have NDI as well would be a big bonus)

Interesting that you say that ffmpeg has NDI support, I know that several versions ago it did, but there was a massive fallout between Newtek and ffmpeg devs and subsequent precompiled versions of ffmpeg dropped NDI support.

Of course nothing stopping anyone compiling their own binary as the NDI SDK and libs are available.

Here is bug report thread, and it has been removed from the source tree (not just some parties’ builds).

Interesting read, how, if at all, will this affect future NDI support in SC?

You mentioned that the ffmpeg used with SC has NDI support, so thought I would have a look, can’t find it.

No mention of –enable-libndi_newtek --enable-nonfree or did I miss something?
Also looked for a libndi_newtek.dylib to no avail.

It is not enabled in our builds of MLT or FFmpeg. It would have to, but I am not going to for FFmpeg. I may still for MLT, possibly as a separate plugin, but not solid plans now. I think some users would still like it outside of sending to ffmpeg. There are other protocols, and today you can coax Shotcut to send high bitrate MPEG-2 or H.264 via mpegts over UDP. However, there is much more to making a proper alternate export session out of this with no obvious session protocol. I’m not willing to give this anymore attention at this time.

OK, that certainly explains why I could not find it.
I mistakenly interpreted your previous post as meaning it’s already enabled.

Did not know this, thank you , will certainly investigate this option further.

EDIT:

48%20PM

Very nice, opens up quite a few possibilities. :+1:

Fair enough.