Re: [Libav-user] avpacket data padding and alignment

2018-04-16 Thread YIRAN LI
2018-04-16 12:07 GMT+10:00 YIRAN LI : > Hi guys, > > I know if I call av_new_packet then the data buffer created will be padded > and aligned. > > > But how if I only use ffmpeg to do the muxing? > > > Say if I get a buffer with size n. My code looks li

[Libav-user] avpacket data padding and alignment

2018-04-15 Thread YIRAN LI
Hi guys, I know if I call av_new_packet then the data buffer created will be padded and aligned. But how if I only use ffmpeg to do the muxing? Say if I get a buffer with size n. My code looks like this. AVPacket pkt; ZeroMemory(&pkt, sizeof(pkt)); pkt.stream_index = myindex; pk

Re: [Libav-user] may I use ffmpeg API just for decoding

2018-03-26 Thread YIRAN LI
2018-03-24 21:13 GMT+11:00 YIRAN LI : > Hi guys, > > > Want to confirm one thing. May I write my own demuxer (for example for > AVI) and only use ffmpeg API for video/audio decoding? > > > Thanks > ​ Hi guys, I've found an example video_decode_example@avcodec.c

Re: [Libav-user] may I use ffmpeg API just for decoding

2018-03-25 Thread YIRAN LI
2018-03-24 22:59 GMT+11:00 Carl Eugen Hoyos : > 2018-03-24 11:13 GMT+01:00, YIRAN LI : > > > Want to confirm one thing. May I write my own demuxer (for > > example for AVI) and only use ffmpeg API for video/audio > > decoding? > > I may misunderstand your questio

[Libav-user] may I use ffmpeg API just for decoding

2018-03-24 Thread YIRAN LI
Hi guys, Want to confirm one thing. May I write my own demuxer (for example for AVI) and only use ffmpeg API for video/audio decoding? Thanks ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user

Re: [Libav-user] streaming format

2018-03-19 Thread YIRAN LI
2018-03-20 0:49 GMT+11:00 Sebastian Guttenberg : > I'm looking for a streaming format so that one program can write to a file > while another program can read/play it at same time. > > > Seems webm can do it. but when play it with ffplay seems the newly written > data are not read out. I googled a

[Libav-user] streaming format

2018-03-18 Thread YIRAN LI
Hi guys, I'm looking for a streaming format so that one program can write to a file while another program can read/play it at same time. Seems webm can do it. but when play it with ffplay seems the newly written data are not read out. I googled and see people saying the amount of data can be rea

Re: [Libav-user] about DTS PTS

2018-02-12 Thread YIRAN LI
2018-02-13 16:51 GMT+11:00 Carl Eugen Hoyos : > 2018-02-13 2:20 GMT+01:00 YIRAN LI : > > > Say we has packets in [DTS, PTS]: [10, 0], [11, 2], [12, 3] > > These are invalid timestamps > ​--- Hi Carl, > ​Just want to know why they are invalid, because packet.dts must be &

[Libav-user] about DTS PTS

