Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5454 closed defect (needs_more_info)

problem concatenating videos

Reported by: edgar moreno Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
Hello. I have a rather complex Project: I have several mkv files which I need to convert to mp4. On the other hand I have a series of jpg files that I need to concatenate with all mp4 files, therefore I'm converting them to mp4.
Once I have all mp4 files I create a list as concat syntax requests.
Summary:

  1. Convert every mkv file to mp4
  2. Convert every jpg file to mp4
  3. Concat all files.

I'm watching result file and it stops or shows nothing even though player is showing timer moving.
How to reproduce:

ffmpeg -i source.mkv -vcodec copy -acodec copy destination.mp4
ffmpeg -report -loop 1 -i image.jpg -c:v libx264 -t image.mp4 -vf \"fps=7,format=yuv420p\" {1}.mp4
ffmpeg -report -f concat -i list.txt -c copy results.mp4

ffmpeg versión N-76456-g6df2c94
built on with gcc 5.2.0 (GCC)

Change History (14)

comment:1 by Carl Eugen Hoyos, 8 years ago

If you want to report a bug in FFmpeg, please provide your input files, the command line you used including the complete, uncut console output and explain what is wrong with the output file.

comment:2 by edgar moreno, 8 years ago

Hello

files size are over 200 mb. What method is preferred to share them?
regards

edgar moreno

Last edited 8 years ago by edgar moreno (previous) (diff)

comment:3 by Carl Eugen Hoyos, 8 years ago

Please read https://ffmpeg.org/bugreports.html there is no filesize limit.

comment:4 by edgar moreno, 8 years ago

i'm having problems reaching ftp....

C:\Users\emoreno>telnet upload.ffmpeg.org 21
Conectándose a upload.ffmpeg.org...No se puede abrir la conexión al host, en pue
rto 21: Error en la conexión

In English... can´t connect to host. Port 21 not responding

Kindly advice

edgar moreno

comment:5 by edgar moreno, 8 years ago

can I share with you via wetransfer or dropbox?

kindly advice

comment:6 by Carl Eugen Hoyos, 8 years ago

Use whatever upload site seems reasonable to you, don't forget to test current FFmpeg git head and provide command line including complete, uncut console output to make this a valid ticket.

comment:7 by edgar moreno, 8 years ago

Hi
I uploaded a series of files that can be downloaded here:

https://www.dropbox.com/l/yTirqhC1pQ4tX2TFWmVeOp/invite

I uploaded also a file named understanding the problem.txt
Here's the summary of the problem:
Hi

This is what I'm trying to accomplish:
I need to join a series of files (all mp4) into one file (12279resultado.mp4)

The source files are of two types: Image files (jpg) and video files (mkv)

Every mkv was converted to mp4 using:

"path\ffmpeg.exe" -report -i "path2\input.mkv" -vcodec copy "output\.mp4"

Every jpg was converted to mp4 using:
"path\ffmpeg.exe" -report -i "path2\input.jpg" -r 1/7 -c:v libx264 -preset slow -crf 21 -t 7 "path2\output.mp4"

The intention is to have a 7fps video from an image for 7 seconds.

In the end, all mp4 videos are joined using control.txt using:

"path\ffmpeg.exe" -report -f concat -i "path2\control.txt" -c copy "12279resultado.mp4"

The problem... al fur* files are not correctly shown in 12279resultado.mp4 files.
In some cases they do not show all 7 seconds or when they are close to the end of the list they do not show at all.

thanks for your help

comment:8 by Carl Eugen Hoyos, 8 years ago

Resolution: needs_more_info
Status: newclosed

Please reopen this ticket if you can provide the following:

  • A download link that allows to download your input files (assuming they are necessary to reproduce your issue) without a login, as an alternative you can upload the input file(s) to the ftp server.
  • The command line that does not produce the desired output together with the complete, uncut console output (that will show you tested current FFmpeg git head).

comment:9 by edgar moreno, 8 years ago

I don't understand.. doesn't the previous comment provide that info? It has download link and comments regarding ffmpeg commands to reproduce. What is missing? kindly advice

comment:10 by Carl Eugen Hoyos, 8 years ago

