Results 1 to 8 of 8

Thread: Convert mp3 music to video for youtube upload

  1. #1
    Join Date
    Feb 2005
    Beans
    122

    Convert mp3 music to video for youtube upload

    hi i am a noon and have been searching for a program to convert my music mp3 files to video files to upload on youtube. does anyone know of one, especially if it will bulk convert. i know i need to add a jpeg or something too. thanks

  2. #2
    Join Date
    Jul 2006
    Location
    Lancashire
    Beans
    Hidden!
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Convert mp3 music to video for youtube upload

    Hi
    If you have a jpg file and an mp3 file you can use ffmpeg to do the job:-
    Code:
    ffmpeg -loop_input -i picture.jpg -i music.mp3 -shortest -acodec copy video.mp4
    To use this for bulk conversion you would probably need to write a script.

  3. #3
    Join Date
    Feb 2005
    Beans
    122

    Re: Convert mp3 music to video for youtube upload

    Quote Originally Posted by ron999 View Post
    Hi
    If you have a jpg file and an mp3 file you can use ffmpeg to do the job:-
    Code:
    ffmpeg -loop_input -i picture.jpg -i music.mp3 -shortest -acodec copy video.mp4
    To use this for bulk conversion you would probably need to write a script.
    Thanks....i'll need to find a primer on writing a script somewhere. I'm surprised that there isnt a program

  4. #4
    Join Date
    Feb 2005
    Beans
    122

    Re: Convert mp3 music to video for youtube upload

    anyone?

  5. #5
    Join Date
    Nov 2008
    Location
    Germany
    Beans
    217
    Distro
    Ubuntu Development Release

    Re: Convert mp3 music to video for youtube upload

    I second that. A script to fill in the parameters would be great. I'm too stupid to do it...

  6. #6
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan
    Beans
    2,156
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Convert mp3 music to video for youtube upload

    Quote Originally Posted by bennettg View Post
    hi i am a noon and have been searching for a program to convert my music mp3 files to video files to upload on youtube. does anyone know of one, especially if it will bulk convert. i know i need to add a jpeg or something too. thanks


    kdenlive will do that for you beautifully here is one i made with kdenlive from 3 spliced mp3 and 3 jpeg


    kdenlive is in your synaptic


    or you can install from terminal
    Code:
    sudo apt-get install kdenlive

    easy to use drag photos into project tree then down to video 1
    and insert your mp3 same way into audio line


    then click on render choose format and presto

    REALLY stable program and good fun
    Attached Images Attached Images
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community
    Playing with Slackware too now ...
    ShanArt

  7. #7
    Join Date
    Feb 2006
    Location
    uk
    Beans
    Hidden!

    Re: Convert mp3 music to video for youtube upload

    in python. takes two arguments - the image and the mp3 file (in either order), and outputs the video with the same name as the mp3 (but with a mp4 extension). either drag image+mp3 onto the script, use on the cli or use as a nautilus action.

    Code:
    #! /usr/bin/env python
    
    import sys, os
    
    inputOne = sys.argv[1]
    inputTwo = sys.argv[2]
    
    for i in sys.argv[1:]:
        if '.mp3' in i:
            output = i.replace('mp3','mp4')
    
    cmd = 'ffmpeg -loop_input -i "'+inputOne+'" -i "'+inputTwo+'" -shortest -acodec copy "'+output+'"'
    
    os.system(cmd)
    it'd be more or less as simple in bash, but i cant get bash syntax right off the top of my head

  8. #8
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan
    Beans
    2,156
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Convert mp3 music to video for youtube upload

    looks brill aeiah not sure how to use this tried to run it and

    since i do not understand the code it is probably my mistake put the script and mp3 and jpg in folder and ran
    Code:
    ./mp3plusjpg


    and got

    Code:
    ./mp3plusjpg
    Traceback (most recent call last):
      File "./mp3plusjpg", line 5, in <module>
        inputOne = sys.argv[1]
    IndexError: list index out of range
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community
    Playing with Slackware too now ...
    ShanArt

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •