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

burek burek021 at gmail.com
Wed Jul 11 03:05:01 EEST 2018


[00:33:54 CEST] <lavalike> hello, how can I use ffmpeg to take a live twitch stream, re-encode it to a different fps & bitrate (60 -> 30, >3000kbps -> 1000kbps), and serve it so that I can play it locally with mpv?
[01:47:56 CEST] <Hello71> youtube-dl
[01:48:06 CEST] <Hello71> or better just use mpv directly
[01:56:15 CEST] <DHE> normally I'd agree, but it's a strange request. like they want to turn a twitch feed into a multicast stream or something?
[01:57:23 CEST] <Faust> Hi
[01:58:27 CEST] <Faust> Is it possible to compress an image with ffmpeg?
[02:30:46 CEST] <DHE> Faust: while ffmpeg does support some standard image formats, you might want to use more typical tools if you have specific needs
[02:33:48 CEST] <Faust> It's just an icon for an application launcher.
[02:37:27 CEST] <Faust> is the PNG format recognizable?
[02:38:36 CEST] <Faust> Nevermind, just found a way.
[02:39:03 CEST] <Faust> See ya.
[07:31:36 CEST] <vaporstack> derrida: it's a secret ;)
[07:31:42 CEST] <vaporstack> oops wrong chan
[07:33:53 CEST] <zulu> my
[07:48:09 CEST] <zulu> help
[07:53:29 CEST] <vidgrapp> Installed libvorbis-dev, and ran configure with --enable-libvorbis and got and error `vorbis not found using pkg-config`, more info at https://pastebin.com/LYgfATTG . An ideas why?
[10:50:58 CEST] <th3_v0ice> Hi, what is the muxer that is used when the output file is .h264( raw bitstream )?
[10:51:40 CEST] <JEEB> one of the raw ones under libavformat
[10:51:59 CEST] <JEEB> libavformat/rawenc.c:    .name              = "h264",
[10:52:00 CEST] <JEEB> yup
[10:52:08 CEST] <JEEB> which is the one that just dumps the data as-is
[10:56:37 CEST] <th3_v0ice> Ok, thanks!
[12:00:58 CEST] <flavi0> Is there a de-reverberation filter available in ffmpeg/libavfilter?
[12:15:39 CEST] <termos> When doing HTTP PUT of HLS to Akamai the FFmpeg client will close the connection before Akamai has sent me a status code. Is there a way to wait for them to send me this response code?
[12:19:03 CEST] <tankenmate> hey all, what are the command line options to get ffmpeg to make a m4a file _without_ using a .m4a filename?
[12:20:18 CEST] <tankenmate> i've tried using a mp4 format but that generates a different type of container to a m4a file
[12:21:00 CEST] <tankenmate> i.e. aac codec + mp4 produces a mp4 video with only an audio stream, not a m4a containter with an aac codec
[12:24:54 CEST] <furq_> tankenmate: -f ipod
[12:27:50 CEST] <tankenmate> furq_: thanks, it would have taken me ages to find that
[12:28:08 CEST] <tankenmate> \quit
[12:28:12 CEST] <tankenmate> doh!
[14:17:46 CEST] <^Neo> So, some progress from my IEC61937 issue. I can do something like this ffmpeg -ac 2 -f alsa -i <pcm> -f ac3 blah.ac3
[14:17:58 CEST] <^Neo> and it can be playable as far as I know
[14:18:21 CEST] <^Neo> however, I want it to be now embedded in a mpegts stream...
[14:18:42 CEST] <^Neo> there might be a -c:a copy in there too
[14:23:48 CEST] <squ> change -f to type of result
[14:24:31 CEST] <squ> maybe it will convert automagically
[14:24:53 CEST] <JEEB> it's AC3-in-PCM packing, it will mux it as raw PCM in MPEG-TS
[14:26:10 CEST] <JEEB> what you want is to demux/parse it as AC3, that gives you AC3 AVPackets and you create a stream of those
[14:27:19 CEST] <JEEB> because the input -f is overloaded by libavdevice in that example you cannot force it to use the raw ac3 demuxer, and I'm not sure if you'd get the parser with that
[14:27:59 CEST] <JEEB> unless the input is of course noted as AC3
[14:28:13 CEST] <JEEB> if it is, then ffmpeg.c should be able to remux it as long as the parsing is done
[14:29:12 CEST] <furq_> you can presumably do it by piping to another ffmpeg
[15:09:30 CEST] <^Neo> furq_ yeah, that's what I'm thinking I might have to do
[15:10:10 CEST] <^Neo> JEEB, can you hint the input type? I didn't think so in ffmpeg.c
[15:10:24 CEST] <JEEB> yes, as long as it's not a container
[15:10:35 CEST] <JEEB> or well, no - you can't override a codec in a container
[15:10:40 CEST] <JEEB> but you can override the container
[15:10:47 CEST] <JEEB> the problem is, in your case you're having `-f alsa`
[15:10:54 CEST] <JEEB> which uses up your -f before -i
[15:10:55 CEST] <JEEB> :P
[15:11:02 CEST] <^Neo> I need multiple -f's!
[15:11:02 CEST] <JEEB> (plus the parsing part)
[15:11:05 CEST] <^Neo> hah
[15:11:20 CEST] <^Neo> I'm surprised no one's wanted this before for FFmpeg
[15:11:37 CEST] <^Neo> I figure using FFmpeg for AVR capabilities would be something the community would want
[15:11:47 CEST] <JEEB> also there's an spdifdec "demuxer"
[15:12:05 CEST] <^Neo> yeah, but I wasn't sure how to get my PCM plugin as input in that case
[15:12:24 CEST] <JEEB> ^Neo: basically people all do it in their specific-usecase API clients
[15:13:20 CEST] <JEEB> seems like the library does have `ff_spdif_probe`
[15:13:30 CEST] <JEEB> which is a private function that other demuxers can use
[15:13:35 CEST] <JEEB> it seems like only WAV uses it
[15:13:47 CEST] <^Neo> Yeah I was looking into that, and had some test code that basically pulled in those functions
[15:14:04 CEST] <JEEB> as an external application you cannot use ff_* though
[15:14:05 CEST] <^Neo> and I was basically able to sort of pull the AC3 packet data out and decoded
[15:14:19 CEST] <JEEB> since ff_* are internal functions
[15:14:52 CEST] <^Neo> yeah it was just some hack code to confirm that it was iec61937 that I was receiving
[15:15:14 CEST] <^Neo> the -f spdif -i <pcm> doesn't work unfortunately lol
[15:15:20 CEST] <JEEB> but yea, basically it means that it's less bad than it sounds. there's already a decoder and for formats that can have packed compressed audio in them that can be utilized
[15:16:12 CEST] <^Neo> hmm
[15:16:31 CEST] <^Neo> I wonder if I can take the pcm output and output to wav and pipe it into the spdif demuxer?
[15:16:43 CEST] <JEEB> the WAV demuxer I think supports it
[15:16:56 CEST] <JEEB> since libavformat/wavdec.c:                    ret = ff_spdif_probe(buf, len, &codec);
[15:17:08 CEST] <JEEB> so it at least tries to probe if the WAV contains SPDIF
[15:18:14 CEST] <^Neo> that seemed to work
[15:18:53 CEST] <JEEB> but yea, now I know what to use in my eternal project :P
[15:19:03 CEST] <JEEB> a capture file format demuxer
[15:19:23 CEST] <^Neo> hah
[15:19:40 CEST] <JEEB> I have at least one example of AAC in SPDIF from that :D
[15:19:48 CEST] <furq_> ^Neo: there's an spdif muxer as well
[15:20:04 CEST] <JEEB> yea but I think he only needs to get the data
[15:20:05 CEST] <furq_> ffmpeg -f lavfi -i sine=d=10 -c:a ac3 -f spdif - | ffmpeg -f spdif -i - -c:a copy out.m4a
[15:20:07 CEST] <^Neo> how does the piping syntax work? ffmpeg -f alsa -i <pcm> -c:a copy -f wav - | ffmpeg -i pipe -c:a ac3 -f mpegts pipe.ts doesn't seem to work
[15:20:19 CEST] <furq_> that works for me so i guess you can do the same thing with alsa instead of lavfi input
[15:20:35 CEST] <^Neo> furq_, the input data is pcm_s16le and it seems like the spdifenc doesn't support that codec
[15:20:49 CEST] <^Neo> unless I rework my asoundrc?
[15:21:05 CEST] <furq> oh
[15:21:17 CEST] <furq> does piping s16le work
[15:21:26 CEST] <^Neo> I think so?
[15:22:37 CEST] <^Neo> next step is to get AV sync with the hdmi video coming in over v4l2 lol
[15:24:07 CEST] <^Neo> but this is great
[15:24:09 CEST] <^Neo> thanks a lot!
[15:56:48 CEST] <^Neo> can I pipe two inputs into a single output?
[16:01:58 CEST] <Mavrik> What would that "pipe" do with the actual content of your two inputs?
[16:03:19 CEST] <^Neo> my workflow with ffmpeg.c is similar to something like ffmpeg -f alsa -i <pcm> -c:a copy -f wav - | ffmpeg -y -f wav -i - -c:a ac3 -f v4l2 -i <v4l2device> -c:v libx264 -f mpegts output.ts
[16:03:23 CEST] <^Neo> but the av sync is off
[16:03:29 CEST] <^Neo> so I'm wondering if I could do something like
[16:04:39 CEST] <^Neo>  ffmpeg -f alsa -i <pcm> -c:a copy -f wav - -f v4l2 -i <v4l2device> -c:v libx264 -f h264 | ffmpeg -y -f wav -i pipe1 -c:a ac3 -f h264raw -i pipe2 -f mpegts output.ts
[16:30:50 CEST] <SaberArthur> Hello, I encounter a problem when I try to create timelapse from existing video
[16:31:45 CEST] <SaberArthur> I use this script: ffmpeg -i input.mkv -filter:v "setpts=0.5*PTS" output.mkv
[16:32:16 CEST] <SaberArthur> When I make 1 minute video into 2x, it still has 1 minute duration. But the video is really speed up 2x. After 30 second the video freeze until 1 minute
[16:36:09 CEST] <SaberArthur> when I upload to youtube it weird https://i.imgur.com/4gLfTi1.png
[16:37:00 CEST] <Nacht> Does it contain audio ?
[16:37:26 CEST] <SaberArthur> no
[16:40:41 CEST] <Blacker47> SaberArthur, i would doublecheck with ffprobe input.mkv if it has more than one track.
[16:41:44 CEST] <Blacker47> or maybe set the output framerate with -r
[16:42:34 CEST] <SaberArthur> Ah, maybe because the audio track exist but it's silent so it doesn't get speed up?
[16:42:42 CEST] <Nacht> Yes
[16:43:11 CEST] <Blacker47> yes. try -shortest or second processing with -codec copy and -shortest.
[16:46:41 CEST] <Nacht> -an would be simpler
[16:47:32 CEST] <SaberArthur> Dang, thank you. Solved
[16:48:40 CEST] <SaberArthur> Yeah, apparently there is a silent audio channel. I had to get rid of it first or using -an to make it work
[16:50:22 CEST] <Nacht> The thing is, setpts only applies to video. So it was speeding up your video, but leaving your audio the same, which still had the duration
[16:52:13 CEST] <SaberArthur> Yeah, makes sense
[16:52:23 CEST] <Blacker47> Nacht, i belive youtube always needs an audio track.
[16:52:50 CEST] <Nacht> Blacker47: You got a point there
[16:52:59 CEST] <SaberArthur> so what do I do?
[16:53:27 CEST] <Blacker47> SaberArthur, try & error & learn ;-)
[16:54:17 CEST] <Nacht> SaberArthur: As Blacker47 said, used -shortest
[16:54:20 CEST] <Blacker47> SaberArthur, you can try audo-less upload (after using -an). if it fails you can try cut audio as i wrote or add silent audio-track after -an.
[16:54:31 CEST] <Nacht> *use
[16:55:32 CEST] <SaberArthur> I uploaded the -an and it works, so... I think it's okay to upload the audio-less one. idk
[16:55:51 CEST] <SaberArthur> But yeah, if it not gonna work I'm gonna do the other way
[16:56:55 CEST] <atbd> hi, i'm using ffmpeg c api to split a one hour video in multiple small videos. ffplay reads them right, vlc reads them but set a bad start time (for example start at 15:10:54 and ends at 15:12:54). I thought setting AVStream::start_time would succeed but no, and AVFormatContext::start_time does no seem to be the solution too. Someone has an idea on what to set ? Thanks!
[16:59:31 CEST] <Blacker47> SaberArthur, so the need for an audio i heard about may be only for livestreaming.
[16:59:42 CEST] <SaberArthur> okay, gotcha
[17:00:02 CEST] <SaberArthur> thank you guys
[17:58:00 CEST] <Trufa> Can I install ffmpeg 3.x with brew on a mac? Now that it's updated to 4 I don't seem to find v3 with brew, thank you!
[17:58:36 CEST] <Hello71> ask brew
[20:20:46 CEST] <CoderDawson> In an attempt to get H.264 hardware decoding working on Android using MediaCodec, I have cross-compiled ffmpeg with a command-line of https://pastebin.com/ej1w7j7Y from an Ubuntu 18.04 virtual machine. When executing avcodec_open2 for the h264_mediacodec (found via avcodec_find_decoder), I receive an error code result of -542398533 (Generic error in an external library). Are there steps I may have missed during the ffmpeg build pr
[20:23:10 CEST] <JEEB> try without as limited thing first
[20:23:24 CEST] <JEEB> I build FFmpeg+mpv for android and hwdec works
[20:25:41 CEST] <CoderDawson> Unfortunately, I am using ffmpeg with WebRTC so I don't believe mpv is an option.
[20:26:38 CEST] <JEEB> also I would recommend not posting a command line to chromium's build script but rather the actual configure line
[20:26:41 CEST] <JEEB> in any case
[20:27:09 CEST] <JEEB> http://up-cat.net/p/900c2b90
[20:27:17 CEST] <JEEB> this is how my build config looks for FFmpeg
[20:27:51 CEST] <CoderDawson> Here is the configure output: https://pastebin.com/QGE44cLe
[20:27:52 CEST] <JEEB> I make a "standalone toolchain" for ARM and then add it to PATH and utilize the clang it contains
[20:28:05 CEST] <JEEB> but basically esp. during first tests I don't disable random things
[20:28:18 CEST] <JEEB> bevause you might be missing a file protocol or whatever
[20:32:56 CEST] <CoderDawson> Previous was the configure line. Here is the configure output: https://pastebin.com/02PXxy8N
[20:33:28 CEST] <CoderDawson> I was thinking that h264_mediacodec should appear in the enabled hwaccels section.
[20:35:01 CEST] <JEEB> h264_mediacodec is kind of special. it has a more hwaccel'y mode, but it also can be used as "just a decoder"
[20:35:55 CEST] <JEEB> anyways, you might want to check if that stream works when dumped to a file with something like mpv-android
[20:36:08 CEST] <JEEB> if it does then it's either your build or your API usage
[20:36:19 CEST] <JEEB> and just try building without limiting the build as much, you're not yet in the optimization part
[20:36:23 CEST] <JEEB> you're in the "getting shit to work" part
[20:37:14 CEST] <JEEB> I posted my *full* configure line (which of course does contain extra things like GMP/GNUTLS)
[20:37:20 CEST] <JEEB> but it also contains jni/mediacodec
[20:37:21 CEST] <JEEB> and zlib
[20:37:28 CEST] <JEEB> the two first are important
[20:37:44 CEST] <JEEB> and then remember that for the JNI stuff in mediacodec decoder you need to first provide libavcodec the JVM
[20:38:31 CEST] <JEEB> https://github.com/mpv-android/mpv-android/blob/master/app/src/main/jni/main.cpp#L36...L42
[20:38:34 CEST] <JEEB> like this :P
[20:39:01 CEST] <JEEB> the av_jni_set_java_vm
[20:39:52 CEST] <CoderDawson> I actually have ffmpeg working without anything limited in WebRTC and it goes for the VP8 codec without hardware decoding and runs very slow on device.
[20:40:34 CEST] <CoderDawson> I did another build with both h264 and h264_mediacodec enabled and it choose h264 without hardware decoding through ffmpeg and was again very slow.
[20:41:02 CEST] <CoderDawson> That's actually what has lead me down the path of attempting to get h264_mediacodec working to speed up the decoding on device.
[20:42:08 CEST] <CoderDawson> I am testing on a Google Pixel 2.
[21:14:14 CEST] <Hello71> why not just use stagefright
[21:14:40 CEST] <JEEB> no
[21:15:16 CEST] <JEEB> he just completely ignored my lines about registering the JVM, but stagefright at this point of time is *not* an answer
[21:15:27 CEST] <JEEB> mediacodec is what you use on android. period.
[21:20:45 CEST] <CoderDawson> Still trying to figure out my options for the JVM lines you pointed out as I don't know how that fits in with WebRTC's use of FFMpeg.
[21:37:06 CEST] <CoderDawson> Out of curiosity, shouldn't there be an entry in libavcodec/hwaccels.h for h264_mediacodec? Something like ff_h264_mediacodec_hwaccel?
[21:38:33 CEST] <JEEB> CoderDawson: when you initialize libavcodec and before you start poking at the decoders, you call the JVM registration
[21:39:00 CEST] <JEEB> and while there's a more hwaccel like thing for Mediacodec, no. at least I think like that.
[21:39:05 CEST] <JEEB> you just utilize it as a decoder
[21:39:11 CEST] <JEEB> which in many ways is simpler :P
[21:39:41 CEST] <CoderDawson> Thanks, JEEB.
[21:40:34 CEST] <CoderDawson> RE: JVM registration. WebRTC is initializing ffmpeg and libavcodec from my understanding and I am not familiar with how that works yet.
[21:44:21 CEST] <JEEB> CoderDawson: I have no idea but you were calling avcodec_open2
[21:44:33 CEST] <JEEB> before that, call the registration function with the JVM
[21:47:37 CEST] <CoderDawson> Ah. Gotcha. The code calling avcodec_open2 is actually part of WebRTC (in h264_decoding_impl.cc). Guess I just need you to point out that call for it to actually click. Not sure how to access the JVM at that point though. More research will be needed.
[23:01:20 CEST] <faLUCE> hello, is there an alternative for the "-t" option? I want to cut a mp3 file from 00:03:00 to 00:07:45
[23:01:36 CEST] <faLUCE> If I use -ss then I have to calculate the duration for -t
[23:05:13 CEST] <kepstin> you could use -copyts in combination with -to, probably. Note that this may result in bad timestamps in the output file, depending on format.
[00:00:00 CEST] --- Wed Jul 11 2018


More information about the Ffmpeg-devel-irc mailing list