Recherche avancée

Médias (1)

Mot : - Tags -/ticket

Autres articles (44)

  • Ajouter notes et légendes aux images

    7 février 2011, par

    Pour pouvoir ajouter notes et légendes aux images, la première étape est d’installer le plugin "Légendes".
    Une fois le plugin activé, vous pouvez le configurer dans l’espace de configuration afin de modifier les droits de création / modification et de suppression des notes. Par défaut seuls les administrateurs du site peuvent ajouter des notes aux images.
    Modification lors de l’ajout d’un média
    Lors de l’ajout d’un média de type "image" un nouveau bouton apparait au dessus de la prévisualisation (...)

  • Submit bugs and patches

    13 avril 2011

    Unfortunately a software is never perfect.
    If you think you have found a bug, report it using our ticket system. Please to help us to fix it by providing the following information : the browser you are using, including the exact version as precise an explanation as possible of the problem if possible, the steps taken resulting in the problem a link to the site / page in question
    If you think you have solved the bug, fill in a ticket and attach to it a corrective patch.
    You may also (...)

  • HTML5 audio and video support

    13 avril 2011, par

    MediaSPIP uses HTML5 video and audio tags to play multimedia files, taking advantage of the latest W3C innovations supported by modern browsers.
    The MediaSPIP player used has been created specifically for MediaSPIP and can be easily adapted to fit in with a specific theme.
    For older browsers the Flowplayer flash fallback is used.
    MediaSPIP allows for media playback on major mobile platforms with the above (...)

