[Ffmpeg-devel-irc] ffmpeg.log.20190927

burek burek at teamnet.rs
Sat Sep 28 03:05:04 EEST 2019


[11:07:26 CEST] <billybob> i am trying to use ffmpeg to fix a corrupted avi. When opening this file in a hex editor it has millions of 0's at the start and when running the standard input output command with ffmpeg it returns "invalid data found when processing input"
[17:38:40 CEST] <horribleprogram> before I explode my computer
[17:39:12 CEST] <horribleprogram> I want to write a script that changes every .mp4 in the current directory's TAG:title metadata to its filename
[17:39:23 CEST] <horribleprogram> I don't even think I need a script, just a simple for loop
[17:43:01 CEST] <horribleprogram> so there's no way to edit metadata without having to process the file and "reencode" it or w/e
[17:43:13 CEST] <horribleprogram> I literally just need to change the goddamn TAG:title value
[17:44:14 CEST] <horribleprogram> for title in *; do ffmpeg -i "$title" -metadata title="$title"
[17:44:14 CEST] <kepstin> horribleprogram: there might be mp4 specific tools that can do that, but ffmpeg is not a tool designed for in-place file metadata editing.
[17:44:29 CEST] <horribleprogram> kepstin: is there a bypass or something/
[17:44:55 CEST] <horribleprogram> I read something about "copy mode'
[17:45:04 CEST] <horribleprogram> I'm not entirely sure what that is tho
[17:45:12 CEST] <kepstin> horribleprogram: "-c copy", yeah
[17:45:24 CEST] <horribleprogram> iight what's that do
[17:45:55 CEST] <kepstin> that causes ffmpeg to copy the already encoded media from the old file to the new file, instead of doing a cpu-intensive encode to the selected output codec.
[17:47:11 CEST] <horribleprogram> so would that speed up what I want
[17:47:17 CEST] <horribleprogram> I'm processing about 40GB of .mp4s
[17:47:39 CEST] <kepstin> yes, it would speed it up. It should in theory be almost as fast as copying the file with cp.
[17:47:52 CEST] <horribleprogram> for title in *; do ffmpeg -i "$title" -metadata title="$title" -c copy "$title"
[17:47:57 CEST] <kepstin> (reminder that you should never use the same filename for input file and output file with ffmpeg - it truncates the output file at the start of writing, which will delete the contents file that it's trying to read from)
[17:48:09 CEST] <horribleprogram> FuCK
[17:48:18 CEST] <DHE> oh dear
[17:48:52 CEST] <horribleprogram> that's why the one I tested it on doesn't work anymore
[17:49:28 CEST] <kepstin> ffmpeg is an encoding tool, not a metadata editing tool. It just happens to be able to change metadata in a file as a result of transcoding/remuxing it to a new file.
[18:00:12 CEST] <void09> trying to test the just release svt-av1 v0.7, using their sample encoding line with ffmpeg: ffmpeg -i [input.mp4] -nostdin -f rawvideo -pix_fmt yuv420p - | ./SvtAv1EncApp -i stdin -n [number_of_frames_to_encode] -w [width] -h [height]
[18:00:30 CEST] <void09> ffmpeg -i $movie -nostdin -f rawvideo -pix_fmt yuv420p - | ./SvtAv1EncApp -i stdin -n 792 -w 1920 -h 1080 -enc-mode 8 -q 25 -rc 0 -b out.ivf
[18:00:36 CEST] <void09> that's the line I run
[18:01:02 CEST] <void09> https://0bin.net/paste/r6C0jbMkZI+xjT5R#1+QULBY9aA3SMcz5te547-+VuJZKaTcfSHJpjPBPiv3
[18:01:07 CEST] <void09> getting broken pipe error. any idea?
[18:26:26 CEST] <void09> nvm, i am retarded
[18:34:24 CEST] <horribleprogram> anything wrong with this before I start
[18:34:48 CEST] <horribleprogram> for file in *; do ffmpeg -i "$file" -metadata title="$file" -c copy "${title%.mp4}-converted.mp4"
[18:34:51 CEST] <horribleprogram> done
[18:36:46 CEST] <furq> you probably want -map 0 -movflags faststart
[18:37:01 CEST] <furq> you probably also want *.mp4
[18:38:07 CEST] <horribleprogram> set_running_app:printf:1: %.m: invalid directive
[18:38:10 CEST] <horribleprogram> furq: ^
[18:38:50 CEST] <furq> i have no idea what that is
[18:39:20 CEST] <bencoh> 59
[18:39:27 CEST] <bencoh> (woops. hello there)
[18:39:34 CEST] <pink_mist> probably from ${title%.mp4} ... but it's a bash issue, not an ffmpeg issue
[18:39:42 CEST] <furq> apparently that's a zsh thing
[18:39:44 CEST] <DHE> that is definitely an xkcd #1084 right there
[18:39:46 CEST] <pink_mist> oh, zsh
[18:39:47 CEST] <furq> i wouldn't know how to fix that
[18:39:50 CEST] <pink_mist> same thing
[18:39:56 CEST] <pink_mist> not related to ffmpeg either way
[18:40:28 CEST] <furq> it's not quite the same thing because that substition would work fine in bash
[18:40:30 CEST] <horribleprogram> yeah figured
[18:40:35 CEST] <furq> ut
[18:41:03 CEST] <furq> fwiw i might use a dedicated mp4 muxer for this to avoid rewriting the whole file for faststart
[18:41:12 CEST] <furq> but l-smash isn't packaged anywhere so that would involve building it yourself
[18:41:26 CEST] <pink_mist> what's l-smash?
[18:41:29 CEST] <furq> an mp4 muxer
[18:42:16 CEST] <bencoh> yay, a japanese project main page :)
[18:42:23 CEST] <furq> lol
[18:42:30 CEST] <furq> ffmpeg will do it fine anyway
[18:42:31 CEST] <pink_mist> https://repology.org/project/l-smash/versions <-- it looks to be packaged in plenty of places, furq =)
[18:42:33 CEST] <furq> it'll just be a bit slower
[20:11:00 CEST] <lyncher> hi. is it possible to convert SRT subtitles to dvd_subitles/dvb_subtitles with ffmpeg?
[20:12:39 CEST] <JEEB> with the API, yes
[20:12:43 CEST] <JEEB> with the ffmpeg.c client, no
[20:13:17 CEST] <JEEB> basically we have code to have libass render the text
[20:13:18 CEST] <JEEB> but
[20:13:21 CEST] <cehoyos> How do convert them with the api?
[20:13:24 CEST] <cehoyos> you
[20:13:58 CEST] <JEEB> yes, I did notice the issue too late :P
[20:14:22 CEST] <JEEB> the whole AVSubtitle (text) into image (which could be done with the subtitle filter but that takes in something different entirely)
[20:14:41 CEST] <cehoyos> I am not convinced that works without major additional code.
[20:14:43 CEST] <JEEB> so you'd have to have something like ffmpeg.c's sub2video except text to image, and then make an AVSubtitle out of it
[20:15:14 CEST] <JEEB> so yes, sorry - I think I just stretched the definition of "with the API" :P
[20:15:48 CEST] <cehoyos> ok, then I understand, I just don't think there is a filter you can use that outputs something that the dvbsub/dvdsub encoders accept.
[20:16:11 CEST] <JEEB> yes, filters would output AVFrames, buut then you find yourself having to convert that back to AVSubtitle
[20:16:28 CEST] <JEEB> hysterical raisins galore
[20:16:29 CEST] <JEEB> :)
[20:20:56 CEST] <cehoyos> But now that you mention it, it appears that once libavfilter learns what subtitles are, this could be a trivial task;-(
[20:21:23 CEST] <JEEB> yes, you could have filters going one way or another
[20:21:31 CEST] <JEEB> OCR and "render this onto canvas"
[20:21:44 CEST] <JEEB> which we now already have, but have fun plugging them in ^_^
[20:22:08 CEST] <JEEB> OCR you can feed to, but I'm not sure if you can nicely receive the text samples
[20:22:24 CEST] <JEEB> you have AVFrames with attached text I think
[20:24:02 CEST] <JEEB> ("you can feed to" mostly meaning the sub2video thing in ffmpeg.c)
[20:29:50 CEST] <durandal_1707> see ocr filter
[20:31:51 CEST] <JEEB> yes I mentioned it :)
[21:12:35 CEST] <ThugAim> so much stuff of FF I need to learn. Is there like a tutorial base that I can experiment weekly with?
[21:14:13 CEST] <JEEB> there are examples under doc/examples in the code base
[21:14:17 CEST] <JEEB> it really depends on what you want to do
[21:14:46 CEST] <JEEB> then one good source of reading docs is to search for site:ffmpeg.org doxygen trunk KEYWORD
[21:15:12 CEST] <JEEB> which leads you to such things as https://lists.ffmpeg.org/doxygen/trunk/group__lavc__encdec.html
[21:15:32 CEST] <JEEB> (this is all generated from the source code of course, but sometimes I am lazy)
[21:15:41 CEST] <JEEB> or do you mean the command line application?
[21:15:57 CEST] <JEEB> for that search for ffmpeg-all.html and possibly look at some things in the trac wiki
[21:16:01 CEST] <ThugAim> I'm in broadcasting and setup scripts to batch convert, move, adjust audio for received files that aren't to standard.
[21:16:09 CEST] <ThugAim> I just feel there's much more I can do with it.
[00:00:00 CEST] --- Sat Sep 28 2019


More information about the Ffmpeg-devel-irc mailing list