1

I use FFmpeg to concat 3 mp4 video bribes.

FFbrope show all bribes start with a keyframes and play very well in VLC.

When playing the final video file some artefact appears when a bribe start :

ffmpeg.exe -f concat -i video_bribes.list -codec:v copy -acodec none -movflags faststart -y v_2.mp4

I tried differents options in the concat command line to re encode but artefact are still here.

What can i do to avoid this grey artefact between bribes ?

Thanks.

4
  • What is a bribe? You need to show info about your inputs inside video_bribes.list. Show the complete output of: ffmpeg -i input0 -i input1 -i input2, etc.
    – llogan
    Commented Nov 23, 2015 at 17:43
  • Bribes are smalls chunks of vidéo that are about 12 secondes and video_bribes.list contains path to theses files like explained here : trac.ffmpeg.org/wiki/Concatenate (mylist.txt), i will post the ffmpeg output later.
    – Maypeur
    Commented Nov 23, 2015 at 20:58
  • @aergistal I use last build from zeranoe, i will try with v2.8.2, here is the output ffmpeg : pastebin.com/NYevFBQD
    – Maypeur
    Commented Nov 24, 2015 at 9:48
  • @aergistal i try with different builds (down to 2.5.2) and there are the same artefact between video. In this time i find different bugs who talk about that and say to add -auto_convert 1 but it change nothing for me.
    – Maypeur
    Commented Nov 24, 2015 at 10:59

1 Answer 1

1

I finaly found what was going on !

The problem was at the encoding of the original video chunks.

In my encoding loop i was using this code :

    //-- PTS
    av_packet_rescale_ts(&pkt_video, m_c->time_base, m_video_st->time_base);

    if(m_frame->key_frame)
        pkt_video.flags |= AV_PKT_FLAG_KEY;

    //Write the compressed frame to the media file.
    ret = av_interleaved_write_frame(m_oc, &pkt_video);

And when i remove these two lines :

    if(m_frame->key_frame)
        pkt_video.flags |= AV_PKT_FLAG_KEY;

Everything is fine. Moreover, now i do not see the grey nor at the start of the video, nor between my chunks.

I do not understand because i'm sure that i see these lines in the FFmpeg examples... !

Does anyone can explain me whats the purpose of this AV_PKT_FLAG_KEY; ?

Thanks for your time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.