Code Monkey home page Code Monkey logo

avcut's Introduction

avcut

avcut is a ffmpeg-based video cutter that is able to do frame-accurate cuts of h264 streams (and possibly other codecs with or without inter-frame prediction) without reencoding the complete stream.

avcut always buffers a so-called group of pictures (GOP) and either copies all of the packets, if no cutting point lies in the corresponding time interval, or reencodes the frames of the GOP before or after the cutting point in order to resolve dependencies on frames that will be removed from the stream. Please see this blog article for a detailed description.

Please note:

  • This is an experimental version. Please check any resulting video if everything worked as intended. If you need a more mature solution, check avidemux.
  • You can specify an arbitrary output container that is supported by ffmpeg. However, avcut has only been tested with the Matroska (.mkv) container.

Dependencies

Compilation

Install dependencies:

  • For Ubuntu with ffmpeg:

    • apt-get install libavcodec-dev libavformat-dev libavutil-dev
  • Gentoo:

    • emerge media-video/ffmpeg

Execute make to start building avcut. Execute make debug to build avcut with verbose output and debug symbols.

Windows executable

An experimental Windows executable is provided as part of the CI artifacts. This executable is dynamically linked against the ffmpeg libraries from BtbN/FFmpeg-Builds. The URL to the specific ffmpeg build is stored in the avcut_ffmpeg_libs_url.txt file. Please place the DLLs from the bin/ folder of the ffmpeg build in the same directory as avcut.exe.

Usage

Usage: avcut [options] [<drop_from_ts> <continue_with_ts> ...]