The download link does not allow downloading your file(s) and you did not provide your command line including the complete, uncut console output that is needed for all bug reports.

comment:11 by edgar moreno, 8 years ago

unfortunately, i'm gonna have to try that at home as I am under my company's firewall. Can't reach your ftp site

regards

comment:12 by edgar moreno, 8 years ago

I tried again at home but as soon as I tried to upload first file I got disconnected.

Anyway.. I'm going to try to explain.
I have to convert many mkv files and image files and in the end join them.
When I convert a mkv like the following I get a message: (Could not find codec parameters for stream 1: does it mean that I don't have the right codecs to convert mkv to mp4?). Can I send that file via email?

ffmpeg started on 2016-04-26 at 08:48:17
Report written to "ffmpeg-20160426-084817.log"
Command line:
"D:
ffmpeg
bin
ffmpeg.exe" -report -i "D:
Project2
CDA
SicovCDA
files
12297
39_REGISTROSALIDA.mkv" -vcodec copy "D:
Project2
CDA
SicovCDA
files
12297
39_REGISTROSALIDA.mp4"
ffmpeg version N-76456-g6df2c94 Copyright (c) 2000-2015 the FFmpeg developers

built with gcc 5.2.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 5.100 / 55. 5.100
libavcodec 57. 14.100 / 57. 14.100
libavformat 57. 14.100 / 57. 14.100
libavdevice 57. 0.100 / 57. 0.100
libavfilter 6. 14.101 / 6. 14.101
libswscale 4. 0.100 / 4. 0.100
libswresample 2. 0.100 / 2. 0.100
libpostproc 54. 0.100 / 54. 0.100

Splitting the commandline.
Reading option '-report' ... matched as option 'report' (generate a report) with argument '1'.
Reading option '-i' ... matched as input file with argument 'D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mkv'.
Reading option '-vcodec' ... matched as option 'vcodec' (force video codec ('copy' to copy stream)) with argument 'copy'.
Reading option 'D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mp4' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input file D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mkv.
Successfully parsed a group of options.
Opening an input file: D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mkv.
[matroska,webm @ 038615c0] Format matroska,webm probed with size=2048 and score=100
[matroska,webm @ 038615c0] Unknown entry 0x6FAB
st:0 removing common factor 1000000 from timebase
st:1 removing common factor 1000000 from timebase
[matroska,webm @ 038615c0] Before avformat_find_stream_info() pos: 426 bytes read:32768 seeks:0
[matroska,webm @ 038615c0] max_analyze_duration 5000000 reached at 5032000 microseconds st:0
[matroska,webm @ 038615c0] rfps: 29.916667 0.015358
[matroska,webm @ 038615c0] rfps: 29.916667 0.015358
[matroska,webm @ 038615c0] rfps: 30.000000 0.000100
[matroska,webm @ 038615c0] rfps: 60.000000 0.000399
[matroska,webm @ 038615c0] rfps: 120.000000 0.001597
[matroska,webm @ 038615c0] rfps: 240.000000 0.006389
[matroska,webm @ 038615c0] rfps: 29.970030 0.002256
[matroska,webm @ 038615c0] rfps: 29.970030 0.007516
[matroska,webm @ 038615c0] rfps: 59.940060 0.009025
[matroska,webm @ 038615c0] rfps: 59.940060 0.012922
[matroska,webm @ 038615c0] Setting avg frame rate based on r frame rate
[matroska,webm @ 038615c0] Could not find codec parameters for stream 1 (Video: mjpeg, none(bt470bg/unknown/unknown), 1920x1080): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[matroska,webm @ 038615c0] After avformat_find_stream_info() pos: 408195 bytes read:435465 seeks:0 frames:158
Input #0, matroska,webm, from 'D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mkv':

Metadata:

encoder : MilestoneMux

Duration: 00:02:24.96, start: 0.000000, bitrate: 527 kb/s

Stream #0:0(eng), 158, 1/1000: Video: h264 (Main), yuvj420p(pc, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 30 fps, 30 tbr, 1k tbn, 2k tbc (default)
Stream #0:1(eng), 0, 1/1000: Video: mjpeg, none(bt470bg/unknown/unknown), 1920x1080, SAR 1:1 DAR 16:9, 1k tbr, 1k tbn, 1k tbc (default)

Successfully opened the file.
Parsing a group of options: output file D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mp4.
Applying option vcodec (force video codec ('copy' to copy stream)) with argument copy.
Successfully parsed a group of options.
Opening an output file: D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mp4.
Successfully opened the file.
[mp4 @ 04277ae0] Codec for stream 0 does not use global headers but container format requires global headers
Output #0, mp4, to 'D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mp4':

Metadata:

encoder : Lavf57.14.100
Stream #0:0(eng), 0, 1/16000: Video: h264 ([33][0][0][0] / 0x0021), yuvj420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 16k tbn, 1k tbc (default)

Stream mapping:

Stream #0:0 -> #0:0 (copy)

Press [q] to stop, ? for help
No more output streams to write to, finishing.
frame= 4350 fps=0.0 q=-1.0 Lsize= 9304kB time=00:02:24.95 bitrate= 525.8kbits/s
video:9263kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.442116%
Input file #0 (D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mkv):

Input stream #0:0 (video): 4350 packets read (9485754 bytes);
Input stream #0:1 (video): 0 packets read (0 bytes);
Total: 4350 packets (9485754 bytes) demuxed

Output file #0 (D:\Project2\CDA\SicovCDA\files\12297\39_REGISTROSALIDA.mp4):

Output stream #0:0 (video): 4350 packets muxed (9485754 bytes);
Total: 4350 packets (9485754 bytes) muxed

0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 042417a0] Statistics: 34 seeks, 4521 writeouts
[AVIOContext @ 03853200] Statistics: 9549562 bytes read, 0 seeks

