# Issues with transcoding to a MXF container

R

#### Raulo1985

##### Guest
Raulo1985 Asks: Issues with transcoding to a MXF container
I'm new here, so hi to all .

I'm new to FFmpeg too, and I'm trying to transcode a HEVC file to a mxf file and I'm having some issues. The original file is a rip I made from a Bluray HDR movie a while ago, its container is mkv, and I honestly didn't remember the codec I used and all that stuff, but Mediainfo is telling me that it's HEVC, UHD, main 10, level 5, RC. 2020, cbr, 4:2:0, 10 bit. The thing is that I want to make a trailer in Adobe Premiere Pro, which I've been using for a while and now I'm dealing with its 2020 version (which, to be honest, it's not so good because of random crashes). I intend to export an HDR video, even knowing that Premiere's internal monitors don't support REC. 2020 yet.

Since Premiere doesn't accept mkv files, and I want to lose the less amount of quality possible (hence, I don't want to make too many transcoding steps), I tried to take the proxy approach, but after trying many times I couldn't make them sync with the original footage (the proxy was always a couple of seconds late or early compared to the original file, which defeats its purpose for editing). The only ones that didn't have this issues where the ones made with DNxHD/DNxHR (I guess it could be related to them being cbr as the source files, while Prores is vbr. Idk, it's just a theory), but even though they are synced with the footage, I get stability issues with them as proxies (the program hangs when trying to manipulate them, even moving a clip or making a cut many times caused a crash).

Well, after all this, I decided to try to edit with a high rip of the original file, with a non long-OP format but with high quality, so I could export directly from it (hence, no proxies). The choice was between a Prores flavor, or a DNxHR flavor, and I decided to go for DNxHR because, idk, I've always preferred cbr for streaming and quality purposes. File size is not an issue for me, and I have a beast of a PC to handle them. Since I want to retain the most quality from the original, I used FFmpeg to transcode to a DNxHR RGB 444 10 bit file into a mxf container (which I've read it's better than MOV for editing purposes) from the original mkv file, but after trying many times I read that on the audio side the mxf container only accepts pcm audio, and my mkv file has two streams, both DTS 5.1. Apparently that's why my FFmpeg command worked for the video part, but always gave an error on the audio part. This was my initial command:

Code:
ffmpeg -i 1.mkv -map 0:0 -c:v dnxhd -profile:v dnxhr_444 -pix_fmt yuv444p10le -c:a \
-map 0:2 aac -b:a 640k 1.mxf

(audio stream 2 is the one I need, hence the 0:2. I need a single file for editing, with only one language, which is the second stream).

Well, that command didn't work, and I realized that it worked only if I changed the extension of the output file to MOV, so it's a container limitation I guess.

Here's my problem: I could easily create a mxf file with the video as DNxHR 444 10 bits and the audio as uncompressed pcm in 6 channels (the source file is 5.1), with this command:

Code:
ffmpeg -i 1.mkv -map 0:0 -c:v dnxhd -profile:v dnxhr_444 -pix_fmt yuv444p10le -c:a copy 1.mxf

It sounded like the ideal command to me, because I want to retain the 5.1 audio, and just copying the stream sounds like a good idea to me. Ffmpeg did its job, but when I imported the file to Adobe Premiere Pro, I could see that the audio couldn't be placed in a 5.1 track, but in 6 individual mono tracks. I could use this, but it's really annoying having to edit with 6 separated tracks for every single cut or clip. In other words, I wanted to edit with a DNxHR 444 10 bits and 5.1 audio with their tracks being recognized by Premiere as a true 5.1 audio, and showed as only one 5.1 track. If I rip the original mkv movie to, let's say, h.264, it creates a 5.1 audio track without issues, but editing in h.264 is not ideal at all.

The question is simple. What would you do? I'm still trying to do this with DNxHR 444 10 bits, but I'm starting to assume that I won't be able to incorporate the audio inside a mxf file without it being separated into individual pcm tracks.

Ideas that I had, and wanted to know your opinion, or if you have a better idea:

• Create a DNxHR 444 10 bits only with the video stream, no audio. Create a m4u file for the audio stream using aac or ac3 as codec, with -channel_layout 63 command. That way, I guess I'm going to be able to import the video file, the audio file, and link them inside Premiere. The editing, color grading and exporting would be done directly from those files, not the originals. Not ideal at all, but could be an idea at least.

• Use ffmpeg to create the master file with DNxHR 444 10 bits and copy the audio stream or transcode it with aac or ac3, but to a MOV container, which seems to support those audio formats. Could be an option, I've not tried it yet to see if the audio is recognized as a single 5.1 track inside Premiere.

• Give up on DNxHR, and use a Prores flavor. I've read that it's not the best format to encode when working on a PC (I'm not a Mac guy), and that because of it being vbr, sometimes the dark areas could suffer some quality loss (remember that I want to export in HDR). The original footage is cbr too.

• Edit with the separated six tracks. I really want to avoid this.

• Somehow go with the proxy route, but like I said, the sync problem is always present unless I use DNxHD/DNxHR, and when using them I see the 6 separated tracks, which is one of the things I want to avoid. I don't know how to go with this route.

Any ideas? This is my first hdr project and I'm having this elemental issues. What would you do? Thanks in advance.

PD: I used the last version of FFmpeg , and have an AMD 2990WX cpu, with 64 GB ram, a Nvidia GTX 1070 card, Windows 10 with the latest drivers and latest version of K-Lite codec pack. Using Adobe Premiere Pro 2020, and sometimes Adobe Media Encoder 2020. Adobe Premiere is optimized for memory use, not performance. Sadly, I still have a sdr monitor for the meanwhile.

UPDATE: A friend of mine, after telling him about the issues I'm having, said to me that I should stop worrying about the container, so his suggestion was to use FFmpeg to transcode the original mkv file (h.264 main 10, level 5, REC. 2020, cbr, 4:2:0, 10 bits) to a mov container, with DNxHR 444 10 bits and AC3 as codecs (or just copy the original audio stream), because for this purpose having the master file in mxf or mov container is not going to make a difference in quality or performance. Is that so? I'm still learning all I can but I've read more than once that mov should not be used as often, as it's an old type of container with certain limitations (I don't know what they are. I still have a lot of reading to do, but I've read that mxf is a better container in other forums too). If that's a good idea, the command would be the following (please correct me if I'm wrong):

ffmpeg -i 1.mkv -map 0:0 -c:v dnxhd -profile:v dnxhr_444 -pix_fmt yuv444p10le -c:a aac -b:a 640k -map 0:2 1.mov

Would you do that? Would it work if I just copy the audio stream (in that case, after -c:a I would just add "copy -map 0:2 1.mov")?

IN SUMMARY:

My main goal with all of this is having a non long-GOP file with the highest quality for editing, color correcting and exporting directly from it, preserving all the hdr data, and keeping the audio as 5.1 that can be recognized by Premiere Pro as a single 5.1 track and not six individual tracks. I was going for DNxHR 444 10 bit (cbr as my original file), but can't figure out the audio issue with a mxf container, and I could transcode to a mov container without problems. I'd like to know if there's some catch with using a mov container instead of mxf, and also I would like to know what would you do in my situation (and if there's an extra idea about how to use proxies with my original file without having sync issues, please let me know).