Options:

  -c              Create a shell script to check cutpoints with mpv
  -d <diff>       Accept this difference in packet sizes during packet matching
  -e <encoder>    select video encoder by name manually
  -f <framecount> provide the approximate total frame count to show progress information
  -i <file>       Input file
  -o <file>       Output file
  -p <profile>    Use this encoding profile. If <profile> ends with ".profile",
                  <profile> is used as a path to the profile file. If not, the profile
                  is loaded from the default profile directory:
                     /usr/share/avcut/profiles/
  -s <index>      Skip stream with this index
  -v <level>      Set verbosity level (see https://www.ffmpeg.org/doxygen/2.8/log_8h.html)

Besides the input and output file, avcut expects a "blacklist", i.e. what should be dropped, as argument. This blacklist consists of timestamps that denote from where to where frames have to be dropped. The last argument can be a hyphen to indicate that all remaining frames shall be dropped.

For example, to drop the frames of the first 10 seconds, the frames between 55.5s and 130s and all frames after 140s in input.avi and write the result to output.mkv, the following command can be used:

avcut -i input.avi -o output.mkv 0 10 55.5 130 140 -

The option -c causes avcut to create a shell script in the current working directory that will call mpv to play the video from 10 seconds before to 10 seconds after each cutting point.

avcut's People

Contributors

anyc avatar baskerville avatar billie80 avatar gcurse avatar monarc99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avcut's Issues

Windows Build?

sorry if this is the wrong place for this, but could there be a windows exe provided?

hw encoder picked up on termux, fails

On termux (Android 11, aarch64) :

./avcut -i ~/f9518976.mp4 -o f9.mp4 0 2
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/data/data/com.termux/files/home/f9518976.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2021-04-16T13:01:39.000000Z
    com.android.version: 10
  Duration: 00:00:24.40, start: 0.000000, bitrate: 17035 kb/s
  Stream #0:0[0x1](eng): Video: h264 (Baseline) (avc1 / 0x31637661), yuv420p(tv, unknown/bt470bg/unknown, progressive), 1920x1080, 16774 kb/s, SAR 1:1 DAR 16:9, 29.55 fps, 29.61 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2021-04-16T13:01:39.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
    Side data:
      displaymatrix: rotation of -90.00 degrees
  Stream #0:1[0x2](eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default)
    Metadata:
      creation_time   : 2021-04-16T13:01:39.000000Z
      handler_name    : SoundHandle
      vendor_id       : [0][0][0][0]
[h264_mediacodec @ 0xb4000074ad363e40] Use 30 as the default MediaFormat frame-rate
[h264_mediacodec @ 0xb4000074ad363e40] Use 1 as the default MediaFormat i-frame-interval, please set gop_size properly (>= fps)
[amediacodec_ndk @ 0xb40000747d3670d0] Encoder configure failed, -10000
[h264_mediacodec @ 0xb4000074ad363e40] MediaCodec configure failed, Generic error in an external library
Failed to open encoder for stream 0, error -542398533

It will be useful if there was way to filter out / blacklist some encoders?

avcut does not work with the new OTR-HD format

OTR is currently implementing a new HD-Format.
When trying to cut these files with avcut, it ends with this error:

Input #0, avi, from '/volume1/video/_synOTR/_decodiert/Wunderwelt_Erde_20.03.31_11-00_arte_45_TVOON_DE.mpg.HD.avi': 
Metadata: 
    comment         :  
    encoder         : Lavf58.42.100
    encoded_by      : www.onlinetvrecorder.com
  Duration: 01:00:48.52, start: 0.000000, bitrate: 2277 kb/s
    Stream #0:0: Video: h264 (Main) (H264 / 0x34363248), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 2067 kb/s, 50 fps, 50 tbr, 50 tbn, 100 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, s16p, 192 kb/s
Settings from profile:
  Preset: medium
  Tune: film
  x264opts: direct=auto:aq-mode=3:force-cfr=1:b-adapt=2:rc-lookahead=60:weightp=0
[libx264 @ 0x2bbb840] using SAR=1/1
[libx264 @ 0x2bbb840] using cpu capabilities: none!
[libx264 @ 0x2bbb840] profile Main, level 3.2
Output #0, avi, to '/volume1/video/_synOTR/Wunderwelt_Erde_20.03.31_11-00_arte_45_TVOON_DE.mpg.HD.avi-cut.avi':
  Metadata:
    comment         :  
    encoder         : Lavf58.42.100
    encoded_by      : www.onlinetvrecorder.com
    Stream #0:0: Video: h264 (libx264), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 50 tbn, 100 tbc
    Stream #0:1: Audio: mp3, 48000 Hz, stereo, s16p, 192 kb/s
size mismatch 249:6238 247:3863 (diff: 0, try: -2375)
packet for frame 249 (cpn 249) not found

Would a customized profile be sufficient to correct this error?
Unfortunately I have no idea which parameters are necessary for this.

Corrupt video.

I've just tried avcut which is a brilliant idea, but it is resulting in videos that are corrupt when trying to seek back and forth. How can this be corrected?

Could not find tag for codec none in stream #2

When testing with the big buck bunny video I'm getting an error about codec none in stream #2.
http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4

I also got errors with ogv and webm:
http://clips.vorwaerts-gmbh.de/big_buck_bunny.ogv
http://clips.vorwaerts-gmbh.de/big_buck_bunny.webm

I don't really need support for all the codecs, just used this video when trying to reproduce another bug.

./avcut/avcut big_buck_bunny.mp4 test.mp4  3 5
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'big_buck_bunny.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42avc1
    creation_time   : 2010-02-09 01:55:39
  Duration: 00:01:00.10, start: 0.000000, bitrate: 733 kb/s
    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 22050 Hz, stereo, fltp, 65 kb/s (default)
    Metadata:
      creation_time   : 2010-02-09 01:55:39
      handler_name    : Apple Sound Media Handler
    Stream #0:1(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, smpte170m/smpte170m/bt709), 640x360, 612 kb/s, 23.96 fps, 24 tbr, 600 tbn, 1200 tbc (default)
    Metadata:
      creation_time   : 2010-02-09 01:55:39
      handler_name    : Apple Video Media Handler
    Stream #0:2(eng): Data: none (rtp  / 0x20707472), 45 kb/s
    Metadata:
      creation_time   : 2010-02-09 01:55:39
      handler_name    : hint media handler
    Stream #0:3(eng): Data: none (rtp  / 0x20707472), 5 kb/s
    Metadata:
      creation_time   : 2010-02-09 01:55:39
      handler_name    : hint media handler
[libx264 @ 0x11fa440] MB rate (552000) > level limit (40500)
[libx264 @ 0x11fa440] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x11fa440] profile High, level 3.0
[libx264 @ 0x11fa440] 264 - core 142 r2495 6a301b6 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - http://www.videolan.org/x264.html - options: cabac=0 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=dia subme=8 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=4 chroma_me=0 trellis=0 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=0 b_bias=0 direct=1 weightb=1 open_gop=1 weightp=2 keyint=12 keyint_min=7 scenecut=0 intra_refresh=0 rc_lookahead=12 rc=abr mbtree=1 bitrate=612 ratetol=1.0 qcomp=0.50 qpmin=16 qpmax=26 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 0x11f90a0] Could not find tag for codec none in stream #2, codec not currently supported in container
Cannot write header to 'test.mp4', error -22

