#๐Ÿ”’ Creating still video from mp3: cont'd

43 messages ยท Page 1 of 1 (latest)

cloud barn
hoary iglooBOT
#

@cloud barn

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

cloud barn
#

@opal snow sorry, i'd suddenly become occupied!!

#

as far as i know, mutagen is metadata-only, at least for the id3 part

#

you can write tags but i don't know that you can get stuff like duration and other properties

#

excuse me while i look back at the old post to see what else i missed

opal snow
#

It happens, same here.

cloud barn
#

neat, i didn't know mp4 split their tracks up like that

#

in retrospect it makes more sense, but i always assumed mkv was more split up on account of the fact that you could softcode subtitles

#

okay, i think i get that!! let me do some fiddling and see what can be done

opal snow
#

It might explain if something got discarded - the tracks probably have to be the same type to overlay them. Distinct tracks is what lets you switch out eg different audio etc.

opal snow
cloud barn
#

i suppose i need to acquaint myself with ffmpeg a bit more

opal snow
#

Yah. Do an ffprobe of some subtitled mp4 some time.

cloud barn
#

i've never seen that before, only .srt files that are put on top

#

if i find one, i will!!

#

weird, unless this is outdated, you have to use the hacky fix to add multiple inputs

opal snow
#
[/app22tb/media/video/severance/season-01]borg*> ffprobe severance--s01e01--good-news-about-hell--720p--appletv--playon--14275020.mp4
ffprobe version 4.4.1-3ubuntu5 Copyright (c) 2007-2021 the FFmpeg developers
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x556e21af4840] stream 0, timescale not set
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'severance--s01e01--good-news-about-hell--720p--appletv--playon--14275020.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    title           : s01e01 - Good News About Hell
    artist          : Severance
    date            : 2022-02-18T00:00:00
    encoder         : Lavf60.16.100
    comment         : Mark is promoted to lead a team of employees whoโ€™ve had their memories surgically divided between their work and personal lives.
    show            : Severance
    episode_sort    : 1
    season_number   : 1
    media_type      : 10
  Duration: 00:59:45.59, start: 0.000000, bitrate: 1998 kb/s
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 1803 kb/s, 24 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1(eng): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s (default)
    Metadata:
      handler_name    : SubtitleHandler
  Stream #0:2(spa): Subtitle: mov_text (tx3g / 0x67337874), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
  Stream #0:3(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 186 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
  Stream #0:4: Video: png, rgb24(pc), 640x360 [SAR 3779:3779 DAR 16:9], 90k tbr, 90k tbn, 90k tbc (attached pic)
[/app22tb/media/video/severance/season-01]borg*>
cloud barn
#

wow, fields for comments and episode numbers too

#

that's pretty cool!!

cloud barn
#

yeah, i'm trying that out right now since i already have two ffmpeg.input() objects

#

i'm getting Could not find tag for codec h264 in stream #2, codec not currently supported in container though, i wonder if that's an os issue with some lacking dependency

opal snow
#

!paste
(Ignore this, trying to remember how to paste big things.)

hoary iglooBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

opal snow
opal snow
cloud barn
cloud barn
#

i keep docker on my server but this is just a small project

cloud barn
#

it's just a mac laptop and i don't like fiddling with dependencies on it

drifting thorn
opal snow
cloud barn
#

huh, i haven't heard of that before

#

are there any codecs that would work for my use case ? i'll install orbstack if needed, but it'd be nice to avoid friction setting up the project

#

i'm looking into it and it looks like maybe not, especially since APIC MIME types can be multiple different image types, including png and jpg, so hardcoding a codec won't work

#

it's late for me though, so i'm going to call it here,, thank you all so much for your help!!

#

i'll definitely let you know when the final bits get put into place

hoary iglooBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.