Opened 7 years ago

Closed 4 years ago

#10848 closed Patch - Feature (Fixed)

[PATCH] OSD: Add a graphical display of audio level to cut list editor

Reported by: Lawrence Rust <lvr@…> Owned by: Jim Stichnoth
Priority: minor Milestone: 0.28
Component: MythTV - General Version: 0.25-fixes
Severity: medium Keywords: OSD audio graph
Cc: Karl Egly Ticket locked: no

Description

When using the cut list editor to remove ads etc it's difficult to place the cut precisely when the program is faded in or out. In these cases it's common to cut the dialogue or retain voice-overs. It's also impossible to create a cut list for DVB radio recordings.

This patch adds a visual graph of the audio level +/-0.5 frame around the current paused frame.

NB this patch can also be applied to git master.

Attachments (1)

0001-OSD-Add-a-graphical-display-of-audio-level-to-cut-li.patch (21.2 KB) - added by Lawrence Rust <lvr@…> 7 years ago.

Download all attachments as: .zip

Change History (11)

Changed 7 years ago by Lawrence Rust <lvr@…>

comment:1 Changed 7 years ago by Jim Stichnoth

Owner: set to Jim Stichnoth
Status: newaccepted

comment:2 Changed 7 years ago by beirdo

Status: acceptedinfoneeded

Please post patches against master. We do not put new features into the -fixes branches by default policy.

comment:3 Changed 7 years ago by Lawrence Rust <lvr@…>

The patch supplied applies cleanly to both master and fixes/0.25

comment:4 Changed 7 years ago by Jim Stichnoth

Lawrence,

As far as I can tell, the visualizer data is pretty much random for AC3 audio (which is true for almost all of my recordings). Have you had any success with AC3?

comment:5 Changed 7 years ago by Lawrence Rust <lvr@…>

No, not tried AC3. All my recordings are either mpeg2/mp3 with some mp4 if transcoded. The audio output device is to ALSA analog.

I had assumed that the audio data would be decoded 16-bit mono/stereo/multi-channel Am I to assume that this isn't the case. Does it matter if the output is digital? That's a bit of a pain if all the visualisers have to do their own decoding. Appears that MythMusic's visualisers assume 8/16, 1/2 channel PCM too.

Do you have a small sample that I could try? Coincidentally I wrote a script last week to import a clip into the recordings database.

comment:6 Changed 7 years ago by Lawrence Rust <lvr@…>

Further investigation indicates that the audio data are correctly formatted with AC3 - I used an mp4 video with AC3 audio produced with ffmpeg. However, it appears that the timecodes for audio are unreliable such that when you seek back and forth you get different audio data for the same location. Maybe this is a consequence of a bad or missing posmap?

I couldn't get mythcommflag to rebuild the posmap for my mp4 video. It appears that avformatdecoder doesn't understand framing in H264 NAL streams, only annexe B.

comment:7 in reply to:  5 Changed 7 years ago by Jim Stichnoth

Status: infoneededassigned

Replying to Lawrence Rust <lvr@…>:

No, not tried AC3. All my recordings are either mpeg2/mp3 with some mp4 if transcoded. The audio output device is to ALSA analog.

That was a good clue. When setting the output to be stereo (via Audio Settings), 2-channel AC3 recordings produce plausible visualizations, at least when using the Spectrum visualizer. There are still some oddities to sort through -- it often appears that only the left half of the spectrum is active (could this be two-channel mono?), and some recordings show very low levels on the Spectrum visualizer relative to the volume on the TV.

That said, I also noticed that when you enable the Spectrum visualizer and enter the cutlist editor, the visualizer conveniently continues to be displayed. This means that the patch's functionality is already more or less present, though not in themeable form.

comment:8 Changed 7 years ago by Lawrence Rust <lvr@…>

Maybe the audio channel format for multi-channel AC3 isn't being passed to the visualiser then. The patch accounts for the number of announced channels but processes only the 1st two. It would be straightforward to sum all channels.

It's nice to have confirmation of function from the spectrum visualiser but it's not as informative for real editing.

comment:9 Changed 6 years ago by Karl Egly

Cc: Karl Egly added

comment:10 Changed 4 years ago by Karl Egly

Milestone: unknown0.28
Resolution: Fixed
Status: assignedclosed

This appears to have been committed as [d40411ee9887057d08d408a43539ab4c848d7fe3] in July 2014. Closing as fixed in master.

Note: See TracTickets for help on using tickets.