Thanks again.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

#### How to perform feature engineering on columns with multiple categories?

Prateek Coder Asks: How to perform feature engineering on columns with multiple categories?
I want to perform feature engineering on a data that mostly contains textual data and lot of columns with multiple categories like Supervisor, location code, employee class, business unit, job title, etc. What should be the best approach to do this? I have binary encoded the column with 2-3 categories or performed one hot encoding, but these columns contains different categories from 8 to 150. Different location will play major role in prediction, so will the employee class or business unit etc and I believe they will be very important for my model.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

#### [Solved] Create Buffer but keep original Attribute table

J.Beer Asks: Create Buffer but keep original Attribute table
I want to create a buffer around a number of features. It is important for me to keep the attributes of the features in the new buffer.shp layer. When I try to write a new VectorLayer with a QgsVectorFileWriter, I do get the buffered polygons and also the fields of the original layer get copied over, however the attribute table stays empty.

How can I copy over the attributes of the original layer to the buffer layer?

As you can see I already tried to load the attributes using the . attributes() method on the QgsFeature object and setting the attributes. However I feel I am missing something here.

Code:
for f in feats:
attributes = f.attributes()
f.setAttributes(attributes)

See full code below:

Code:
path = '/Volumes/VAW_ETH-Z/M.Thesis/data/geospatial/'

sgi_filtered = QgsVectorLayer(path + 'sgi_filtered.shp')

## Create buffer around filtered sgi
outFn = path + 'gl_buffer3.shp'
bufferDist = 50 # in map units