comment:13 by Carl Eugen Hoyos, 8 years ago

ffmpeg version N-76456-g6df2c94 Copyright (c) 2000-2015 the FFmpeg developers

To make this a valid ticket, please (upload a sample that allows to reproduce the issue and) test current FFmpeg git head.

comment:14 by edgar moreno, 8 years ago

Hello
i'm using Windows versión of the software (I'm not using git)
This is the info that I've got from log:
ffmpeg version N-76456-g6df2c94 Copyright (c) 2000-2015 the FFmpeg developers

built with gcc 5.2.0 (GCC)

I managed to upload three files:
1_REGISTROENTRADA1.mkv
9_FURAlineacion.jpg
understandingTheProblem.txt

As I received an error when trying to ftp the rest of files(I had too many connections from your ip), I think we can reproduce error like this:

create at least 10 copies of the same jpg file:
ffmpeg -report -framerate 1/7 -i 9_FURAlineacion.jpg -c:v libx264 -r 30 -pix_fmt yuv420p anyname.mp4

create at least 10 copies of the same mkv file:
ffmpeg -report -i 1_REGISTROENTRADA1.mkv -vcodec copy anyname.mp4

insert alternately every video file into a txt file:

file '1_anynamejpg.mp4'
file '1_anynamemkv.mp4'
file '2_anynamejpg.mp4'
file '2_anynamemkv.mp4'
file '3_anynamejpg.mp4'
file '3_anynamemkv.mp4'
file '4_anynamejpg.mp4'
file '4_anynamemkv.mp4'
file '5_anynamejpg.mp4'
file '5_anynamemkv.mp4'
file '6_anynamejpg.mp4'
file '6_anynamemkv.mp4'
file '7_anynamejpg.mp4'
file '7_anynamemkv.mp4'
file '8_anynamejpg.mp4'
file '8_anynamemkv.mp4'
file '9_anynamejpg.mp4'
file '9_anynamemkv.mp4'
file '10_anynamejpg.mp4'
file '10_anynamemkv.mp4'

Then unite all videos using concat:

ffmpeg -report -f concat -i allVideos.txt -c copy results.mp4

The issue that I'me experiencing is that in joined video, videos created originally from images (they were originally bmps converted to jpg) show problems like not being shown, shown for more or less time than original video or even worse... they make video player stall when their part is played or closed without warning.

regards

Note: See TracTickets for help on using tickets.