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

burek burek at teamnet.rs
Mon Feb 3 03:05:01 EET 2020


[02:23:10 CET] <MPantarine> Hello ... I'm trying to create a video, but I get an error cat /video/*.jpg | ffmpeg -f image2pipe -c:v mjpeg  -i /root/musica/test.mp3 -i - output.mp4, but if I remove the "-i /root/musica/test.mp3" works. What is my wrong?
[02:23:25 CET] <MPantarine> ffmpeg version 3.2.14-1~deb9u1
[02:23:46 CET] <furq> MPantarine: -i - goes first
[02:23:57 CET] <furq> input options apply to the next input
[02:24:36 CET] <MPantarine> cat /video/*.jpg | ffmpeg -i /root/musica/test.mp3 -f image2pipe -c:v mjpeg -i - output.mp4
[02:48:13 CET] <kepstin> i suppose that order works too.
[05:18:01 CET] <Media_Thor> durandal_1707 Thanks, 4.5 hours later :)
[10:13:55 CET] <kurosu> I've been asked how to use h/w decoding to eg hevc main10 from ffmpeg command-line
[10:14:03 CET] <kurosu> ie dxva2
[10:14:14 CET] <kurosu> I've come up with ffmpeg -hwaccel dxva2 -threads 1 -i <input> -sn -an -pix_fmt yuv420p10le -c:v libx265 <options> -y out.mkv
[10:15:17 CET] <kurosu> but I'm really not sure it is actually using dxva2 - I thought I needed some hwdownload filter, but can't get any option to work (best was the above)
[10:28:30 CET] <durandal_1707> kurosu: hw filters are not used for decoding
[10:30:04 CET] <kurosu> durandal_1707: what do you mean by that? I'd say they are, eg you can set up some vaapi processing (but not dxva2)
[10:30:53 CET] <kurosu> it just seems that you can decode in the void/... with dxva2, but I'm doubtful dxva2 is used if you go back to software processing (eg encoding)
[10:31:46 CET] <kurosu> (not sure what s/w to see the vpu/gpu usage)
[10:34:56 CET] <durandal_1707> dunno, i just use opencl hw filters
[11:29:55 CET] <logithack> hi, i've got an MPEG-2 ts file (transport stream). when i open it in VLC, the audio plays just fine, but there's no video. any ideas what's wrong here?
[11:35:42 CET] <vlt> logithack: Can ffmpeg read (and transcode) it?
[11:38:44 CET] <logithack> vlt: i'm dealing with a documentary of a local tv channel. they offer the documentary on their website. if you investigate the Network tab of firefox' dev tools a bit, you can get the URIs to the video stream files, which come in segments (308 segments for 51 minutes).
[11:39:16 CET] <logithack> vlt: i've tried "ffmpeg -i 'concat:<file1>|<file2>' MyOutput.mp4" and it created an MP4 file, but again it only contains audio, no video, when playing in VLC.
[11:40:03 CET] <vlt> logithack: What does `ffmpeg -i <file>` tell you about the streams?
[11:42:52 CET] <logithack> vlt: hah, the last line:
[11:42:59 CET] <logithack> Stream #0:0[0x100]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 44100 Hz, stereo, fltp, 95 kb/s
[11:43:11 CET] <logithack> this must mean theres no video in it
[11:43:31 CET] <vlt> logithack: This means there's an audio stream in it.
[11:43:40 CET] <logithack> hm
[12:28:09 CET] <logithack> vlt: the .ts file had no video stream. i've found a different set of .ts files and "ffmpeg -i <file>" now shows me a video + audio stream inside it and i can also play it in vlc
[18:20:30 CET] <LFSVeteran> with transcode.aac , where will be the frame size set?
[18:22:50 CET] <DHE> when any encoder is opened successfully, avcodeccontext->frame_size is the number of samples it expects at a time. if 0, there is no requirement. for AAC it should be 1024
[18:24:27 CET] <JEEB> due to frame size differences and the fact that lavfi handles buffering of that automagically (and has a function to get X samples in a frame), I often put lavfi after audio decoding so that I can just request a frame of a specific size
[18:24:36 CET] <JEEB> even if no further filtering is to be done
[18:25:14 CET] <DHE> and here I was using AVAudioFifo like some kind of plebe
[18:25:33 CET] <DHE> while (av_audio_fifo_size(q->fifo) >= q->encoder->frame_size) { /* ... */ }
[18:25:46 CET] <JEEB> I think that might be what it uses behind the scenes, not sure
[18:26:16 CET] <LFSVeteran> so avcodec_open2 should fill the context with the correct frame size
[18:26:38 CET] <DHE> yeah. AAC encoders should set 1024 as it's required by the AAC spec
[18:26:59 CET] <DHE> so you can use that to verify it's working if you like
[18:27:18 CET] <JEEB> if the encoder ever starts supporting the less common profiles, then of course depending on the profile you might get something else
[18:27:22 CET] <JEEB> but unlikely
[18:27:24 CET] <LFSVeteran> I modified it for PCM_S32LE and I'm searching why the frame size isn't set, it stays 0
[18:28:13 CET] <LFSVeteran> or it to be due to applying a URL instead of file
[18:28:18 CET] <LFSVeteran> as input
[18:28:52 CET] <DHE> well PCM isn't compressed, so there's no size requirements. really it'll just be packing the frame data into packets and doing little more than validating you didn't make any obvious mistakes
[18:28:52 CET] <LFSVeteran> therefor I had to add av_find_input_format
[18:29:08 CET] <JEEB> the input/output I/O should not really matter. for decoders only if you got enough data to probe is what decides whether the lavc context has any info
[18:29:29 CET] <JEEB> and anyways, I generally don't trust the lavc context, but rather the AVFrames I receive from decoding
[18:29:42 CET] <DHE> yeah, avcodec* is about converting AVFrame to AVPacket (or vice versa), and avformat* is about getting AVPackets in/out of files and data sources
[18:30:05 CET] <JEEB> because teh decoder might stay the same, but the input might change from stereo to 5.1 or even the audio rate in Hz might change :P
[18:31:07 CET] <LFSVeteran> Just too less knowledge to remove unnecessary stuff from the example
[18:38:30 CET] <LFSVeteran> can't I just choose a frame size?
[18:39:39 CET] <JEEB> well yes, but an encoder can either bork or just nope at some random amount of data you push to it
[18:40:12 CET] <JEEB> for decoding the decoder gives you as much as it gives, and if you need to convert between different frame sizes you use either lavfi or AVAudioFifo
[18:40:58 CET] <LFSVeteran> it's just simply s32le in and s32le out no conversion
[18:41:48 CET] <LFSVeteran> so at least a value that's a multiple of 32 I guess
[18:45:28 CET] <DHE> well that's bits...
[18:45:59 CET] <linext> which streaming video format do you prefer: ts, hls, flv, rtsp, rtmp
[18:46:10 CET] <DHE> context matters...
[18:46:17 CET] <linext> an HD video encoder
[18:46:50 CET] <linext> https://i.imgur.com/63oKY6o.png
[18:46:55 CET] <DHE> like, what the player is and how much latency you can tolerate and if y hou ahve firewalls to go through or what your hosting options are..
[18:47:23 CET] <linext> latency is about 1 second and the video is going through a VPN
[18:47:47 CET] <DHE> you want less than one second latency from source to the viewer's eyes?
[18:47:59 CET] <linext> in the TS stream, it's about 1 second
[19:01:24 CET] <DHE> well the question was how much latency you were willing to tolerate. HLS is probably the worst offender with like 4-20 seconds latency depending on encoding and HLS settings, but it's HTTP based and makes for easy browser playback, etc.
[23:55:40 CET] <Heart_And_Chops> Hey guys, kinda stumped here. Trying to take a non 16:9 image and make a small zoompan video clip with it, with a 16:9 (Cropped) output.
[23:55:42 CET] <Heart_And_Chops> https://pastebin.com/Rx7EnPN7
[23:55:53 CET] <Heart_And_Chops> i get the correct output size, but its stretched.
[23:56:48 CET] <Heart_And_Chops> input file: http://usercontent.bid13.com/original_images/F/m/FmxB0WqcfApM8flpTpOAQSOONSZ44kjjgCvUVTJOhfC.jpg
[23:58:48 CET] <Heart_And_Chops> sample output https://usercontent.bid13.com/657WmSYGUWahmLCRDRu6uFcokz5GCMUB.mp4
[00:00:00 CET] --- Mon Feb  3 2020


More information about the Ffmpeg-devel-irc mailing list