Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-multimedia 0.1.1

    Download button

    No screenshots available
    Downloads: 156  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Andrew Schoen | More programs
    BSD License / FREE
    April 6th, 2011, 13:13 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-multimedia description

    Encode video from the Django admin

    django-multimedia is a Django app used to encode video from the django admin Uses ffmpeg to encode the video and django-celery to process it in a queue. Supports any video profile you can write an ffmpeg command to accomplish.

    Getting Started

    To get started simply install using pip:

    pip install django-multimedia

    Add multimedia to your installed apps and syncdb. If you are using south you might want to syncdb --all and migrate --fake

    Your installed apps should look something like this:

    INSTALLED_APPS = (
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.sites',
     'django.contrib.messages',
     'django.contrib.admin',
     'djcelery',
     'filer',
     'multimedia',
     'appmedia',
     'easy_thumbnails',
    )


    Next, you'll need to configure your settings. See configuration below.

    Please refer to the documentation for each dependency on instructions on how to install them.

    Configuration

    You'll need to configure your media profiles and tell the app where to upload the encoded file to after completion. You can use any ffmpeg command as long as you have the codecs needed installed. Use the settings ''MULTIMEDIA_VIDEO_PROFILES'' and ''MULTIMEDIA_AUDIO_PROFILES'' to accomplish this.

    The following is the default profile for Video.

    MULTIMEDIA_VIDEO_PROFILES = {
     'f4v': {
     'encode_cmd': 'ffmpeg -y -i "%(input)s" -f mp4 -acodec libfaac -ab 128k -vcodec libx264 -vpre slow -b 690k -ac 1 -s 620x350 -r 30 "%(output)s"',
     'encode':True,
     'name':'Flash Video',
     'container':'f4v',
     'thumbnail_cmd': 'ffmpeg -y -itsoffset -%(offset)s -i "%(input)s" -vcodec mjpeg -vframes 1 -an -f rawvideo -s 620x350 "%(output)s"'
     },
    }


    Here is a breakdown of the ffmpeg arguments being used in these examples.

    Video:
    ffmpeg
    -y // Answer YES to all prompts
    -i "%(input)s" // Input file path put in automatically by the system, leave this alone
    -f mp4 // Video container
    -acodec libfaac // Audio codec
    -ac 1 // Audio channels
    -ab 128k // Audio bitrate
    -vcodec libx264 // Video codec
    -vpre slow // Preset for video encoding quality (slow, fast, medium, etc)
    -b 690k // Video bitrate
    -s 620x350 // File dimensions
    -r 30 // Framerate
    "%(output)s" // Output file path put in automatically by the system, leave this alone

    Screenshot:
    ffmpeg
    -y // Answer YES to all prompts
    -itsoffset -%(offset)s // Frame offset, how far into the video to grab a screenshot, leave this alone
    -i "%(input)s" // Input file path put in automatically by the system, leave this alone
    -vcodec mjpeg // Video (image) codec
    -vframes 1 // We only want a single frame
    -an // No clue what this does
    -f rawvideo // Output image format
    -s 620x350 // File dimensions
    "%(output)s" // Output file path put in automatically by the system, leave this alone


    And here is the default profile for Audio:

    MULTIMEDIA_AUDIO_PROFILES = {
     'audio': {
     'encode_cmd': 'ffmpeg -y -i "%(input)s" "%(output)s"',
     'encode':True,
     'name':'MP3 Audio',
     'container':'mp3',
     },
    }


    The following settings are used to upload the media after encoding:

    MEDIA_SERVER_HOST = "some.host.here"
    MEDIA_SERVER_USER = "host_user"
    MEDIA_SERVER_PASSWORD = "user_pwd"
    MEDIA_SERVER_PORT = 22
    MEDIA_SERVER_VIDEO_BUCKET = "videobucket"
    MEDIA_SERVER_AUDIO_BUCKET = "audiobucket"
    MEDIA_SERVER_AUDIO_PATH = "path/on/some/server" % (MEDIA_SERVER_AUDIO_BUCKET,)
    MEDIA_SERVER_VIDEO_PATH = "path/on/some/server" % (MEDIA_SERVER_VIDEO_BUCKET,)



    Product's homepage

    Requirements:

    · Python
    · Django
    · django-celery
    · django-filer
    · paramiko
    · pycrpto
    · FFmpeg

      


    TAGS:

    video encoder | Django admin | Django | video | encoder

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM