Skip Navigation

How do you post music to lemmy ? You can post images and video files with music tracks, but what about simple.mp3?

Do I have to convert my mp3 file to mp4 by adding blackout video track using handbrake ?

23 comments
  • FWIW, mp4 files don’t have to have video streams, so you could use an online service or VLC or FFmpeg to convert an mp3 to mp4 format.

    • Ok, I tried

      This created a file too big

      ffmpeg -i "Somebody I Vacuum to Decay.mp3" -c:a copy -f mp4 "Somebody I Vacuum to Decay.mp4"

      This recompress to 64kbit, but still a few byte over the limit

      ffmpeg -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 64k -f mp4 "Somebody I Vacuum to Decay.64kbit.mp4"

      This was under the limit, but when uploaded, the file disappeared with no error message

      ffmpeg -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 56k -f mp4 "Somebody I Vacuum to Decay.56kbit.mp4"

      I tried copy to mp4 but trunkate a 30seconds, same behaviour as 56kbit file, despite being under 500k

      ffmpeg -i "Somebody I Vacuum to Decay.mp3" -t 30 -c:v copy "Somebody I Vacuum to Decay.30secs.mp4"

      I tried adding an image, but this just created a 1 second file with no image

      ffmpeg -i "Somebody I Vacuum to Decay.mp3" -i "image(62)-2.png" -c:a aac -b:a 64k -c:v libx264 -shortest "Somebody I Vacuum to Decay.56kbit.withpic.mp4"

      This next one loops the image file, now it created the full song with an image in the video channel. Unfortunately the video track now weights about 3 megabytes, so way over

      ffmpeg -loop 1 -i "image(62)-2.png" -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 64k -c:v libx264 -shortest -vf "scale=1280:720" "Somebody I Vacuum to Decay.56kbit.withpic.mp4"

      This next one created a 2.4mbps file, the image is now awful quality

      ffmpeg -loop 1 -i "image(62)-2.png" -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 64k -c:v libx264 -b:v 100k -vf "scale=320:320" -shortest "Somebody I Vacuum to Decay.56kbit.withpic.mp4"

      This reduces video bandwidth to 10kbps, image is incomprehensible and the file is still 1.3 megabytes (400k for the video stream)

      ffmpeg -loop 1 -i "image(62)-2.png" -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 64k -c:v libx264 -b:v 10k -vf "scale=320:320" -shortest "Somebody I Vacuum to Decay.56kbit.withpic.mp4"

      Reduced video stream to 1kbps, 1.2 megabytes, still too big

      ffmpeg -loop 1 -i "image(62)-2.png" -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 64k -c:v libx264 -b:v 1k -vf "scale=320:320" -shortest "Somebody I Vacuum to Decay.56kbit.withpic.mp4"

      I reduced audio quality to 32kbps, 677 kilobytes, half of that is the video stream still, and at this point it's just a gray image

      ffmpeg -loop 1 -i "image(62)-2.png" -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 32k -c:v libx264 -b:v 1k -vf "scale=320:320" -shortest "Somebody I Vacuum to Decay.32kbit.withpic.mp4"

      And I post it here And the uploaded file just disappears .....

      I try raising the video quality then the resolution

      ffmpeg -loop 1 -i "image(62)-2.png" -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 32k -c:v libx264 -b:v 10k -vf "scale=320:320" -shortest "Somebody I Vacuum to Decay.32kbit.withpic.mp4"

      ffmpeg -loop 1 -i "image(62)-2.png" -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 32k -c:v libx264 -b:v 20k -vf "scale=480:480" -shortest "Somebody I Vacuum to Decay.32kbit.withpic.mp4"

      final attempt, I'm not sure why it won't accept it, no errors, it is under 1 megabyte

      ffmpeg -loop 1 -i "image(62)-2.png" -i "Somebody I Vacuum to Decay.mp3" -c:a aac -b:a 32k -c:v libx264 -b:v 20k -vf "scale=1280:720" -shortest "Somebody I Vacuum to Decay.32kbit.withpic.mp4"

      • Sorry to hear you’re still having issues. I didn’t write Lemmy and I don’t host lemmyml, so my knowledge is limited. The file size limit is per-instance, set in a config file on the server, and I had nothing to do with how lemmyml is configured. @dessalines@lemmy.ml or @nutomic@lemmy.ml might be able to shed some light.

23 comments