2018-02-12 Thread YIRAN LI
Hi guys, In av_write_frame()->compute_muxer_pkt_fields() we have if (pkt->dts != AV_NOPTS_VALUE && pkt->pts != AV_NOPTS_VALUE && pkt->pts < pkt->dts) { av_log(s, AV_LOG_ERROR, "pts (%s) < dts (%s) in stream %d\n", av_ts2str(pkt->pts), av_ts2str(pkt->dts),

[Libav-user] bitrate for multi-channel audio

2018-01-14 Thread YIRAN LI
Hi there, According to this https://trac.ffmpeg.org/wiki/Encode/HighQualityAudio *To calculate the bitrate to use for multi-channel audio: (bitrate for stereo) x (channels / 2).Example for 5.1(6 channels) Vorbis audio: 128Kbps x (6 / 2) = 384Kbps* Is it true for every encoder that supports mult

[Libav-user] video cover art

2017-11-28 Thread YIRAN LI
Hi guys, I'm investigating how to insert/keep video cover art with ffmpeg. Could any one give me help on these 2 questions. 1. Of all these formats asf, avi, dv, flv, mkv, mov, mp4, m4v, mpeg, ogg, rm. swf, webm, which ones support cover art. I know a cover art will/can be added as a video strea

Re: [Libav-user] What should I do when avcodec_decode_audio4 fails?

2017-05-15 Thread YIRAN LI
2017-05-15 23:38 GMT+10:00 坚定前行 : > > > ---Original--- > > then simply wait for the correct time stamp… that is what i said for sync > frame. all day out of office had 2 use mobile to reply… > ​Thanks Powerpan, I'll have a double check, but I doubt maybe it doesn't work. I mean for example ea

Re: [Libav-user] What should I do when avcodec_decode_audio4 fails?

2017-05-15 Thread YIRAN LI
2017-05-15 23:31 GMT+10:00 坚定前行 : > > > ---Original--- > *From:* "YIRAN LI" > *Date:* 2017/5/15 21:26:07 > *To:* "This list is about using libavcodec, libavformat, > libavutil,libavdevice and libavfilter."; > *Subject:* Re: [Libav-user] What sh

Re: [Libav-user] What should I do when avcodec_decode_audio4 fails?

2017-05-15 Thread YIRAN LI
wing packets can be decoded. I need to make up with silent samples otherwise video audio would go out of sync. How can keyframe and resync solve this problem? ​ > > ---Original--- > *From:* "YIRAN LI" > *Date:* 2017/5/15 15:47:48 > *To:* "This list is about using

Re: [Libav-user] What should I do when avcodec_decode_audio4 fails?

2017-05-15 Thread YIRAN LI
2017-05-15 20:00 GMT+10:00 Nicolas George : > Le sextidi 26 floréal, an CCXXV, YIRAN LI a écrit : > > It's okay for me to add silence to makeup the decode failure but how can > I > > know how many silent samples to insert? > > If your frames come from a decent fo

Re: [Libav-user] What should I do when avcodec_decode_audio4 fails?

2017-05-15 Thread YIRAN LI
2017-05-15 17:29 GMT+10:00 坚定前行 : > 根据视频都桢计算,framesxframe rate/sample rate > > ​Hi Powerpan, That only works for some codecs: those having fixed frame size. Codecs with no fixed frame size ​can't be handled in this way, right? ---Original--- > *From:* "YIRAN LI" &

Re: [Libav-user] What should I do when avcodec_decode_audio4 fails?

2017-05-15 Thread YIRAN LI
-Original--- > *From:* "YIRAN LI" > *Date:* 2017/5/15 14:31:58 > *To:* "This list is about using libavcodec, libavformat, > libavutil,libavdevice and libavfilter."; > *Subject:* [Libav-user] What should I do when avcodec_decode_audio4 fails? > > Hi there, >

[Libav-user] What should I do when avcodec_decode_audio4 fails?

2017-05-14 Thread YIRAN LI
Hi there, When running my program with an audio-broken file, at some point avcodec_decode_audio4 returns < 0 which mean decode failure. It's okay for me to add silence to makeup the decode failure but how can I know how many silent samples to insert? Thanks _

[Libav-user] Does MP4 allow annex-b H.264 stream?

2017-04-12 Thread YIRAN LI
Hi all, If I configure X264 to use annex-b and then don't set extradata/extradata_size in ffmpeg so that raw annex-b streams are directly written into file. (this way no Avcc atom is written) Is such a file spec compliant? ___ Libav-user mailing list Li

Re: [Libav-user] re-encoding and transcode (codec copy) on same file.

2017-04-12 Thread YIRAN LI
2017-04-12 0:55 GMT+10:00 Andy Shaules : > On 4/10/2017 4:37 PM, YIRAN LI wrote: > > > > 2017-04-10 7:16 GMT+10:00 bowljoman : > >> >> sorry if this client top posts, but to answer, you can do 1 of 2 things. >> assume it is different and insert it before retu

Re: [Libav-user] re-encoding and transcode (codec copy) on same file.

2017-04-10 Thread YIRAN LI
ile 4G LTE Device > > -------- Original message > From: YIRAN LI > Date: 4/7/17 3:15 PM (GMT-08:00) > To: "This list is about using libavcodec, libavformat, libavutil, > libavdevice and libavfilter." , FFmpeg user > questions > Subject: [Libav-user]

[Libav-user] re-encoding and transcode (codec copy) on same file.

2017-04-07 Thread YIRAN LI
Hi guys, I'm investigating if it's possible to do editing and transcode on same file. I mean use -vcodec copy, we can readout packets and write them directly into output file without re-encoding. But if it's possible, for example if I have a 2 mins video, re-encode 1st min because there're some e

[Libav-user] what options should I specify if I only want an average target bitrate

2017-03-01 Thread YIRAN LI
Hi, Just want to know, what options should I use if want the converted video have an specified average bitrate. Will -b:v enough? do I need minrate maxrate of bufsize? The converted video will only be played on computer, not transmitted over network. And what options should I use if I want averag

[Libav-user] pkt duration in MKV

2017-01-29 Thread YIRAN LI
Hi guys, I'm using ffmpeg to mux variable framerate source to MKV format, each frame I send to av_write_frame has correct timestamp and duration set. Because it's variable frame rate source, I set codecctx->time_base = 1/1000 (because timestamp is in miliseconds) The generated MKV file however,

Re: [Libav-user] formats that support variable frame rate

2017-01-29 Thread YIRAN LI
2017-01-30 9:51 GMT+11:00 YIRAN LI : > > > 2017-01-24 15:54 GMT+11:00 YIRAN LI : > >> >> >> 2017-01-24 10:57 GMT+11:00 Carl Eugen Hoyos : >> >>> 2017-01-23 18:31 GMT+01:00 John Stebbins : >>> > What I know about muxers is: >>> >

Re: [Libav-user] formats that support variable frame rate

2017-01-29 Thread YIRAN LI
2017-01-24 15:54 GMT+11:00 YIRAN LI : > > > 2017-01-24 10:57 GMT+11:00 Carl Eugen Hoyos : > >> 2017-01-23 18:31 GMT+01:00 John Stebbins : >> > What I know about muxers is: >> > >> > MP4,MOV - yes >> >> Just to make sure: >> libavfo

Re: [Libav-user] formats that support variable frame rate

2017-01-23 Thread YIRAN LI
2017-01-24 10:57 GMT+11:00 Carl Eugen Hoyos : > 2017-01-23 18:31 GMT+01:00 John Stebbins : > > What I know about muxers is: > > > > MP4,MOV - yes > > Just to make sure: > libavformat does not support vfr in mov (but avi works fine) > > ​Hi Carl, This is the mov file I generated with ffmpeg-2.2.1

[Libav-user] formats that support variable frame rate

2017-01-22 Thread YIRAN LI
Hi guys, Could anyone help to sort out among following formats, which ones support variable frame rate so that video frames in the file can have variable duration? - MP4, MOV - MPG - AVI - FLV - DV - MKV - OGG - RM - SWF - WEBM Is variable frame rate only a muxer t

[Libav-user] Encode variable framerate source

2017-01-15 Thread YIRAN LI
Hi guys, I now have a sequence of variable duration video frames to encode. Say the time stamps of video frames are 0, 0,1, 0,2, 0.3, 0,4, 0.6, 0.8, 1.0... (duration 0.1 to duration 0.2). Encoder is opened by avcodec_find_encoder. Frames are sent to encoder using avcodec_encode_video. Encoded fra

[Libav-user] Detect framerate mode

2017-01-08 Thread YIRAN LI
Hi guys, May I know if there's any way to tell if a video stream is fixed frame rate or variable frame rate without decoding and calculating each frame's time stamp explicitly? Thanks ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/m

Re: [Libav-user] How to estimate output bitrate

2016-11-29 Thread YIRAN LI
2016-11-29 22:16 GMT+11:00 Carl Eugen Hoyos : > 2016-11-29 1:58 GMT+01:00 YIRAN LI : > > > For example if my input is a 500kbps, 640x480 video, will setting average > > output bitrate to 1000kbps enough? > > Enough for what? > > I don't think your question can b

[Libav-user] How to estimate output bitrate

2016-11-28 Thread YIRAN LI
Hi, As we know many encoders have both target quality and target bitrate rate control mode. I just want to know, is there a proper way to estimate the target average bitrate so that output quality is very close to input. For example if my input is a 500kbps, 640x480 video, will setting average ou

Re: [Libav-user] timebase settings when muxing

2016-11-16 Thread YIRAN LI
2016-11-16 23:27 GMT+11:00 Carl Eugen Hoyos : > 2016-11-16 13:03 GMT+01:00 YIRAN LI : > > could you play the asf with ffplay. The video playback is slow > > in ffplay. Does that mean there's a problem in the asf file? > > Yes, the audio timestamps are missing. > How w

Re: [Libav-user] timebase settings when muxing

2016-11-16 Thread YIRAN LI
2016-11-16 21:01 GMT+11:00 Carl Eugen Hoyos : > 2016-11-16 7:37 GMT+01:00 YIRAN LI : > > > https://dl.dropboxusercontent.com/u/89678527/big_buck_bunny.wmv > > This video when used with ffprobe -show_frames -select_streams v, it > > can show correct number of frames(about

[Libav-user] timebase settings when muxing

2016-11-15 Thread YIRAN LI
Hi, I'm using ffmpeg to mux to ASF format, but the generated file has a little problem. https://dl.dropboxusercontent.com/u/89678527/big_buck_bunny.wmv This video when used with ffprobe -show_frames -select_streams v, it can show co

[Libav-user] How to get max/min frame rate from variable frame rate video?

2016-10-31 Thread YIRAN LI
MediaInfo can show max/min frame rate for a variable frame rate video ​ Can I get these info from AVCodec, AVCodecContext or AVFormatContext? Thanks ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user

Re: [Libav-user] multi-thread decoding

2016-10-24 Thread YIRAN LI
2016-10-25 11:51 GMT+11:00 Carl Eugen Hoyos : > 2016-10-25 2:10 GMT+02:00 YIRAN LI : > > > could you help to confirm me, if the command > > "ffmpeg.exe -v error -i a.mp4 -threads 0/1/2/3/4 -f null - 2>error.log" > > can do video decoding ? > > I do

Re: [Libav-user] multi-thread decoding

2016-10-24 Thread YIRAN LI
2016-10-25 11:00 GMT+11:00 Carl Eugen Hoyos : > 2016-10-25 1:55 GMT+02:00 YIRAN LI : > > > > > > 2016-10-25 10:46 GMT+11:00 Carl Eugen Hoyos : > >> > >> 2016-10-25 1:40 GMT+02:00 YIRAN LI : > >> > How can I tell if it's being single-thre

Re: [Libav-user] multi-thread decoding

2016-10-24 Thread YIRAN LI
2016-10-25 10:46 GMT+11:00 Carl Eugen Hoyos : > 2016-10-25 1:40 GMT+02:00 YIRAN LI : > > How can I tell if it's being single-thread > > decoded or multi-thread decoded? > > You decide how many threads decoding should > > use (or you set it to automatic). > >

Re: [Libav-user] multi-thread decoding

2016-10-24 Thread YIRAN LI
2016-10-24 19:49 GMT+11:00 Carl Eugen Hoyos : > 2016-10-24 7:26 GMT+02:00 YIRAN LI : > > > I'm researching the impact multi-thread decoding may have on memory > usage. > > Does anyone know if enabling multi thread decoding will use more memory ? > > Multi-thre

Re: [Libav-user] multi-thread decoding

2016-10-24 Thread YIRAN LI
2016-10-24 19:49 GMT+11:00 Carl Eugen Hoyos : > 2016-10-24 7:26 GMT+02:00 YIRAN LI : > > > I'm researching the impact multi-thread decoding may have on memory > usage. > > Does anyone know if enabling multi thread decoding will use more memory ? > > Multi-thre

[Libav-user] sws_scale crash

2016-09-14 Thread YIRAN LI
Hi Guys, my program crashes when sws_scale is called. I'm using the function to scale from 1754x789 to 1024x461. I saw in the definition, it says typedef struct AVFrame { #define AV_NUM_DATA_POINTERS 8 /** * pointer to the picture/channel planes. * This might be different from the

[Libav-user] can't decode swf correctly while MPC-HOME could

2016-09-13 Thread YIRAN LI
Hi guys, My MPC-Home could play https://www.dropbox.com/s/6rlz2mx3xwhf5q5/pano5.swf?dl=0 corectly (same as play in Adobe Flash player) But latest ffplay can't play it correctly. Could anyone help to check why. Thanks ___ Libav-user mailing list Libav-

Re: [Libav-user] how to set mjpeg encoding quality programmatically?

2016-06-10 Thread YIRAN LI
2016-06-10 13:32 GMT+10:00 YIRAN LI : > > > 2016-06-09 23:29 GMT+10:00 Carl Eugen Hoyos : > >> YIRAN LI writes: >> >> > AVCodecContext.flags |= CODEC_FLAG_QSCALE >> > and AVCodecContext.global_quality = qscale * FF_QP2LAMBDA, >> > in my case

Re: [Libav-user] how to set mjpeg encoding quality programmatically?

2016-06-09 Thread YIRAN LI
2016-06-09 23:29 GMT+10:00 Carl Eugen Hoyos : > YIRAN LI writes: > > > AVCodecContext.flags |= CODEC_FLAG_QSCALE > > and AVCodecContext.global_quality = qscale * FF_QP2LAMBDA, > > in my case qscale = 3 > > This is correct, qscale 3 ensures (with mpeg-4 asp) a

Re: [Libav-user] how to set mjpeg encoding quality programmatically?

2016-06-08 Thread YIRAN LI
2016-06-09 9:44 GMT+10:00 YIRAN LI : > Hi, > > I'm using command line > > ffmpeg.exe -i a.mp4 -vcodec mjpeg -q:v 3 to encode my video. > > Could anyone tell me how to set the q:v 3 via ffmpeg API programmatically? > > Thanks > ​Hi, searching the mail list

[Libav-user] how to set mjpeg encoding quality programmatically?

2016-06-08 Thread YIRAN LI
Hi, I'm using command line ffmpeg.exe -i a.mp4 -vcodec mjpeg -q:v 3 to encode my video. Could anyone tell me how to set the q:v 3 via ffmpeg API programmatically? Thanks ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/list

[Libav-user] MP3 encoder delay in AVI file

2016-04-20 Thread YIRAN LI
Hi there, Used ffmpeg to encode a video to AVI with H.264+MP3 (libmp3lame). As we know there're delay introduced by LAME. mediainfo can also show this: Does anyone know how to get this delay value from ffmpeg API? AVCodecContext.delay == 0 for audio decoder. Thanks ​ _

[Libav-user] LAME encoder delay

2016-04-12 Thread YIRAN LI
Hi guys, I'm using LAME (standalone executable) to do audio encoding and use ffmpeg for muxing. Until recently I noticed that LAME introduce some encoder delay inside the audio (so that some silence inserted at the beginning of the audio frame) My program also uses ffmpeg API to open file and re

[Libav-user] use q:v and maxrate

2016-04-06 Thread YIRAN LI
Hi guys, I'm encoding videos target a max average bitrate and want to achieve good encoding quality. When I use ffmpeg.exe -i a.mp4 -c:v mpeg4 -profile:v 15 -vtag DIVX -bufsize 308 -maxrate 800 -bt 800 -an a.avi (so that maxbitrate will be 8000kbps), in this case I get a.avi wit

Re: [Libav-user] How to encode Divx video that can be played on Divx certified devices

2016-03-15 Thread YIRAN LI
> YIRAN LI writes: > > > ffmpeg.exe -i big10.mp4 -vcodec mpeg4 -vtag divx -an adivx.avi > > > That means the video is generated using ffmpeg's own > > implementation, not Divxs, right? > > If you call FFmpeg requesting one of the native encoders > you get

Re: [Libav-user] How to encode Divx video that can be played on Divx certified devices

2016-03-10 Thread YIRAN LI
> YIRAN LI writes: > > > Using this tag only changes FourCC value, and the > > converted file actually is still MPEG-4 video. > > Divx is an implementation of mpeg-4 asp. > > Hi Carl, I compared the content generated via ffmpeg command line with/without -vtag di

[Libav-user] How to encode Divx video that can be played on Divx certified devices

2016-03-09 Thread YIRAN LI
Hi, I'm researching how to encode Divx videos playable on Divx certified devices. According to https://trac.ffmpeg.org/wiki/Encode/MPEG-4 all I need to do is specify -vtag divx. Using this tag only changes FourCC value, and the converted file actually is still MPEG-4 video. So I'd like to know

[Libav-user] How to specify static link to libz?

2015-12-30 Thread YIRAN LI
Hi guys, I'm building ffmpeg on Cygwin, I want to enable zlib support so that --enable-zlib is added to configure. I'm building ffmpeg dlls on Winodws and I don't want ffmpeg dlls depends on zlib1.dll so that I should link zlib statically into ffmpeg dlls. Could anyone tell me how to do that? T

Re: [Libav-user] pts < dts error

2015-10-14 Thread YIRAN LI
2015-10-14 22:21 GMT+11:00 Carl Eugen Hoyos : > YIRAN LI writes: > > > But from one file I used I see that PTS == DTS. Could > > this be produced by an encoder configure with non-zero > > max bframes? > > Only if the encoder is broken afaict but I am certainly >

Re: [Libav-user] pts < dts error

2015-10-13 Thread YIRAN LI
2015-10-13 21:17 GMT+11:00 Carl Eugen Hoyos : > YIRAN LI writes: > > > And does this mean, for any encoders that can > > generate B frames, I need to do similar > > pre-processing before calling av_write_frame()? > > No, only for encoders that produce broken pts/dts

Re: [Libav-user] pts < dts error

2015-10-13 Thread YIRAN LI
2015-10-13 21:17 GMT+11:00 Carl Eugen Hoyos : > YIRAN LI writes: > > > And does this mean, for any encoders that can > > generate B frames, I need to do similar > > pre-processing before calling av_write_frame()? > > No, only for encoders that produce broken pts

Re: [Libav-user] pts < dts error

2015-10-13 Thread YIRAN LI
2015-10-13 21:01 GMT+11:00 Carl Eugen Hoyos : > YIRAN LI writes: > > > pts = 0, dts = 0 > > pts = 2, dts = 1 > > > Can someone give any suggestion how to do in this case? > > Add max_bframes (1 in your case) to pts. > > ​Hi Carl, Do you mean add 1 directl

[Libav-user] pts < dts error

2015-10-13 Thread YIRAN LI
Hi Guys, I'm using Window Media Foundation H.264 encoder to encode video frames and use ffmpeg as a muxer. The frames returned by the encoder has following timestamps pts = 0, dts = 0 pts = 2, dts = 1 pts = 1, dts = 2 pts = 4, dts = 3 pts = 3, dts = 4 pts = 6, dts = 5 pts = 5, dts = 6 pts = 8, d

Re: [Libav-user] AMV format

2015-08-12 Thread YIRAN LI
> YIRAN LI writes: > > > $ ffmpeg.exe -i big_buck_bunny.mp4 a.amv > > $ ffmpeg -i input -vcodec amv -acodec adpcm_ima_amv -f avi out.amv > > I suspect the file format may be different from avi > but doesn't have to. Please test and report back. > > Carl Eug

Re: [Libav-user] AMV format

2015-08-12 Thread YIRAN LI
those hardwares for which amv are targeted? The other thing is, as far as I remember, ffmpeg only has adpcm_ima_amv decoder but no encoder, is that correct? Thanks 2015-08-12 18:48 GMT+10:00 Carl Eugen Hoyos : > YIRAN LI writes: > > > $ ffmpeg.exe -i big_buck_bunny.mp4 a.amv > &

[Libav-user] AMV format

2015-08-12 Thread YIRAN LI
Hi Guys, I was assigned a task to investigate the "amv" format. I checked the wiki page and it's said that ffmpeg supports decode and encode amv video. https://en.wikipedia.org/wiki/AMV_video_format But when I ran ffmpeg command line tool to convert a mp4 to amv, I met this $ ffmpeg.exe -i big_

[Libav-user] x264 encoder settings

2015-02-16 Thread YIRAN LI
Hi, I'm trying to use ffmpeg to stream rtmp streams to Youtube. Youtube recommends below settings for x264 encoder: Frame types:Progressive Scan, 2 B-Frames, 1 Reference FrameI'm not sure what the "2 B-Frames, 1 Reference Frame" mean. Could anyone let me know their meaning and how to set them in

[Libav-user] using librtmp to stream to Youtube live

2015-01-05 Thread YIRAN LI
Hi guys, I'm now planning to add Youtube streaming feature into my program. It already has the ability to capture from a webcam and save to a MP4 file using ffmpeg. As we know ffmpeg command line tool can be used to stream to Youtube live directly, just replace the normal file name with an URL st

Re: [Libav-user] Can I skip some packets when decoding

2014-12-09 Thread YIRAN LI
> > > Le 9 déc. 2014 à 08:12, YIRAN LI a écrit : > > Hi, > > I have a question about read frame, > > Suppose I've just opened a file, so the readpointer is at the beginning of > the file. > > Compare these two methods: > > 1. call av_read_frame + a

[Libav-user] Can I skip some packets when decoding

2014-12-08 Thread YIRAN LI
Hi, I have a question about read frame, Suppose I've just opened a file, so the readpointer is at the beginning of the file. Compare these two methods: 1. call av_read_frame + avcode_decode_video2 to decode 100 video packets( suppose each packet can decode into a frame) 2. call av_read_frame, b

[Libav-user] How to stream via HTTP to some destination receiver?

2014-11-18 Thread YIRAN LI
Hi guys, VLC has a functionality to stream to a HTTP address so that any machine can open that network address to view the stream. Now I'm looking for the similar functionality in ffmpeg to stream ogg stream but couldn't find it. The command line I've used was: $ ffmpeg.exe -rtbufsize 1500M -f

Re: [Libav-user] using avpicture_deinterlace

2014-09-22 Thread YIRAN LI
> Hendrik Leppkes writes: > > > Our program is using avpicture_deinterlace > > to deinterlace frames. > > This sounds like a bad idea, use yadif instead. > > > if it's interlaced_frame field is true, we > > can avpicture_deinterlace to deinterlace it. > > This is also a bad idea: the interlaced_fr

[Libav-user] using avpicture_deinterlace

2014-09-22 Thread YIRAN LI
Hi there, I have some questions for the deprecated avpicture_deinterlace function in ffmpeg. Our program is using avpicture_deinterlace to deinterlace frames. For every video packet, avcodec_decode_video2 is called to get a complete frame, and if it's interlaced_frame field is true, we can avpic

Re: [Libav-user] what -f psp does

2014-09-04 Thread YIRAN LI
Good, many thanks :D 2014-09-05 14:03 GMT+10:00 Geek.Song : > On Fri, Sep 5, 2014 at 11:52 AM, YIRAN LI wrote: > > So it's not like target which I know automatically apply resolution, > > bitrate, framerate at least on DVD output. So with -f, you need to > manuall

Re: [Libav-user] what -f psp does

2014-09-04 Thread YIRAN LI
So it's not like target which I know automatically apply resolution, bitrate, framerate at least on DVD output. So with -f, you need to manually supply all needed arguments. 2014-09-05 13:48 GMT+10:00 Geek.Song : > On Fri, Sep 5, 2014 at 11:40 AM, YIRAN LI wrote: > > Hi, >

[Libav-user] what -f psp does

2014-09-04 Thread YIRAN LI
Hi, I found in libavformat/movenc.h there's *#define MODE_PSP 0x08 // example working PSP command line:* *// ffmpeg -i testinput.avi -f psp -r 14.985 -s 320x240 -b 768 -ar 24000 -ab 32 M4V1.MP4* As I know, ffmpeg -f is used to force output format, but if we still need to set frame rate, re

Re: [Libav-user] sws_scale crash

2014-06-19 Thread YIRAN LI
> YIRAN LI writes: > > > Hi, I met a crash when using sws_scale. So I'd like to see > > if anyone can help me here. > > Source code, backtrace and FFmpeg version information missing. > > Thanks Carl, I think it's not a bug of ffmpeg and the source AVFrame

[Libav-user] sws_scale crash

2014-06-19 Thread YIRAN LI
Hi, I met a crash when using sws_scale. So I'd like to see if anyone can help me here. The input is a 1754x789 RGB24 image and I want to scale to 1280x576 swscontext is created successfully. I create my own buffer to hold the image data, because it's RGB24 so the byteswith is 5264 (16 aligned) s

[Libav-user] about av_seek_frame

2014-05-28 Thread YIRAN LI
Hi friends, here I have a question for av_seek_frame function. Say if I have a stream whose duration is 10s, and avformatcontext.start_time != 0 (let's assume it's 5s). So now if I want to seek to the start of the video, should I call av_seek_frame(0) or av_seek_frame(5s) ? Thanks __

[Libav-user] dependency on external libs on Mac

2014-05-09 Thread YIRAN LI
Hi I'm building ffmpeg-2.2.2 with libspeex on Mac. Libspeex is built using ./configure --enable-shared --prefix=/Users/liyiran/test/libs Ffmpeg is built using ./configure --enable-shared --disable-static --extra-cflags="-I/Users/liyiran/test/libs/include" --extra-ldflags="-L/Users/liyiran/test/l

[Libav-user] How to do delay load on MacOS

2014-05-06 Thread YIRAN LI
Hi, I'm trying to build ffmpeg with some external libraries for Mac. I'd like to build dynamic libraries, and also I want to do delay load. So external libraries will only be needed when they're actually referenced by ffmpeg. I'm not family with MacOS and I only know there's things called weak-l

Re: [Libav-user] how to delay load external dlls

2014-04-23 Thread YIRAN LI
> > ffmpeg doesn't implement something this specific and questionable. I > mean, do you really expect that it goes out of its way to support such a > really strange and complicated use-case? > > Unless you use libavcodec for encoding, you'll actually be fine without > external libraries. > >> Tha

[Libav-user] how to delay load external dlls

2014-04-23 Thread YIRAN LI
Hi, I'm building ffmpeg for Windows under MinGW. What I want to achieve is build ffmpeg with some dynamic external libraries so that only when a specific dll is needed will be be downloaded and run. I was able to build ffmpeg with dynamic external libraries, but by default, libavcodec.dll can't b

[Libav-user] How to enable one encoder with all others disabled?

2014-04-08 Thread YIRAN LI
Hi I want to configure ffmpeg to enable only one encoder but disable all rest encoders. I tried this way ./configure --disable-encoders --enable-encoder=aac seems it doesn't work. So is there any way to configure without explicitly listing all encoder names Thanks _

[Libav-user] what's ffmpeg parser?

2014-04-07 Thread YIRAN LI
Hi By ./configure -help I found these: --enable-parser=NAME enable parser NAME --disable-parser=NAMEdisable parser NAME --disable-parsersdisable all parsers may I know what are the parsers? Will --disable-parsers cause decoding fail? Thanks ___

Re: [Libav-user] reduce dll size

2014-03-27 Thread YIRAN LI
Sorry for top posting, email mistakenly sent before finished :D As I said in last mail, statically linked external objects are quite small in avcodec, and all other reference like strlen strcpy is to msvcrt.dll, so I think the answer to common code duplication in dlls is no. So the options I have

Re: [Libav-user] reduce dll size

2014-03-27 Thread YIRAN LI
Hi friends, Here are some update. I added a --extra-ldflags=-Wl,-Map=out.map as configure option and then was able to generate the map file. And from it I can see that .text and .rdata sections occupy most space of the dll. Since map file also tells which object file introduces how much space into

[Libav-user] Will --extra-ldflags=ELDFLAGS be added to each library build?

2014-03-26 Thread YIRAN LI
Hi, I added a --extra-ldflags=-Wl,-Map=out.map when configure, and then build shared libraries. When build finishes, I got an out.map in root folder, and no map file in component folder. I added this option to check what's inside each dll. I didn't build any execuatble so I assume there should b

Re: [Libav-user] reduce dll size

2014-03-26 Thread YIRAN LI
Yes, there definitely is some amount of duplication with multiple DLLs. You can easily find the amount of overhead, in a supported way. Build your project with static version of ffmpeg libraries, and compare the size of your binary with the size of binary you have now (which is built with libavcode

Re: [Libav-user] reduce dll size

2014-03-24 Thread YIRAN LI
> I'm trying to build all components into one dll, because my manager > insisted that building into a single dll may save space by avoiding > build duplicated code into separate dlls. How is this supposed to work? Or, to rephrase: What are the duplicated code parts that you found in different FFm

Re: [Libav-user] reduce dll size

2014-03-24 Thread YIRAN LI
> YIRAN LI writes: > > > I'm trying to build all components into one dll, because my manager > > insisted that building into a single dll may save space by avoiding > > build duplicated code into separate dlls. > > How is this supposed to work? > > Or,

Re: [Libav-user] reduce dll size

2014-03-23 Thread YIRAN LI
Note that combining libavcodec and libavformat into one library is not supported here, if you do it, please do not ask for support;-) (You may of course ask for support if your particular configure line does not work the way you need it: Just post it and tell us what doesn't work.) Hi Carl, I'm t

[Libav-user] How to build static libs for Windows

2014-03-12 Thread YIRAN LI
Hi all, I'm looking for a way to generate ffmpeg static libs for Windows (not import .libs + dll) so that my application no longer needs dlls. If I configure with --enable-static --disable-shared, then I can only get .a files (compiled under both MinGW and VS2013). I'm not sure if these .a files

Re: [Libav-user] reduce dll size

2014-03-06 Thread YIRAN LI
Hi All, I had a try on ffmpeg 2.0.1 with this options --disable-static --enable-shared --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-network --disable-avfilter --disable-avdevice --enable-small --enable-memalign-

Re: [Libav-user] reduce dll size

2014-03-04 Thread YIRAN LI
2014-03-04 22:21 GMT+11:00 Carl Eugen Hoyos : > YIRAN LI writes: > > > I think our dlls were built with --disable-debug on. > > Yes, 8MB is the size of the stripped binary, the > debug binaries would be several times as big. > Sorry for the confusion. > > If

Re: [Libav-user] reduce dll size

2014-03-04 Thread YIRAN LI
Sorry Carl, I think our dlls were built with --disable-debug on. Any way I'll have a try and check size difference with this option on and off. Thanks 2014-03-04 20:14 GMT+11:00 YIRAN LI : > Thanks Carl, I'll have a try! > > > 2014-03-04 20:09 GMT+11:00 Carl Eugen Hoyos

Re: [Libav-user] reduce dll size

2014-03-04 Thread YIRAN LI
Thanks Carl, I'll have a try! 2014-03-04 20:09 GMT+11:00 Carl Eugen Hoyos : > YIRAN LI writes: > > > Do you know is there any options in configuration > > to let the ffmpeg make system strip for us? > > If you cannot call "strip" yourself, configur

Re: [Libav-user] reduce dll size

2014-03-03 Thread YIRAN LI
Thanks Camera Man, Do you know is there any options in configuration to let the ffmpeg make system strip for us? Thanks 2014-03-04 15:24 GMT+11:00 Camera Man : > On 03/04/2014 12:58 AM, YIRAN LI wrote: > > > > Hi, > > > > I'm building ffmpeg dlls for Windows

Re: [Libav-user] reduce dll size

2014-03-03 Thread YIRAN LI
Great thanks Carl, Could you also let me know how to strip the Windows dll, I have no experience on this :D. Of course I'll also try to work it out myself. Thanks 2014-03-04 11:14 GMT+11:00 Carl Eugen Hoyos : > YIRAN LI writes: > > > I'm building ffmpeg dlls for Wi

Re: [Libav-user] reduce dll size

2014-03-03 Thread YIRAN LI
And can anyone let me know, if there're reused/duplicate code among dlls, if so, is it possible to build one dll instead of separated ones to save space? Thanks 2014-03-04 10:45 GMT+11:00 YIRAN LI : > Thanks friends. > > Any other options? Because the largest dll is libavcode

Re: [Libav-user] reduce dll size

2014-03-03 Thread YIRAN LI
Thanks friends. Any other options? Because the largest dll is libavcode, and infact I only need all decoders + selected encoders, so will disabling those unneeded encoders save me spaces? Thanks 2014-03-04 10:18 GMT+11:00 Don Moir : > >From: YIRAN LI > >To: This list is

[Libav-user] reduce dll size

2014-03-03 Thread YIRAN LI
Hi, I'm building ffmpeg dlls for Windows using MingW, and the dlls I got seems quite large. libavcodec 8 MB and libavformat 1.5 MB. Firstly may I know, since ffmpeg is built into several dlls, is it possible that same code got built into each dll so that there're some unnecessary waste? Is it pos

[Libav-user] About av_seek_frame flag

2014-02-27 Thread YIRAN LI
Hi I'm using av_seek_frame with AVSEEK_FLAG_BACKWARD flag and I'd like to know, if I specified a position beyond the duration (I use avstream.duration to init the time line), will av_seek_frame with AVSEEK_FLAG_BACKWARD guarantee to seek to a position from where I can read at least one frame. In

[Libav-user] Is AVSteam.duration accurate enough?

2014-02-26 Thread YIRAN LI
Hi, Can anyone help to explain which duration is more accurate. 1. duration from the avstream object 2. read out all packets from that avstream, find the max pts. Thanks ___ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listin

  1   2   >