fields = sgi_filtered.fields()
feats = sgi_filtered.getFeatures()

writer = QgsVectorFileWriter(
outFn,
'utf-8',
fields,
QgsWkbTypes.Polygon,
sgi_filtered.sourceCrs(), # loads the reference system of the source feature
'ESRI Shapefile')

for f in feats:
attributes = f.attributes()
f.setAttributes(attributes)
geom = f.geometry()
buff = geom.buffer(bufferDist, 5)
f.setGeometry(buff)

Screenshot of the Attribute Table below (it shows the fields but no attributes):

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.

#### [Solved] Saving a Project Folder as a template (QGIS 3.28)

• Ben Sear
• Geography
• Replies: 0
Ben Sear Asks: Saving a Project Folder as a template (QGIS 3.28)
I am looking to create a template for easy layout integration for new QGIS project files, but when saving the project file to a template using save to > template, the file does not appear in the project templates as a template file, but just a new project file. I read that you need to restart GIS once you saved a project file as a template but restarting does not change the project file to being a template. Has anyone experienced saving template before and have any suggestions? Thank you.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.

#### Method of cooling a gas without liquid evaporation for Sci-fi novel

• user2765977
• Chemistry
• Replies: 0
user2765977 Asks: Method of cooling a gas without liquid evaporation for Sci-fi novel
sorry for the amateur question here.

I know little about science, but regardless am writing a fictional amateur novel that deals with a lot of chemistry stuff, especially gasses.

My protagonist needs a clever method of cooling a gas. He has access to several gasses (CO2, O2, H2, nitrogen) in varying temperatures (70c and up). Unfortunately no water (at least not more than a few bottles). The atmosphere he is working under (planet atmosphere) is in the range of 150c and at a pressure of roughly 150kpa in the novel.

He also has access to sci-fi style manufacturing machines that can simply 'make' parts, like pipes, valves, pumps, that sort of thing.

I am looking for a clever way or really any way at all, that he can use to cool down some O2 to at least under 40c in such a situation.

My amateur reading online suggests the main way, is via liquid evaporation, but I doubt that would work in the above scenario easily.

Does anybody have any ideas? Is this even possible?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

#### Is there a "fundamental problem of thermodynamics"?

• agaminon
• Physics
• Replies: 0
agaminon Asks: Is there a "fundamental problem of thermodynamics"?
The "fundamental problem of mechanics" can be boiled down to finding and solving the equation of motion of a system. Similar statements can be said for quantum mechanics for the Schrödinger equation and for electrodynamics and Maxwell's equations, etc. But is there such a thing for thermodynamics? Is there a formulation that allows for this kind of perspective?

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

#### What does this vertical line notation mean?

• Lambda
• Physics
• Replies: 0
Lambda Asks: What does this vertical line notation mean?
Here is the definition of the Noether momentum in my script.

$$I = \left.\frac{\partial L}{\partial \dot{x}} \frac{d x}{d \alpha} \right|_{\alpha=0} = \frac{\partial L}{\partial \dot{x}} = m \dot{x} = p_x.$$ But I don't understand exactly what this vertical line with $\alpha=0$ means, I would have interpreted it as $\frac{dx}{d0}$ now.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.

#### Does diffusion of a spring depend on the spring’s equilibrium length?

• Robert S. Pierre
• Physics
• Replies: 0
Robert S. Pierre Asks: Does diffusion of a spring depend on the spring’s equilibrium length?
Say we perform a random walk on $\mathbb{Z}$ with two equal particles that are connected by a spring with spring constant $K$ and equilibrium length $a$, where at each time step each particle has probability $\frac{1}{2}$ of making a step $\pm1$. However, at each step a random number $q\in[0,1]$ is sampled in order to refuse the move if $$q\geq\exp\left(\Delta E\right),$$ where $\Delta E$ is the difference in elastic energy between the two time steps.

Does the diffusion coefficient depend on the equilibrium length $a$?

I know that the diffusion is independent of the spring constant $K$, so we find the same diffusion coefficient for all $K$, namely that of two independent particles. I assume the same holds for the equilibrium length, but is this true and how can I see this?
And furthermore, what role does the initial extension of the spring play? Say the initial length of the spring $x_0$ is not equal to $a$, then the whole system will need a while to equilibrize, as opposed to when we start with $x_0=a$.

SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your thoughts here to help others.