Image (jpg/png) to video with avidemux 2.7 dev branch

Started by Jan Gruuthuse, July 21, 2017, 07:04:55 AM

Previous topic - Next topic

Jan Gruuthuse

I've come across some issues while revisiting the PNG to video transfer, ubuntu 16.04.2 LTS Qt5
Seems to be working only with Display: Xvideo(best) with Video Output (xvid4) and Output format: Mkv Muxer
however there looks like to be a timeline issue with markers?
While pasting the image A: and B: counters increase each with 00:00:040, causing probably the to short message?

Workflow:
- load one 1280x720 pixels jpg or png
- copy and paste up to 500 ms
Video Output (xvid4)
Output format: Mkv Muxer
save video: too Short .... incomplete
set slider begin mark [A ], save : too Short .... incomplete
set slider end mark [ B], save : done

I could not save video with
- Mpeg4 AVC (x264)
- Mpeg4 ASP (ff)

Download link https://we.tl/H6woEyLDGX 1 file TestImageToVideo.zip, 61.8 MB in total ãÆ'» Will be deleted on 28 July, 2017
contents: one jpg + png 1280x720 pxls, 3sat test 720p video

Time permitting, could be looked at this?






Jan Gruuthuse

#1
Further testing after finding time line issue
image to video working on Display & HW accel: vdpau
- (FF)HuffYUV
- HEVc (x265)
- Mjpeg Encoder
- Mpeg4 ASP (xvid4)
- Nvidia H264
- Nvidia HEVC
- YV12 Encoder with AVI muxer

Jan Gruuthuse

#2
The second step, adding video to this, seems only to be working without hardware acceleration?
- Move slider to end of video and drop the 720p4audioTracks3satá´´á´°.ts onto avidemux canvas.

with hardware hardware acceleration, the images are not showing up in the saved video
without hardware acceleration and display Xvideo (best) the images are shown in the video.

workflow on youtube 2'55 : add png then append video to it

eumagga0x2a

Quote from: Jan Gruuthuse on July 21, 2017, 07:53:09 AM
The second step, adding video to this, seems only to be working without hardware acceleration?

Yes, this is expected not to work with hw accel.

mean

I dont think this is related to jpeg or png input
Most probably it is related to very short video + encoder delay

Jan Gruuthuse

#5
Apparently this is an separate issue.
Quotehowever there looks like to be a timeline issue with markers?
While pasting the image A: and B: counters increase each with 00:00:040, causing probably the to short message?

To my understanding:
When loading a video: a time index is created.
Bottom right hand time indicator A: stays @ 00:00:000
While copying one loaded image and multiplicating the loaded image [Ctrl][c]
terminal output:
Segment :0/1
Reference    :0    00:00:00,000
startLinear  :00000000 00:00:00,000
duration     :00040000 00:00:00,040
refStartPts  :00000000 00:00:00,000
refStartDts  :00000000 00:00:00,000
Adding segment 0 to clipboard
Marker A is here offset=0
Marker B is here offset=40000
Segment :0/1
Reference    :0    00:00:00,000
startLinear  :00000000 00:00:00,000
duration     :00040000 00:00:00,040
refStartPts  :00000000 00:00:00,000
refStartDts  :00000000 00:00:00,000

and now pasting [Ctrl][v]
terminal output:
Segment :0/2
Reference    :0    00:00:00,000
startLinear  :00000000 00:00:00,000
duration     :00040000 00:00:00,040
refStartPts  :00000000 00:00:00,000
refStartDts  :00000000 00:00:00,000
Segment :1/2
Reference    :0    00:00:00,000
startLinear  :00040000 00:00:00,040
duration     :00040000 00:00:00,040
refStartPts  :00000000 00:00:00,000
refStartDts  :00000000 00:00:00,000


A: shows  00:00:040
B: shows  00:00:080

next paste

A: shows  00:00:080
B: shows  00:00:120

see the blue marked area on the time line.

now saving video creates:
[FF] Saving
[saveLoop] 09:42:53-906  avg fps=12500
[initUI] 09:42:53-906  Muxer, creating UI, video duration is 00:00:00,040
[startThread] 09:42:53-922  Starting thread...
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 1
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 2
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 3
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 4
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 5
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 6
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 7
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 8
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 9
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 10
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 11
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 12
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 13
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 14
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 15
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 16
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 17
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 18
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 19
[nextPictureInternal] 09:42:53-922  Next picture failed
[DecodeNextPicture] 09:42:53-922  getFrame failed for frame 20
[nextPictureInternal] 09:42:53-922  Next picture failed
[nextPictureInternal] 09:42:53-922  nextPictureInternal Failed
[nextPictureInternal] 09:42:53-922  while looking for 0 us, 0 ms

the faulty? selection caused by A: 00:00:080 B: 00:00:120 is not long enough 'no frame' in selection?
Quotevideo duration is 00:00:00,040

Jan Gruuthuse

#6
Setting [A ] manually to zero, saves now a video correctly.

Jan Gruuthuse

#7
Selection should not be set?
Dual use of a variable?
Loaded image only considered 1/2 frame? Perhaps choice when loading image: 1/2 frame (I)nterlaced or 1 frame (P)rogressive?

Jan Gruuthuse

Details of saved video:
General
Unique ID                                : 149515185954487322629416397450729305044 (0x707B93CEFB44A9CFAE78344EDD0D33D4)
Complete name                            : ~/png.mkv
Format                                   : Matroska
Format version                           : Version 4 / Version 2
File size                                : 208 KiB
Duration                                 : 240ms
Overall bit rate                         : 7 093 Kbps
Writing application                      : Lavf57.71.100
Writing library                          : Lavf57.71.100 / Lavf57.71.100
ErrorDetectionType                       : Per level 1

Video
ID                                       : 1
Format                                   : MPEG-4 Visual
Format profile                           : Advanced Simple@L4
Format settings, BVOP                    : Yes
Format settings, QPel                    : No
Format settings, GMC                     : No warppoints
Format settings, Matrix                  : Default (H.263)
Codec ID                                 : V_MPEG4/ISO/ASP
Codec ID/Info                            : Advanced Simple Profile
Duration                                 : 240ms
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 12.500 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Compression mode                         : Lossy
Writing library                          : XviD 67
Default                                  : Yes
Forced                                   : No
DURATION                                 : 00:00:00,240000000

mean

finally understood the issue
Will fix it tonight, should be easy

Thanks

Jan Gruuthuse

Your welcome, not always easy to explain from user side. As usually many thanks for all the efforts and improvements.

Jan Gruuthuse

Quote from: mean on July 24, 2017, 02:13:24 PM
finally understood the issue
Will fix it tonight, should be easy
Fixed by: f5a0568            [editor] fix (?) copy/paste markers
marker A: stays at 00:00:00.000, video is now saved directly