Author Topic: Image (jpg/png) to video with avidemux 2.7 dev branch  (Read 2235 times)

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
Image (jpg/png) to video with avidemux 2.7 dev branch
« on: July 21, 2017, 07:04:55 AM »
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?





« Last Edit: July 21, 2017, 07:23:11 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
Re: Image (jpg/png) to video with avidemux 2.7 dev branch
« Reply #1 on: July 21, 2017, 07:20:36 AM »
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
« Last Edit: July 21, 2017, 07:53:41 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
Re: Image (jpg/png) to video with avidemux 2.7 dev branch
« Reply #2 on: July 21, 2017, 07:53:09 AM »
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
« Last Edit: July 21, 2017, 09:19:14 AM by Jan Gruuthuse »

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 3294
Re: Image (jpg/png) to video with avidemux 2.7 dev branch
« Reply #3 on: July 21, 2017, 10:10:51 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10971
Re: Image (jpg/png) to video with avidemux 2.7 dev branch
« Reply #4 on: July 24, 2017, 05:43:56 AM »
I dont think this is related to jpeg or png input
Most probably it is related to very short video + encoder delay

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
: Image (jpg/png) too short
« Reply #5 on: July 24, 2017, 09:57:23 AM »
Apparently this is an separate issue.
Quote
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?

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:
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
[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?
Quote
video duration is 00:00:00,040
« Last Edit: July 24, 2017, 10:03:29 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
manual set [A ] to zero
« Reply #6 on: July 24, 2017, 10:00:15 AM »
Setting [A ] manually to zero, saves now a video correctly.
« Last Edit: July 25, 2017, 05:03:12 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
Re: Image (jpg/png) to video with avidemux 2.7 dev branch
« Reply #7 on: July 24, 2017, 10:05:27 AM »
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?
« Last Edit: July 24, 2017, 11:44:01 AM by Jan Gruuthuse »

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
Re: Image (jpg/png) to video with avidemux 2.7 dev branch
« Reply #8 on: July 24, 2017, 10:14:15 AM »
Details of saved video:
Code: [Select]
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10971
Re: Image (jpg/png) to video with avidemux 2.7 dev branch
« Reply #9 on: July 24, 2017, 02:13:24 PM »
finally understood the issue
Will fix it tonight, should be easy

Thanks

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
Re: Image (jpg/png) to video with avidemux 2.7 dev branch
« Reply #10 on: July 24, 2017, 02:48:12 PM »
Your welcome, not always easy to explain from user side. As usually many thanks for all the efforts and improvements.

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6060
FIXED: Image (jpg/png) too short
« Reply #11 on: July 25, 2017, 05:02:36 AM »
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