60-70 "grey" frames

Hello, I like avcut a lot, it is a nice tool running even on my ARM based systems here :-)

From time to time, but rarely I see glitches, e.g. I have an OTR video here which generates at one cut 60-70 frames which are just grey. Is that a know issue?

If not and it helps, I am happy to provide the OTR recording....

Thanks
Rainer

This doesn't compile with newer libavcodec

I get the following errors:
avcut.c:157:31: error: ‘CODEC_FLAG_GLOBAL_HEADER’ undeclared (first use in this function); did you mean ´AV_CODEC_FLAG_GLOBAL_HEADER´?
and
avcut.c:482:93: error: ‘CODEC_CAP_DELAY’ undeclared (first use in this function); did you mean ‘AV_CODEC_CAP_DELAY’?
Two times each.

Seems libavcodec is too new?
libavcodec 58.18.100

The following works for me but I have no idea which lowest version introduced the change:
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58,18,100)
#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
#define CODEC_CAP_DELAY AV_CODEC_CAP_DELAY
#endif
EDIT: Found this: line 38ff. So its version 56.56.0??

'AVFrame' has no member named ...

I get the following errors:

avcut.c:554:19: error: 'AVFrame' has no member named 'pkt_size'
s->frames[j]->pkt_size, s->pkts[i].size,

avcut.c:701:61: error: 'AVFrame' has no member named 'pkt_duration'
int64_t new_pts = sbuffer->last_pts + av_rescale_q(frame->pkt_duration,

Is my version of ffmpeg to old? Can you describe what versions (debian, gcc, ...), are needed to build avcut?

Performance improvment

When you have a long video, it takes minutes to run, even when the dropped segment is very short.

Is it possible to jump to the timestamp and scan backwards/forward until it finds a keyframe instead of scanning the whole file?

AVcut audio sync lost on 1080i cuts

I'm working with a video file recorded using a HDPrime from a cable channel in the US. The channel is being sent using H.264 in 1080i, and is a MPEG transport stream file (.ts). The video frame rate is 29.97. I can use ffmpeg to copy it into a .mp4 container, or just run with the original .ts file (though adjusting the cut timestamps since it doesn't start at zero). Either way I get the same results: The cut file's audio track falls behind significantly; several seconds or more.

I note that the output file says the frame rate is 59.94 when playing it in mplayer, and I see a reference to 28.11 fps, which makes no sense.

ffmpeg -i [file]

Input .ts file:
Program 1
Stream #0:0[0x1dc5]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
Stream #0:10x1dc6: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s