Sur d’autres sites (8221)

  • FFMPEG TimeCode synchronization

    14 juin 2017, par Spadieri

    I have a problem with the length of a TS video file.

    Use Hauppauge QuadTV HD video capture card,

    ffprobe TS file

    {

    [STREAM]
    index=0
    codec_name=mpeg2video
    codec_long_name=MPEG-2 video
    profile=Main
    codec_type=video
    codec_time_base=1/25
    codec_tag_string=[2][0][0][0]
    codec_tag=0x0002
    width=720
    height=576
    coded_width=0
    coded_height=0
    has_b_frames=1
    sample_aspect_ratio=64:45
    display_aspect_ratio=16:9
    pix_fmt=yuv420p
    level=8
    color_range=tv
    color_space=unknown
    color_transfer=unknown
    color_primaries=unknown
    chroma_location=left
    field_order=tt
    timecode=N/A
    refs=1
    id=0x201
    r_frame_rate=25/1
    avg_frame_rate=25/1
    time_base=1/90000
    start_pts=4090681690
    start_time=45452.018778
    duration_ts=323618400
    duration=3595.760000
    bit_rate=N/A
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=N/A
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    [/STREAM]
    [STREAM]
    index=1
    codec_name=mp2
    codec_long_name=MP2 (MPEG audio layer 2)
    profile=unknown
    codec_type=audio
    codec_time_base=1/48000
    codec_tag_string=[4][0][0][0]
    codec_tag=0x0004
    sample_fmt=s16p
    sample_rate=48000
    channels=2
    channel_layout=stereo
    bits_per_sample=0
    id=0x28b
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/90000
    start_pts=4090672903
    start_time=45451.921144
    duration_ts=323585280
    duration=3595.392000
    bit_rate=192000
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=N/A
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:language=ita
    [/STREAM]
    [STREAM]
    index=2
    codec_name=dvb_teletext
    codec_long_name=DVB teletext
    profile=unknown
    codec_type=subtitle
    codec_tag_string=[6][0][0][0]
    codec_tag=0x0006
    width=N/A
    height=N/A
    id=0x241
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/90000
    start_pts=4090655137
    start_time=45451.723744
    duration_ts=323611200
    duration=3595.680000
    bit_rate=N/A
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=N/A
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:language=ita
    [/STREAM]
    [STREAM]
    index=3
    codec_name=mp2
    codec_long_name=MP2 (MPEG audio layer 2)
    profile=unknown
    codec_type=audio
    codec_time_base=1/48000
    codec_tag_string=[4][0][0][0]
    codec_tag=0x0004
    sample_fmt=s16p
    sample_rate=48000
    channels=1
    channel_layout=mono
    bits_per_sample=0
    id=0x2b7
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/90000
    start_pts=4090668157
    start_time=45451.868411
    duration_ts=323589600
    duration=3595.440000
    bit_rate=64000
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=N/A
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:language=Oth
    [/STREAM]
    [STREAM]
    index=4
    codec_name=mp2
    codec_long_name=MP2 (MPEG audio layer 2)
    profile=unknown
    codec_type=audio
    codec_time_base=1/48000
    codec_tag_string=[4][0][0][0]
    codec_tag=0x0004
    sample_fmt=s16p
    sample_rate=48000
    channels=2
    channel_layout=stereo
    bits_per_sample=0
    id=0x2b8
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/90000
    start_pts=4090663971
    start_time=45451.821900
    duration_ts=323585280
    duration=3595.392000
    bit_rate=192000
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=N/A
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    TAG:language=eng
    [/STREAM]
    [STREAM]
    index=5
    codec_name=unknown
    codec_long_name=unknown
    profile=unknown
    codec_type=unknown
    codec_tag_string=[5][0][0][0]
    codec_tag=0x0005
    id=0x7d2
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/90000
    start_pts=4090655137
    start_time=45451.723744
    duration_ts=323644953
    duration=3596.055033
    bit_rate=N/A
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=N/A
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    [/STREAM]
    [STREAM]
    index=6
    codec_name=unknown
    codec_long_name=unknown
    profile=unknown
    codec_type=unknown
    codec_tag_string=[11][0][0][0]
    codec_tag=0x000b
    id=0xbb9
    r_frame_rate=0/0
    avg_frame_rate=0/0
    time_base=1/90000
    start_pts=4090655137
    start_time=45451.723744
    duration_ts=323644953
    duration=3596.055033
    bit_rate=N/A
    max_bit_rate=N/A
    bits_per_raw_sample=N/A
    nb_frames=N/A
    nb_read_frames=N/A
    nb_read_packets=N/A
    DISPOSITION:default=0
    DISPOSITION:dub=0
    DISPOSITION:original=0
    DISPOSITION:comment=0
    DISPOSITION:lyrics=0
    DISPOSITION:karaoke=0
    DISPOSITION:forced=0
    DISPOSITION:hearing_impaired=0
    DISPOSITION:visual_impaired=0
    DISPOSITION:clean_effects=0
    DISPOSITION:attached_pic=0
    DISPOSITION:timed_thumbnails=0
    [/STREAM]

    }

    steps :

    1°- demux con ProjectX
    output :
    video.m2v (25 fps)
    audio.mp2

    ffmprobe video.m2v
    {


    [STREAM]
       index=0
       codec_name=mpeg2video
       codec_long_name=MPEG-2 video
       profile=Main
       codec_type=video
       codec_time_base=1/25
       codec_tag_string=[0][0][0][0]
       codec_tag=0x0000
       width=720
       height=576
       coded_width=0
       coded_height=0
       has_b_frames=1
       sample_aspect_ratio=64:45
       display_aspect_ratio=16:9
       pix_fmt=yuv420p
       level=8
       color_range=tv
       color_space=unknown
       color_transfer=unknown
       color_primaries=unknown
       chroma_location=left
       field_order=progressive
       timecode=N/A
       refs=1
       id=0x1e0
       r_frame_rate=25/1
       avg_frame_rate=25/1
       time_base=1/90000
       start_pts=48600
       start_time=0.540000
       duration_ts=322970400
       duration=3588.560000
       bit_rate=N/A
       max_bit_rate=N/A
       bits_per_raw_sample=N/A
       nb_frames=N/A
       nb_read_frames=N/A
       nb_read_packets=N/A
       DISPOSITION:default=0
       DISPOSITION:dub=0
       DISPOSITION:original=0
       DISPOSITION:comment=0
       DISPOSITION:lyrics=0
       DISPOSITION:karaoke=0
       DISPOSITION:forced=0
       DISPOSITION:hearing_impaired=0
       DISPOSITION:visual_impaired=0
       DISPOSITION:clean_effects=0
       DISPOSITION:attached_pic=0
       DISPOSITION:timed_thumbnails=0
       [/STREAM]

    }

    2° - Burn TimeCode with ffmpeg

    CL : "ffmpeg -i video.m2v -c:v mpeg2video -vf "drawtext=fontfile=courier.ttf: timecode='00\:00\:00\:00': r=25: x=10: y=10: fontcolor=white: box=1: fontsize=50: boxcolor=0x00000099" output.mpeg"

    ffmpeg output:
    {


    ffmpeg version N-85604-g207e6de Copyright (c) 2000-2017 the FFmpeg developers
       built with gcc 6.3.0 (GCC)
       configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
       libavutil      55. 61.100 / 55. 61.100
       libavcodec     57. 93.100 / 57. 93.100
       libavformat    57. 72.101 / 57. 72.101
       libavdevice    57.  7.100 / 57.  7.100
       libavfilter     6. 86.100 /  6. 86.100
       libswscale      4.  7.101 /  4.  7.101
       libswresample   2.  8.100 /  2.  8.100
       libpostproc    54.  6.100 / 54.  6.100
       Input #0, mpegvideo, from 'R2_TG2_20170607_13001.m2v':
       Duration: N/A, bitrate: N/A
       Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 1200k tbn, 50 tbc
       Stream mapping:
       Stream #0:0 -> #0:0 (mpeg2video (native) -> mpeg2video (native))
       Press [q] to stop, [?] for help
       [mpeg @ 00000000025eb760] VBV buffer size not set, using default size of 130KB
       If you want the mpeg file to be compliant to some specification
       Like DVD, VCD or others, make sure you set the correct buffer size
       Output #0, mpeg, to 'output.mpeg':
       Metadata:
       encoder         : Lavf57.72.101
       Stream #0:0: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 90k tbn, 25 tbc
       Metadata:
         encoder         : Lavc57.93.100 mpeg2video
       Side data:
         cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
       [mpeg2video @ 0000000002625020] ac-tex damaged at 1 3027.24 bitrate= 879.1kbits/s speed=  39x
       [mpeg2video @ 0000000002625020] Warning MVs not available
       [mpeg2video @ 0000000002625020] concealing 45 DC, 45 AC, 45 MV errors in I frame
       [mpeg2video @ 0000000002625020] Warning MVs not available56 bitrate= 846.8kbits/s speed=39.1x
       [mpeg2video @ 0000000002625020] concealing 1 DC, 1 AC, 1 MV errors in B frame
       frame=89714 fps=974 q=31.0 Lsize=  332412kB time=00:59:48.52 bitrate= 758.8kbits/s speed=  39x
       video:329859kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.774119%

    }

    As seen from the screenshots there are 14 frames of difference, and later rise to 35

    Can frames be damaged and ffmpeg skip them ?

    The video for the first 13 minutes is perfectly synchronized

    OriginalFrame Time

    OutputFrame Time

    3° - remux [output.mmpeg] with original audio [audio.mp2]

    CL: "ffmpeg -i output.mpeg -i originalAudio.mp2 -c:a copy -c:v copy finalOutput.mpeg"

    ffmpeg output:
    {


    ffmpeg version N-85604-g207e6de Copyright (c) 2000-2017 the FFmpeg developers
       built with gcc 6.3.0 (GCC)
       configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
       libavutil      55. 61.100 / 55. 61.100
       libavcodec     57. 93.100 / 57. 93.100
       libavformat    57. 72.101 / 57. 72.101
       libavdevice    57.  7.100 / 57.  7.100
       libavfilter     6. 86.100 /  6. 86.100
       libswscale      4.  7.101 /  4.  7.101
       libswresample   2.  8.100 /  2.  8.100
       libpostproc    54.  6.100 / 54.  6.100
       Input #0, mpeg, from 'output.mpeg':
       Duration: 00:59:48.56, start: 0.540000, bitrate: 758 kb/s
       Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
       [mp3 @ 0000000002894980] Estimating duration from bitrate, this may be inaccurate
       Input #1, mp3, from 'R2_TG2_20170607_13001.mp2':
       Duration: 00:59:48.55, start: 0.000000, bitrate: 192 kb/s
       Stream #1:0: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
       [mpeg @ 000000000289a880] VBV buffer size not set, using default size of 130KB
       If you want the mpeg file to be compliant to some specification
       Like DVD, VCD or others, make sure you set the correct buffer size
       Output #0, mpeg, to 'finalOutput.mpeg':
       Metadata:
       encoder         : Lavf57.72.101
       Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x576 [SAR 64:45 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
       Stream #0:1: Audio: mp2, 48000 Hz, stereo, s16p, 192 kb/s
       Stream mapping:
       Stream #0:0 -> #0:0 (copy)
       Stream #1:0 -> #0:1 (copy)
       Press [q] to stop, [?] for help
       [mpeg @ 000000000289a880] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
       frame=89714 fps=26872 q=-1.0 Lsize=  417232kB time=00:59:48.52 bitrate= 952.5kbits/s speed=1.07e+003x
       video:329859kB audio:84107kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.789151%

    }

    FinalOutput.mpeg has the same frames as output.mpeg
    I have several TransportStreams to process and everyone has a frame difference

    someone can help me to solve the problem ?

    I need FinalOutput.mpeg to be aligned frame by frame with the original and necessarily the video must impress the timecode.

    a possible solution would also be a replace "damaged" frame but I can not find out how to replace the skipped frames

    EDIT :

    i’ve tried to work from OriginalVideo.ts and extracted video with -map directly with FFMPEG but the result is the same

    CL : ffmpeg -i OriginalVideo.ts -map 0:0 -c:v copy output.h264

       ffmpeg version N-85604-g207e6de Copyright (c) 2000-2017 the FFmpeg developers
    built with gcc 6.3.0 (GCC)
    configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
    libavutil      55. 61.100 / 55. 61.100
    libavcodec     57. 93.100 / 57. 93.100
    libavformat    57. 72.101 / 57. 72.101
    libavdevice    57.  7.100 / 57.  7.100
    libavfilter     6. 86.100 /  6. 86.100
    libswscale      4.  7.101 /  4.  7.101
    libswresample   2.  8.100 /  2.  8.100
    libpostproc    54.  6.100 / 54.  6.100
    [mpeg2video @ 0000000000dd4c20] Invalid frame dimensions 0x0.
    Last message repeated 5 times
    [mp2 @ 0000000000dd7e00] Header missing
    [mp2 @ 0000000000dd8f20] Header missing
    [mpeg2video @ 0000000000dd4c20] Invalid frame dimensions 0x0.
    [mp2 @ 0000000000dd5b60] Header missing
    [mpegts @ 0000000000dd25a0] PES packet size mismatch
    Last message repeated 1 times
    [mpegts @ 0000000000dd25a0] Could not find codec parameters for stream 5 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    [mpegts @ 0000000000dd25a0] Could not find codec parameters for stream 6 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
    Consider increasing the value for the 'analyzeduration' and 'probesize' options
    Input #0, mpegts, from 'R2_TG2_20170607_13001.ts':
    Duration: 00:59:56.06, start: 45451.723744, bitrate: 5901 kb/s
    Program 3402
    Stream #0:0[0x201]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x28b](ita): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
    Stream #0:2[0x241](ita): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:3[0x2b7](Oth): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, mono, s16p, 64 kb/s
    Stream #0:4[0x2b8](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
    Stream #0:5[0x7d2]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:6[0xbb9]: Unknown: none ([11][0][0][0] / 0x000B)
    Output #0, h264, to 'output.h264':
    Metadata:
    encoder         : Lavf57.72.101
    Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], q=2-31, 25 fps, 25 tbr, 25 tbn, 25 tbc
    Stream mapping:
    Stream #0:0 -> #0:0 (copy)
    Press [q] to stop, [?] for help
    frame=89746 fps=6083 q=-1.0 Lsize= 2131869kB time=00:59:55.64 bitrate=4857.1kbits/s speed= 244x
    video:2131869kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%

    if i try to extract video in mpeg format FFMPEG retrive me following errors :

    ffmpeg version N-85604-g207e6de Copyright (c) 2000-2017 the FFmpeg developers
         built with gcc 6.3.0 (GCC)
         configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
         libavutil      55. 61.100 / 55. 61.100
         libavcodec     57. 93.100 / 57. 93.100
         libavformat    57. 72.101 / 57. 72.101
         libavdevice    57.  7.100 / 57.  7.100
         libavfilter     6. 86.100 /  6. 86.100
         libswscale      4.  7.101 /  4.  7.101
         libswresample   2.  8.100 /  2.  8.100
         libpostproc    54.  6.100 / 54.  6.100
       [mpeg2video @ 0000000002824c20] Invalid frame dimensions 0x0.
           Last message repeated 5 times
       [mp2 @ 0000000002827e00] Header missing
       [mp2 @ 0000000002828f20] Header missing
       [mpeg2video @ 0000000002824c20] Invalid frame dimensions 0x0.
       [mp2 @ 0000000002825b60] Header missing
       [mpegts @ 00000000028225a0] PES packet size mismatch
           Last message repeated 1 times
       [mpegts @ 00000000028225a0] Could not find codec parameters for stream 5 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
       Consider increasing the value for the 'analyzeduration' and 'probesize' options
       [mpegts @ 00000000028225a0] Could not find codec parameters for stream 6 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
       Consider increasing the value for the 'analyzeduration' and 'probesize' options
       Input #0, mpegts, from 'R2_TG2_20170607_13001.ts':
         Duration: 00:59:56.06, start: 45451.723744, bitrate: 5901 kb/s
         Program 3402
           Stream #0:0[0x201]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
           Stream #0:1[0x28b](ita): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
           Stream #0:2[0x241](ita): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
           Stream #0:3[0x2b7](Oth): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, mono, s16p, 64 kb/s
           Stream #0:4[0x2b8](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16p, 192 kb/s
           Stream #0:5[0x7d2]: Unknown: none ([5][0][0][0] / 0x0005)
           Stream #0:6[0xbb9]: Unknown: none ([11][0][0][0] / 0x000B)
       File 'output.mpeg' already exists. Overwrite ? [y/N] y
       [mpeg @ 000000000072bc80] VBV buffer size not set, using default size of 130KB
       If you want the mpeg file to be compliant to some specification
       Like DVD, VCD or others, make sure you set the correct buffer size
       Output #0, mpeg, to 'output.mpeg':
         Metadata:
           encoder         : Lavf57.72.101
           Stream #0:0: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, top first), 720x576 [SAR 64:45 DAR 16:9], q=2-31, 25 fps, 25 tbr, 90k tbn, 25 tbc
       Stream mapping:
         Stream #0:0 -> #0:0 (copy)
       Press [q] to stop, [?] for help
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=1218 size=11754=4752.0kbits/s speed= 229x
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=3247 size=11754
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=5288 size=11754
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=7329 size=11754
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=9370 size=11754
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=11411 size=11754
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=1862 size=17826
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=3891 size=17826
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=5932 size=17826
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=7973 size=17826
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=10014 size=17826
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=12055 size=17826
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=14096 size=17826
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=16137 size=17826
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=875 size=88109e=4684.9kbits/s speed= 239x
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=2904 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=4945 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=6986 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=9027 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=11068 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=13109 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=15150 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=17191 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=19232 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=21273 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=23314 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=25355 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=27396 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=29437 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=31478 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=33519 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=35560 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=37601 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=39642 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=41683 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=43724 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=45765 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=47806 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=49847 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=51888 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=53929 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=55970 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=58011 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=60052 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=62093 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=64134 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=66175 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=68216 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=70257 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=72298 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=74339 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=76380 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=78421 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=80462 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=82503 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=84544 size=88109
       [mpeg @ 000000000072bc80] buffer underflow st=0 bufi=86585 size=88109
       frame=89746 fps=5348 q=-1.0 Lsize= 2140734kB time=00:59:55.60 bitrate=4877.3kbits/s speed= 214x
       video:2131869kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.415814%
  • Converting .3gp file into mp4 file in android using ffmpeg

    8 août 2013, par user2171513

    I want to convert .3gp file into .mp4 file with resolution modified in Android using ffmpeg.
    I want to increase the resolution of the video from its standard resolution to 1920x1080.

    So far I have been successful in
    1) extracting .h264 video file from .3gp file and increase its resolution
    2) extracting .aac audio file from .3gp file.

    Now I want to combine them back into .mp4 file. The commands that I have used to extract this .h264 and .aac files are :

    ./ffmpeg -i 1.3gp -vbsf h264_mp4toannexb -s 1920x1080 1.h264
    ./ffmpeg -i 1.3gp -ab 160k -ac 2 -ar 48000 -vn -strict -2  1.aac

    The command that I have tried to merge them back is

    ./ffmpeg -i 1.h264 -i 1.aac -map 0:0 -map 1:0 -strict -2 1.mp4

    The 1.mp4 that gets generated at the end basically has audio only at few sync frames of video. (Thats what I feel , because the audio is present at specific intervals within the video)

    Can anyone please help in figuring out what am I missing here.

    EDIT :
    So basically I want to concat 4 different videos of 4 different resolution and type.

    1)

    ./ffmpeg -i 1.mp4
    Video: h264 (High), yuv420p, 1920x1080, 16959 kb/s, 29.85 fps, 90k tbr, 90k tbn, 180k tbc
    Audio: aac, 48000 Hz, stereo, s16, 106 kb/s

    2)

    ffmpeg -i 2.mp4
    Video: h264 (Constrained Baseline), yuv420p, 640x480, 3102 kb/s, 29.99 fps, 90k tbr, 90k tbn, 180k tbc
    Audio: aac, 48000 Hz, stereo, s16, 93 kb/s

    3)

    ffmpeg -i 3.3gp
    Video: h263, yuv420p, 1408x1152 [PAR 12:11 DAR 4:3], 2920 kb/s, 15 fps, 15 tbr, 15360 tbn, 29.97 tbc
    Audio: amrnb, 8000 Hz, 1 channels, flt, 12 kb/s

    4)

    ffmpeg -i 4.3gp
    Video: h264 (High), yuv420p, 352x288 [PAR 12:11 DAR 4:3], 216 kb/s, 24 fps, 24 tbr, 24 tbn, 48 tbc
    Audio: aac, 44100 Hz, stereo, s16, 92 kb/s

    So I am converting them to mpegts using following commands

    ./ffmpeg -i 1.mp4 -c:v libx264 -vf scale=1920:1080 -r 60 -c:a aac -ar 48000 -b:a 160k -strict experimental -f mpegts 1.ts
    ./ffmpeg -i 2.mp4 -c:v libx264 -vf scale=1920:1080 -r 60 -c:a aac -ar 48000 -b:a 160k -strict experimental -f mpegts 2.ts
    ./ffmpeg -i 3.3gp -c:v libx264 -vf scale=1920:1080 -r 60 -c:a aac -ar 48000 -b:a 160k -strict experimental -f mpegts 3.ts
    ./ffmpeg -i 4.3gp -c:v libx264 -vf scale=1920:1080 -r 60 -c:a aac -ar 48000 -b:a 160k -strict experimental -f mpegts 4.ts

    then concatenating the .ts files into f.ts and then creating a final .mp4 file from it using

    cat 1.ts 2.ts 3.ts 4.ts > f.ts
    ./ffmpeg -i f.ts -c copy -bsf:a aac_adtstoasc output.mp4

    But my f.ts also doesnt seem to play correctly in VLC on linux, it plays first 2 mp4's video + audio and it plays last .3gp's audio only.(Same for output.mp4 too) Could you please help me in figuring out what am I missing ?

    Thanks

  • Tools/Techniques for investigating video corruption — ffmpeg / libavcodec

    17 juillet 2013, par Gopherkhan

    In my current work I'm trying to encode some images to h264 video using the FFMPEG's C library. The resulting video plays fine in VLC, but has no preview image. The video can play in VLC and Mplayer on ubuntu, but won't play on Mac or PC (in fact, it causes a "VTDecoderXPCService quit unexpectedly" error on Mac).

    If I run the resulting file through FFMPEG using the command line, the resulting file has a preview image, and plays correctly everywhere.

    Apparently the file that I get out of the program is corrupt in some weird place, but I don't have any output during my compilation or run to indicate where. I can't share my code at the moment (work code isn't open source yet :-( ), but I have tried a number of things :

    1. Writing only header and trailer data (av_write_trailer) and no frames
    2. writing frames only minus the trailer (using avcodec_encode_video2 and av_write_frame)
    3. Adjusting our time_base and frame pts values to encode only one frame per second
    4. Removing all variable frame rate code
    5. Numerous other variants that I won't bother you with here

    In creating my project, I've also followed the following tutorials :

    And consulted the deprecated ffmpeg functions list

    And compiled FFMPEG on ubuntu according to the official doc

    And consulted numerous StackOverflow questions :

    But every run of the program runs into the exact same problem.

    My question is, is there anything obvious that causes a programmatic run of FFMpeg to differ from a console run (e.g., an incomplete finalization, some threading issues, etc.) ? Like some obvious reason that a console run could repair a corrupted file ? Or is there a decent tool/method for inspecting a video file and finding the point of corruption ?