Category Archives: Broadcasting

Broadcast technology related articles.

Trouble with Tria … playing with ffmpeg

We had an interesting problem this week. In one of our TV studios we have Ross Video’s Tria video server for playing clips and recording newscasts. Instructor who teaches TV production noticed that right audio channel was missing from exported mxf files when playing in VLC and editing in the Adobe Premiere Pro. My colleague contacted Ross Video, they were great, sent us a new updated firmware and we applied it. Exported the mxf file again and tested in VLC and our troubles of sidetracking began.

File that instructor was using is a static video of about 40 seconds in length. In the first 20 sec Jimi Hendrix is playing on the left channel, then in the last 20 sec Stevie Ray Vaughan is playing on the right.

Jimi on the left channel
Stevie on the right channel

When we first tested the exported mxf file in VLC, before the firmware upgrade, we could hear Jimi on the left only, but no Stevie on the right – silence. After the upgrade we could hear Jimi on both L and R, but again no Stevie at all! Ross Video was saying that files that we sent them (original jimi_left_stevie_right.clip and exported jimi_left_stevie_right.mxf) were OK. When we reimported mxf file into the Tria again, it was indeed OK playing from Tria. But it still wasn’t playing correctly in the VLC.

Problem was also seen before the firmware upgrade when the exported file from Tria was imported into the Adobe Premier Pro. Only left channel was there. After the Tria’s firmware upgrade, file was good in the Premiere Pro. So, instructor was happy, problem solved for him. But it still bothered me that VLC was doing it wrong.

In the mxf file that Tria exported VLC was seeing channel 1 (our left channel, Jimi) and channel 2 (our right channel, Stevie) as a separate mono audio streams. VLC can play only one track (stream) at a time, and by the default it’s Stream 1 – unless you start it from the command line as vlc --sout-all --sout #display , in which case you get both Jimi and Stevie on both L and R.

File originally exported from Tria

After some reading on FFMPEG and looking what others tried to do, found a post that was trying to solve similar problem. Below is my adaptation for our problem.

ffmpeg -i jimi_left_stevie_right.mxf \
-filter_complex "[a:0][a:1]amerge=inputs=2[ch1ch2]" \
-map 'v:0' \
-map '[ch1ch2]' \
-c:v copy \
-c:a pcm_s16le \
jimi_left_stevie_right_reordered.mxf

What’s happening here – video is being copied as-is, without transcoding. Two mono audio streams a:0 and a:1 are being merged as stereo and mapped into one stereo audio stream and re-encoded as pcm_s16le.

When processed like that, VLC plays it correctly and here’s what it sees.

File processed with ffmpeg

Notice that Stream 1 now has “Channels: Stereo”, while the original file exported from Tria had Streams 1 and 2 with “Channels: Mono” on both streams.

FFMPEG is a powerful tool with lots of options and I need to do a lots of reading to begin understanding most of them … I’ve got a work to do 🙂

Later … when imported in the Premiere Pro, both files look identical – Jimi on the left, Stevie on the right. Oh well … 🎸🤷‍♂️ … at least I learned how to manipulate audio tracks using ffmpeg.

Some HDTV numbers

Just thinking aloud. OK, 3D TV is dead. Nothing new here. It already died couple of times throughout the history of moving pictures. But, what about higher-than-high-definition? I was quickly crunching some numbers and thinking about display capabilities.

We all know that new iPad3 has that famous ‘retina’ display, with resolution of about 260 ppi (pixels per inch). So, technology is here. My current TV has 40″ diagonal and resolution of 1920 x 1080 (Full HD), which comes to about 55 ppi. If someone make ‘retina’ display of that size, that TV would be 9064 x 5098 pixels. This is just a calculated number, not a standard.

Let’s scale back to the next standard, just a little bit. Proposed display standard, called 8K or UHD (Ultra HD) have a resolution of 7680 x 4320 pixels. That’s four times horizontal and four times vertical resolution of Full HD. As we all know, HD bit rate is about 1.5 Gb/s. And for Ultra HD, or for a pleasure to have ‘retina’ display in my living room, we need ~24 Gb/s!!! Which means, we need heck of a good compression method to push all these bits through existing infrastructure.

My guess is that it won’t be a long wait. Anyone remember days when we thought that 56 kb/s was a maximum over telephone copper wires? Is there a limit for the copper? Or should I just picture myself pulling optical cables into the racks of our TV station? We’ll see.

Christmas tree, take 2

OK, here’s another take on drawing the Christmas tree on electronic screen – this time using “specially designed colour bars” 🙂 and here’s the result viewed on the vectorscope:

Christmas tree on the vectorscope

How’s the tree created? I was using Charles Poynton’s book “Digital Video and HDTV” (thanks, Charles!) and formula for calculating RGB colour from YCbCr. Here’s the formula, just to scare you off:

DON'T PANIC!

So, tree was plotted on the X-Y coordinate system, where Cb is on a X axis, and Cr is on a Y axis. Because it involves a lot of calculations, spreadsheet was used. After all, we live in a 21st century, right? Spreadsheet helped a lot with playing with Y values, to keep RGB between 0 and 255. Here’s the screenshot of the spreadsheet:

Finally, here’s the original picture that was converted to the HD video and fed to the Harris rasterizer (vectorscope, waveform monitor, etc) that you can see on the first picture:

Christmas tree colour bars

As you can see on the first picture, tree is little bit slanted towards RED. I still have to figure out why is that? Since I don’t have the equipment at home to adjust the bars, picture was created just by doing calculations and brought to the station for the first try. Well, I think it’s not bad for the first shot.

Here’s some more pics of my colleagues trying to get picture of the tree:

Eric, Doug, and Chris

Christmas tree on all screens

Some broadcast links for the summer enjoyment

Today was our second last day of the Intro to Broadcast Systems (or whatever was the name) course in the second semester of the Broadcast Technology program, here at SAIT Polytechnic (Calgary, Alberta, Canada, North America, planet Earth, Solar system, … did I went too far?). Main question was: what to do during the summer to start second year better prepared? Wayne’s answer was – read the stuff online. Here is my contribution of some interesting web sites that I found recently.

Wikipedia – Category:Broadcast Engineering has lots of links to broadcast related articles
Broadcast Dialogue
Broadcast Engineering – magazine
Broadcastpapers.com – online library of technical & business whitepapers in the broadcast industry
Charles Poynton web site (color, video technology, DSP)
Extron Electronics (diff. technology related articles)
DVD FAQ (interesting questions regarding DVD technology)

That’s just beginning. I will post more links here, and you can do it too, in the comments.
Good luck on the exams and enjoy the summer.

P.S. And of course, how can I forget this one: WABE