Output file:
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], Closed Captions, 3092 kb/s, 28.11 fps, 59.94 tbr, 90k tbn, 59.94 tbc (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1(eng): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Side data:
audio service type: main

I'm hoping to get this working with MythTV for clipping recordings. I'm testing with an exported cutlist, and the first cut seems to be correct (I'm clipping the start of the file), but later ones are off. I suspect the problem with the sound sync is related, so once that's fixed, I'll move on.

Warning with gcc 8.2

Hi,

this is just a heads-up: I see lots of deprecated warnings when compiling avcut on Debian testing:

rd@h370:/tmp.nobackup/avcut$ make
cc -Wall -DAVCUT_VERSION="0.4" -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -I/usr/include/x86_64-linux-gnu -DAVCUT_PROFILE_DIRECTORY="/usr/share/avcut/profiles/" avcut.c -lavcodec -lavformat -lavutil -o avcut
avcut.c: In function ‘encode_write_frame’:
avcut.c:141:4: warning: ‘pkt_pts’ is deprecated [-Wdeprecated-declarations]
frame->pts, frame->pkt_pts, frame->pkt_dts, frame->pkt_size, av_get_picture_type_char(frame->pict_type),
^~~~~
In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:38,
from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:319:13: note: declared here
int64_t pkt_pts;
^~~~~~~
avcut.c:142:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
frame->pts * av_q2d(ostream->codec->time_base)
^~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:147:2: warning: ‘avcodec_encode_video2’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_encode_video2(ostream->codec, &enc_pkt, frame, &got_frame);
^~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5386:5: note: declared here
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
^~~~~~~~~~~~~~~~~~~~~
avcut.c:147:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_encode_video2(ostream->codec, &enc_pkt, frame, &got_frame);
^~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:158:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
enc_pkt.duration = ostream->codec->ticks_per_frame;
^~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:160:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_packet_rescale_ts(&enc_pkt, ostream->codec->time_base, ostream->time_base);
^~~~~~~~~~~~~~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:166:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (ostream->codec->flags & AV_CODEC_FLAG_GLOBAL_HEADER)
^

In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:167:4: warning: ‘av_bitstream_filter_filter’ is deprecated [-Wdeprecated-declarations]
av_bitstream_filter_filter(pr->bsf_dump_extra, ostream->codec, NULL,
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5791:5: note: declared here
int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
^~~~~~~~~~~~~~~~~~~~~~~~~~
avcut.c:167:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_bitstream_filter_filter(pr->bsf_dump_extra, ostream->codec, NULL,
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c: In function ‘frame_pts2ts’:
avcut.c:195:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
return frame->pts * av_q2d(pr->in_fctx->streams[s->stream_index]->codec->time_base);
^~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c: In function ‘find_packet_for_frame’:
avcut.c:288:5: warning: ‘pkt_pts’ is deprecated [-Wdeprecated-declarations]
s->pkts[i].pts == s->frames[frame_idx]->pkt_pts) ||
^
In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:38,
from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:319:13: note: declared here
int64_t pkt_pts;
^~~~~~~
avcut.c:319:5: warning: ‘pkt_pts’ is deprecated [-Wdeprecated-declarations]
s->frames[frame_idx]->pkt_pts,
^
In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:38,
from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:319:13: note: declared here
int64_t pkt_pts;
^~~~~~~
avcut.c: In function ‘flush_packet_buffer’:
avcut.c:340:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (pr->in_fctx->streams[s->stream_index]->codec->codec_type != AVMEDIA_TYPE_VIDEO) {
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:465:7: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
pr->in_fctx->streams[s->stream_index]->codec->time_base);
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:485:5: warning: ‘av_frame_get_pkt_duration’ is deprecated [-Wdeprecated-declarations]
s->duration_dropped_pkts += av_frame_get_pkt_duration(s->frames[i]);
^
In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:38,
from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:609:9: note: declared here
int64_t av_frame_get_pkt_duration (const AVFrame *frame);
^~~~~~~~~~~~~~~~~~~~~~~~~
avcut.c:491:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (frame_written && pr->out_fctx->streams[s->stream_index]->codec->codec->capabilities & AV_CODEC_CAP_DELAY) {
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:517:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
AVCodecContext *out_cctx = pr->out_fctx->streams[s->stream_index]->codec;
^~~~~~~~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:532:7: warning: ‘pkt_pts’ is deprecated [-Wdeprecated-declarations]
s->pkts[i].pts == s->frames[j]->pkt_pts) ||
^
In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:38,
from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:319:13: note: declared here
int64_t pkt_pts;
^~~~~~~
avcut.c:562:7: warning: ‘pkt_pts’ is deprecated [-Wdeprecated-declarations]
s->frames[j]->pkt_pts,
^
In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:38,
from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:319:13: note: declared here
int64_t pkt_pts;
^~~~~~~
avcut.c:573:6: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
pr->in_fctx->streams[s->stream_index]->codec->time_base,
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:595:5: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (pr->in_fctx->streams[s->stream_index]->codec->opaque &&
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext codec;
^~~~~
avcut.c:596:15: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
((struct codeccontext
) pr->in_fctx->streams[s->stream_index]->codec->opaque)->h264_avcc_format)
^~~~~~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:598:6: warning: ‘av_bitstream_filter_filter’ is deprecated [-Wdeprecated-declarations]
av_bitstream_filter_filter(pr->bsf_h264_to_annexb,
^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5791:5: note: declared here
int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
^~~~~~~~~~~~~~~~~~~~~~~~~~
avcut.c:599:7: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
pr->in_fctx->streams[s->stream_index]->codec, NULL,
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c: In function ‘decode_packet’:
avcut.c:663:2: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
mtype = pr->in_fctx->streams[stream_index]->codec->codec_type;
^~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:672:3: warning: ‘avcodec_decode_video2’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_decode_video2(pr->in_fctx->streams[stream_index]->codec, frame, &got_frame, packet);
^~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4755:5: note: declared here
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
^~~~~~~~~~~~~~~~~~~~~
avcut.c:672:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_decode_video2(pr->in_fctx->streams[stream_index]->codec, frame, &got_frame, packet);
^~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:692:4: warning: ‘av_frame_get_best_effort_timestamp’ is deprecated [-Wdeprecated-declarations]
frame->pts = av_frame_get_best_effort_timestamp(frame);
^~~~~
In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:38,
from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:605:9: note: declared here
int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
avcut.c:701:4: warning: ‘pkt_pts’ is deprecated [-Wdeprecated-declarations]
if (frame->pts == frame->pkt_dts || frame->pts == frame->pkt_pts)
^~
In file included from /usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:38,
from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavutil/frame.h:319:13: note: declared here
int64_t pkt_pts;
^~~~~~~
avcut.c:704:8: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
pr->in_fctx->streams[stream_index]->codec->time_base);
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:712:6: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
pr->in_fctx->streams[stream_index]->codec->time_base);
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c: In function ‘main’:
avcut.c:967:2: warning: ‘av_register_all’ is deprecated [-Wdeprecated-declarations]
av_register_all();
^~~~~~~~~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:2025:6: note: declared here
void av_register_all(void);
^~~~~~~~~~~~~~~
avcut.c:1001:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
codec_ctx = pr->in_fctx->streams[i]->codec;
^~~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1004:3: warning: ‘refcounted_frames’ is deprecated [-Wdeprecated-declarations]
codec_ctx->refcounted_frames = 1;
^~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:2344:9: note: declared here
int refcounted_frames;
^~~~~~~~~~~~~~~~~
avcut.c:1104:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
dec_cctx = pr->in_fctx->streams[i]->codec;
^~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1105:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
enc_cctx = out_stream->codec;
^~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1152:5: warning: ‘avcodec_copy_context’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_copy_context(enc_cctx, dec_cctx);
^~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4162:5: note: declared here
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
^~~~~~~~~~~~~~~~~~~~
avcut.c:1188:4: warning: ‘avcodec_copy_context’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_copy_context(pr->out_fctx->streams[j]->codec, pr->in_fctx->streams[i]->codec);
^~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:4162:5: note: declared here
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
^~~~~~~~~~~~~~~~~~~~
avcut.c:1188:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_copy_context(pr->out_fctx->streams[j]->codec, pr->in_fctx->streams[i]->codec);
^~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1188:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
ret = avcodec_copy_context(pr->out_fctx->streams[j]->codec, pr->in_fctx->streams[i]->codec);
^~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1202:2: warning: ‘av_bitstream_filter_init’ is deprecated [-Wdeprecated-declarations]
pr->bsf_h264_to_annexb = av_bitstream_filter_init("h264_mp4toannexb");
^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5784:27: note: declared here
AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
^~~~~~~~~~~~~~~~~~~~~~~~
avcut.c:1203:2: warning: ‘av_bitstream_filter_init’ is deprecated [-Wdeprecated-declarations]
pr->bsf_dump_extra = av_bitstream_filter_init("dump_extra");
^~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5784:27: note: declared here
AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
^~~~~~~~~~~~~~~~~~~~~~~~
avcut.c:1235:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_log(NULL, AV_LOG_DEBUG, "codec: " DUMP_TB(&pr->in_fctx->streams[i]->codec->time_base));
^~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1235:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_log(NULL, AV_LOG_DEBUG, "codec: " DUMP_TB(&pr->in_fctx->streams[i]->codec->time_base));
^~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1236:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_log(NULL, AV_LOG_DEBUG, "ticks_per_frame: %d\n", pr->in_fctx->streams[i]->codec->ticks_per_frame);
^~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1239:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_log(NULL, AV_LOG_DEBUG, "codec: " DUMP_TB(&pr->out_fctx->streams[j]->codec->time_base));
^~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1239:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_log(NULL, AV_LOG_DEBUG, "codec: " DUMP_TB(&pr->out_fctx->streams[j]->codec->time_base));
^~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1240:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_log(NULL, AV_LOG_DEBUG, "ticks_per_frame: %d\n", pr->out_fctx->streams[j]->codec->ticks_per_frame);
^~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1256:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (pr->out_fctx->streams[j]->codec->time_base.den == 0)
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1260:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
newo = pr->in_fctx->streams[i]->codec->gop_size;
^~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1261:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
newo = 0 - pr->out_fctx->streams[j]->codec->ticks_per_frame *
^~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1262:5: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_rescale_q(newo, pr->out_fctx->streams[j]->codec->time_base, pr->out_fctx->streams[j]->time_base);
^~~~~~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1287:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (pr->in_fctx->streams[packet.stream_index]->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1343:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (!pr->out_fctx->streams[j]->codec->codec || !(pr->out_fctx->streams[j]->codec->codec->capabilities & AV_CODEC_CAP_DELAY))
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1343:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (!pr->out_fctx->streams[j]->codec->codec || !(pr->out_fctx->streams[j]->codec->codec->capabilities & AV_CODEC_CAP_DELAY))
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1368:2: warning: ‘av_bitstream_filter_close’ is deprecated [-Wdeprecated-declarations]
av_bitstream_filter_close(pr->bsf_h264_to_annexb);
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5801:6: note: declared here
void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
^~~~~~~~~~~~~~~~~~~~~~~~~
avcut.c:1369:2: warning: ‘av_bitstream_filter_close’ is deprecated [-Wdeprecated-declarations]
av_bitstream_filter_close(pr->bsf_dump_extra);
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/libavformat/avformat.h:319,
from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavcodec/avcodec.h:5801:6: note: declared here
void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
^~~~~~~~~~~~~~~~~~~~~~~~~
avcut.c:1375:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (pr->out_fctx->streams[j]->codec && avcodec_is_open(pr->out_fctx->streams[j]->codec))
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1375:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (pr->out_fctx->streams[j]->codec && avcodec_is_open(pr->out_fctx->streams[j]->codec))
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1376:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
avcodec_close(pr->out_fctx->streams[j]->codec);
^~~~~~~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1380:3: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (pr->in_fctx->streams[i]->codec) {
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1381:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
av_freep(&pr->in_fctx->streams[i]->codec->opaque);
^~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1382:4: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
if (avcodec_is_open(pr->in_fctx->streams[i]->codec))
^~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
avcut.c:1383:5: warning: ‘codec’ is deprecated [-Wdeprecated-declarations]
avcodec_close(pr->in_fctx->streams[i]->codec);
^~~~~~~~~~~~~
In file included from avcut.c:28:
/usr/include/x86_64-linux-gnu/libavformat/avformat.h:877:21: note: declared here
AVCodecContext *codec;
^~~~~
rd@h370:~/tmp.nobackup/avcut$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.