Transcoding and audio normalization

Events happening in the community are now at Drupal community events on www.drupal.org.
westis's picture

I'm trying to setup a workflow with automatic transcoding of ingested files to SD and HD with ffmpeg + audio normalization according to EBU R128 (loudness normalization).

I'm starting this discussion for others to chip in, if you have suggetions for how to best do this or if you are looking to do the same.

Ideally this would end up with something similar to TelVue Connect, where users can submit shows online and they are automatically transcoded and normalized. But in the first step I'm just thinking of setting up a Linux computer with ffmpeg for transcoding and r128gain (or perhaps even better FreeLCS) for loudness normalization.

My main challenge is how to setup ffmpeg to transcode to the best output. We basically use two formats: SD PAL (mpeg-2 576i) and H.264/AVC/mpeg-4 part 10 (720p/50). Does anyone have suggestions for ffmpeg commands to transcode to these broadcast formats?

The workflow would then be to copy a file to a watch folder that checks the video format, transcodes it if necessary and moves the file to the audio normalization watch folder. There it is loudness normalized and finally moved to the output folder, ready for broadcast and in a format that the playout can play.

Comments

we are currently planning a

hatsch's picture

we are currently planning a relaunch of our drupal 6 community tv website that allows you uploading videos and then does processing with the media mover module.
in that process we are also looking for ways to improve the transcoding workflow.

we've gone away from mpeg2 some time ago for our broadcast files and use h264 now with aac audio. the only settings we apply are -crf 22 and -preset slow and the quality is quite impressiv. our playout is still SD PAL but thats just a consumer setting for our playout server melted ( which is open source by the way http://mltframework.org ) so no more downscaling of HD files to SD.
We also don't do the transcoding with ffmpeg directly but with melt from the MLT Framework, because it allows applying of filters and overlays. one of the filters we use is the SOX analysis which allows basic normalisation.

for the relaunch i think about switching from melt (ffmpeg) + x264 to the Openbroadcast encoder ( http://www.ob-encoder.com/ ) which promises standard compilant files. there has been some discussion on IRC also with guys from frikanalen how one can use OBE for scenarios where you have different input formats, codecs and resolutions.

other things we consider for managing the transcoding workflow is Transcodem ( http://transcodem.com/ ) because it is very nice to have a clean way of distributing the transcoding jobs to different machines. There is even a placeholder on d.o for drupal integration ( http://drupal.org/project/transcoding )

and the folks from MBC Playout ( https://github.com/inaes-tic/mbc-playout ) are utilizing GSTFS ( Gstreamer Fuse Filesystem https://github.com/inaes-tic/gstfs ) for transcoding.

and just to have it mentioned in that post. i think the best case scenario would be something like transloadit ( https://transloadit.com/ ) where the upload time which usually takes very long for video files is already used for transcoding. as we like to host everything ourselves this is not an option at the moment, but with nodejs this should be doeable in the long term...

so there is no definitly plan yet, do i am very interested in how others do it, or intend to do it.

Excellent! Thanks a lot

westis's picture

Excellent! Thanks a lot hatsch. What channel are you working for?

I'll check out those solutions you mention. And I should get in touch again with Frikanalen. We had a dialogue a couple of years ago and if we could find a common solution for automatic transcoding and normalization, combined with uploading through website (with Drupal 7 this would probably use Media Derivatives somehow.)

If we could get a solution like this into the Community Media project for Drupal 7, that would be wonderful.

How come you are still using Drupal 6?

.

hatsch's picture

i am working for dorftv, a community tv station in linz/austria.

we are still on drupal 6, because it's not a trivial task to upgrade, the site has gotten rather complex over the years, i am utilizing the migrate module now to get content from the live site to the dev site, but even that part is far from done yet :(
and we do want to avoid certain mistakes for the new site, most important:

  • better uploading experience ( chunked for very large files, resumable?,.... but i should probably make a new post for that )
  • and a cleaner way of distributed encoding. we now use media_mover custom command, with scripts that SSH to the render node.

you should probably also consider coming to this years RMLL in brussels. there will be a complete day dedicated to open source in broadcast, and hopefully some stations get together for further colaboration :)

last year there was a talk from fhe FREELCS Project.
http://video.rmll.info/videos/freelcs-free-ebu-r128-loudness-correction-...
and as the EBU is organizing the broadcast tracks again, i expect more loudness controll talks.

and of course i would love to see some demoing of CM on a live site :)

Community Media

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: