
Recherche avancée
Médias (1)
-
La conservation du net art au musée. Les stratégies à l’œuvre
26 mai 2011
Mis à jour : Juillet 2013
Langue : français
Type : Texte
Autres articles (108)
-
Le profil des utilisateurs
12 avril 2011, parChaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...) -
Configurer la prise en compte des langues
15 novembre 2010, parAccéder à la configuration et ajouter des langues prises en compte
Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...)
Sur d’autres sites (6646)
-
ffmpeg 1FPS extraction call spits out infinite images until disk is bricked on poorly-encoded movie
12 juillet 2017, par John AllardThis is one of the oddest things I’ve ever seen while using ffmpeg.
This is the scenario - we are getting video footage from a IONODE ION-E100 encoder, the footage is encoded in h264. I can view the footage fine in VLC, and I can copy it over to another video using
ffmpeg
and-c:v copy
. The issue arises when I try and extract one FPS from the movie using the following command :ffmpeg -i testmovie.mp4 -r 1 -vf 640:-2 -q:v 18 -loglevel error /tmp/tmp/extraction_%04d.jpeg
What this should do is go through the movie and extract one frame per second, then dump the frames to the files
/tmp/tmp/extraction_0001.jpeg, /tmp/tmp/extraction_0002.jpeg, ..., /tmp/tmp/extraction_000X.jpeg
. It should end when it reaches the end of the video.Now the odd thing that happens when I run this command is that it will run in a tight loop, writing tens or hundreds of thousands of images to the disk until the disk is full at which point the command fails. All of the extracted images are the exact same as one another.
Here is the ffmpeg stats output on the video
ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers
built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.2.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 34.100 / 55. 34.100
libavcodec 57. 64.101 / 57. 64.101
libavformat 57. 56.100 / 57. 56.100
libavdevice 57. 1.100 / 57. 1.100
libavfilter 6. 65.100 / 6. 65.100
libavresample 3. 1. 0 / 3. 1. 0
libswscale 4. 2.100 / 4. 2.100
libswresample 2. 3.100 / 2. 3.100
libpostproc 54. 1.100 / 54. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/john/ionode/test2.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : /videoinput_1:0/h264_1/media.stm
encoder : Lavf57.56.100
Duration: 00:00:16.52, start: -9791.427750, bitrate: 2165 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 2119 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, mono, fltp, 236 kb/s (default)
Metadata:
handler_name : SoundHandler(notice the
start: -9791.427750
value, what is this ?)Here are the encoding details on the footage :
{
"programs": [
],
"streams": [
{
"index": 0,
"codec_name": "h264",
"codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
"profile": "High",
"codec_type": "video",
"codec_time_base": "1/50",
"codec_tag_string": "avc1",
"codec_tag": "0x31637661",
"width": 1920,
"height": 1080,
"coded_width": 1920,
"coded_height": 1080,
"has_b_frames": 2,
"sample_aspect_ratio": "1:1",
"display_aspect_ratio": "16:9",
"pix_fmt": "yuv420p",
"level": 40,
"chroma_location": "left",
"refs": 1,
"is_avc": "true",
"nal_length_size": "4",
"r_frame_rate": "25/1",
"avg_frame_rate": "25/1",
"time_base": "1/12800",
"start_pts": 0,
"start_time": "0.000000",
"duration_ts": 211456,
"duration": "16.520000",
"bit_rate": "2119813",
"bits_per_raw_sample": "8",
"nb_frames": "413",
"disposition": {
"default": 1,
"dub": 0,
"original": 0,
"comment": 0,
"lyrics": 0,
"karaoke": 0,
"forced": 0,
"hearing_impaired": 0,
"visual_impaired": 0,
"clean_effects": 0,
"attached_pic": 0,
"timed_thumbnails": 0
},
"tags": {
"language": "und",
"handler_name": "VideoHandler"
}
}
]
}Here a link to the sample video to use : http://s000.tinyupload.com/?file_id=03169189167771012515
(it’s a 5MB video file)The only clues I have as to what is actually going on is the error output
from the command that grabs the video from the encoder :[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823640, current: -630275919; changing to -629823639. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823639, current: -630274895; changing to -629823638. This may result in incorrect timestamps in the output file.
frame= 124 fps= 21 q=28.0 size= 41kB time=00:00:02.60 bitrate= 128.8kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823638, current: -630273871; changing to -629823637. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823637, current: -630272847; changing to -629823636. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823636, current: -630271824; changing to -629823635. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823635, current: -630270800; changing to -629823634. This may result in incorrect timestamps in the output file.
frame= 124 fps= 19 q=28.0 size= 43kB time=00:00:02.60 bitrate= 137.0kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823634, current: -630269776; changing to -629823633. This may result in incorrect timestamps in the output file.
[aac @ 0x7faa1a832000] Queue input is backward in time
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823633, current: -630268752; changing to -629823632. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823632, current: -630267728; changing to -629823631. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823631, current: -630513833; changing to -629823630. This may result in incorrect timestamps in the output file.
frame= 124 fps= 18 q=28.0 size= 46kB time=00:00:02.60 bitrate= 145.4kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823630, current: -630512810; changing to -629823629. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823629, current: -630511786; changing to -629823628. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823628, current: -630510762; changing to -629823627. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823627, current: -630509738; changing to -629823626. This may result in incorrect timestamps in the output file.
frame= 124 fps= 17 q=28.0 size= 49kB time=00:00:02.60 bitrate= 153.6kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823626, current: -630508714; changing to -629823625. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823625, current: -630507690; changing to -629823624. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823624, current: -630506667; changing to -629823623. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823623, current: -630505643; changing to -629823622. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823622, current: -630504619; changing to -629823621. This may result in incorrect timestamps in the output file.
frame= 124 fps= 16 q=28.0 size= 52kB time=00:00:02.60 bitrate= 163.5kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823621, current: -630503595; changing to -629823620. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823620, current: -630502571; changing to -629823619. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823619, current: -630501548; changing to -629823618. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823618, current: -630500524; changing to -629823617. This may result in incorrect timestamps in the output file.
frame= 124 fps= 15 q=28.0 size= 54kB time=00:00:02.60 bitrate= 171.4kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823617, current: -630499500; changing to -629823616. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823616, current: -630498476; changing to -629823615. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823615, current: -630497452; changing to -629823614. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823614, current: -630496428; changing to -629823613. This may result in incorrect timestamps in the output file.
frame= 124 fps= 14 q=28.0 size= 57kB time=00:00:02.60 bitrate= 179.3kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823613, current: -630495405; changing to -629823612. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823612, current: -630494381; changing to -629823611. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823611, current: -630493357; changing to -629823610. This may result in incorrect timestamps in the output file.
frame= 124 fps= 13 q=28.0 size= 59kB time=00:00:02.60 bitrate= 185.6kbits/s dup=26 drop=4 spee[aac @ 0x7faa1a832000] Queue input is backward in time
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823610, current: -630492333; changing to -629823609. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823609, current: -630491309; changing to -629823608. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823608, current: -630736398; changing to -629823607. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823607, current: -630735375; changing to -629823606. This may result in incorrect timestamps in the output file.
frame= 124 fps= 12 q=28.0 size= 61kB time=00:00:02.60 bitrate= 193.5kbits/s dup=26 drop=4 spee[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823606, current: -630734351; changing to -629823605. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823605, current: -630733327; changing to -629823604. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823604, current: -630732303; changing to -629823603. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823603, current: -630731279; changing to -629823602. This may result in incorrect timestamps in the output file.
[mp4 @ 0x7faa1a83ba00] Non-monotonous DTS in output stream 0:1; previous: -629823602, current: -630730256; changing to -629823601. This may result in incorrect timestamps in the output file.
frame= 124 fps= 12 q=-1.0 Lsize= 507kB time=00:00:04.84 bitrate= 858.7kbits/s dup=26 drop=4 speed=0.453xSo my question is, why does this video break ffmpeg ? Why does ffmpeg get caught up in a tight loop extracting images without ever making any progres towards the end of the video ?
-
FFMPEG TimeCode synchronization
14 juin 2017, par SpadieriI 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.mp2ffmprobe 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
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 differencesomeone 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% -
android - how to play two audio file at same time
29 janvier 2016, par Sajad NorouziI wanna create an karaoke android app. so far, user can listen to the song and record his voice. now I want to let user some editing like setting volume of his voice or setting Reverb effect. I have some library like ffmpeg and sox on android and don’t have problem for mixing two audio, but for setting volume or Reverb wanna play two audio file simultaneously using mediaplayer, however it’s not possible because android doesn’t let us play two audio file with mediaplayer at same time even with two different object of mediaplayer. so, what is the solution ?