[mythtv-users] issue playing mp3 using Internal player

James Miller gajs-f0el at dea.spamcon.org
Thu Mar 26 02:25:16 UTC 2020


On Wed, 25 Mar 2020, Stephen Worthington wrote:

> I can remember trying all sorts of settings to try to get a playable
> file.  Then I decided to try and make a file that was similar to the
> DVB-T broadcasts, and eventually got the above settings.  In case the
> format of the .jpg file matters, I have put a copy of my
> audio_only.jpg file on my web server:
>
> http://www.jsw.gen.nz/mythtv/audio_only.jpg

Thanks for making that available. Here's the two-step process that finally 
resulted in a file playable under MythTV here. I first created a 50-minute 
long video file (my podcast is always slightly less than 50 minutes), sans 
sound, from my desired graphic with

ffmpeg -loop 1 -i my-image.jpg -c:v libx264 -t 3000 -pix_fmt yuv420p -vf 
scale=320:240 out.mp4

(shamelessly cribbed from 
https://stackoverflow.com/questions/25891342/creating-a-video-from-a-single-image-for-a-specific-duration-in-ffmpeg). 
Resulting mp4 weighs in at 6MB.

Then I used the following command to join my downloaded mp3 audio to that 
soundless video (does this qualify as muxing?):

ffmpeg -i out.mp4 -i my-audio.mp3 -codec copy -shortest output.mp4

(likewise cribbed from 
https://stackoverflow.com/questions/11779490/how-to-add-a-new-audio-not-mixing-into-a-video-using-ffmpeg)

output.mp4 weighs in at 23MB, which is actually a little less than the 
size of the mp3 and the mp4-made-of-jpg added together.

Perhaps not the optimal way to do this. But it does give me the desired 
result. And, despite the process being a bit convoluted, once the video 
file is created from the image it is easy to automate the rest as a cron 
job.

Further input on this task, anyone?


More information about the mythtv-users mailing list