Encoding guides

From SpinetiX Support Wiki

Jump to: navigation, search
Use these guides in conjunction with the Video decoding and Streaming pages to encode your video appropriately for playback on the HMP.

Elementi

Starting with Elementi 2015, when importing a video file that is outside the player' specifications or use a not recommended codec / container, the user is prompted to automatically transcode it into the good format. Furthermore, the user can manually re-encode a video within Elementi - this is useful for cases when the videos are within specs, but not optimized for player playback.

Video re-encoding

To re-encode a video and ensure that the video is fully compatible with SpinetiX players, follow these steps:

  1. Find your project within the "Projects" tab (Browse panel).
  2. Make sure that the project type is set to the correct player model.
    • To change the type of a project, right-click on it, go over "Set Type" option and select the desired project type.
  3. Double-click on the project icon to open it.
  4. Importing the video file, if not already in there.
  5. Right-click over the video file and select "Re-encode" option from the contextual menu. A progress bar is shown during the re-encoding.


Note Notes:
  • The file extension might change after re-encoding, for instance from mov to mp4, so you might need to update your project if that media was already used.
  • If the video will be uploaded on a DiVA player, set the project type to "HMP300 Project".

WinFF

WinFF is a simple graphical interface for FFMpeg.

WinFF Setup

Once you installed WinFF, download the SpinetiX presets for HMP200, HMP130, and HMP100 devices, unzip it and double-click on the SpinetiX.wff file - this will import the SpinetiX presets into the encoder and let you select them to encode your video.

The following presets are available:

  • HMP200 H264
    MP4 file with H264, resolution of 1920x1080
  • HMP130 MPEG-4
    AVI file with MPEG-4 (part 2) with resolution of 1280x720
  • HMP100 MPEG-4
    AVI file with MPEG-4 (part 2) with resolution of 832x468


Note Note:
To modify the presets parameters, click on "Edit > Presets", select the category "SpinetiX", then click on the preset you want to modify and change the command line parameters. Further documentation can be found on FFMpeg site.

FFMpeg

FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. It offers a command line tool to convert multimedia files between formats.

The generic syntax for a ffmpeg command is:

ffmpeg [global_options] {[input_file_options] -i ‘input_file’} ... {[output_file_options] ‘output_file’} ... 

Some examples are detailed below. See also how to change the frame rate of a video.

Transcode into a certain format

If you need to change the format / container of the file without any encodings, use something like:

ffmpeg.exe -i inputfile -acodec copy -vcodec copy outputfile
ffmpeg.exe -i inputfile -codec: copy outputfile

This will simply copy the audio and video streams (#1) or all the streams (#2) into the selected format (e.g., mp4, mov).

Encode into MOV format

To encode a window media video into a 720p (or 1080p) mpeg-4 video (mov format), you can use something like this:

ffmpeg -i video.wmv -vcodec libxvid -s hd720 -aspect 16:9 -r:v 25 -b:v 6500k -bf 1 -acodec libmp3lame -b:a 128k -t 120 video.mov

where:

-vcodec libxvid selects mpeg-4 as video format;
-s hd720 reduces the size (if needed) to 720p (use -s hd1080 for 1080p);
-aspect 16:9 sets the video display aspect ratio;
-r:v 25 selects 25 fps;
-b:v 6500k selects 6.5Mbits as target bitrate;
-bf 1 sets one B-frame to improve the coding efficiency;
-acodec libmp3lame select mp3 as audio format;
-b:a 128k selects 128kb for the audio bitrate;
-t 120 stops writing the output after 120 seconds.

Encode 1080p video into MP4 format

ffmpeg -i video_1080p.mp4 -s 832x468 -b:v 2500k -vcodec libx264 -vprofile main -x264-params keyint=12 -acodec libvo_aacenc -b:a 128k video.mp4

This will:

  • Select h.264 as video format using -vcodec libx264
  • Reduce the size (if needed) to 832x468 using -s 832x468
  • Select 2.5Mbits as target bitrate using -b:v 2500k
  • Set 12 key frames for the output video
  • Select AAC as audio format: -acodec libvo_aacenc
  • Target 128kb for the audio bitrate: -b:a 128k

WinMEnc

WinMEnc is a free front-end for mencoder. Download it here.

Encode SD video into MOV format

First download the profile file (720w, 6MB MPEG-2, 16x9, MP3 audio) and save it into the "profile" folder inside the WinMEnc folder.

Then, open WinMEnc.exe and follow these steps:

  1. Select the profile from the dropdown menu.
  2. Drag and drop the file(s) you wish to encode into the first tab.
  3. Select an output folder.
  4. Press Encode.

Encode HD video into MP4 format

These instructions do not apply to HMP130 and HMP100.

First download the profile file (1920w, 2MB H264, 16x9, AAC audio) and save it into the "profile" folder inside the WinMEnc folder.

Then, open WinMEnc.exe and follow these steps:

  1. Select the profile from the dropdown menu.
  2. Drag and drop the file(s) you wish to encode into the first tab.
  3. Select an output folder.
  4. Press Encode.

See also

This page was last modified on 7 September 2018, at 17:02.