Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: AshleyQuick on April 11, 2017, 08:37:25 PM

Title: With latest nightly, I cannot add a png file to video
Post by: AshleyQuick on April 11, 2017, 08:37:25 PM
When I choose "Select" and try to insert the .png file, I see it in the preview but when I click OK to proceed, it disappears from the video. What am I missing?
Title: Re: With latest nightly, I cannot add a png file to video
Post by: Jan Gruuthuse on April 12, 2017, 04:53:22 AM
Can you give more details
- Video resolution
- png resolution, bit-depth, colour colour space.

when picture is inserted, this is only for time duration of 1 frame or 1/2 frame depending what the video is using interlaced or progressive.
You would need to copy paste x times the picture until you reached the required time duration.
Title: Re: With latest nightly, I cannot add a png file to video
Post by: mean on April 12, 2017, 05:28:25 AM
Did it work previously with the same png ?
Title: Re: With latest nightly, I cannot add a png file to video
Post by: AshleyQuick on April 12, 2017, 05:37:08 AM
No because I was using a version of AD that was a couple years old.
Title: Re: With latest nightly, I cannot add a png file to video
Post by: mean on April 12, 2017, 05:37:51 AM
Could you detail what  you are doing ?

Title: Re: With latest nightly, I cannot add a png file to video
Post by: Jan Gruuthuse on April 12, 2017, 06:11:47 AM
You can only Append
- load png 1st then append video, png is 1st frame
- load video 1st then append, png is last frame. Mostly only selectable with the right keyboard arrow when you are on last keyframe of video.

drag and drop works the same way.
- 1st dropped video then png: png is last frame
- 1st dropped png then video: png is 1st frame

important: width and height of both video and png must match! If not Info pop's up
Title: Re: With latest nightly, I cannot add a png file to video
Post by: Jan Gruuthuse on April 12, 2017, 07:04:04 AM
small video on png with appended video (png = 1st then video)
Howto: add video to png (https://www.youtube.com/watch?v=xH1fRWdFjBQ)
Saved resulting video: png added video to (https://www.youtube.com/watch?v=7nIHqqKoq3A)
on our YouTube channel Avidemux Demo (https://www.youtube.com/channel/UC7ycUgCIuOlChtpiTFfLTmw)

the result is not showing well on youtube, better when you download the endresult:
png+720p.mkv 1 file, 243 KB in total
Will be deleted on 19 April, 2017
Download link: png added video to (https://we.tl/SwOApySKVX)
Title: Re: With latest nightly, I cannot add a png file to video
Post by: AshleyQuick on April 20, 2017, 07:43:32 PM
This is so confusing. I made a png file with the exact dimensions of the video (720w x 404h) and dragged it onto the video. I did not get an error pop-up this time but when I clicked play, the logo cannot be seen. What am I doing wrong?
Title: Re: With latest nightly, I cannot add a png file to video
Post by: eumagga0x2a on April 20, 2017, 08:20:48 PM
What are you going to accomplish? Are you going to display a logo atop of the video or are you going to append a video made of a still picture (your png file)? In both cases you should use the "Logo" video filter and make the filter partial.

If you drag'n'dropped the png on a loaded video, it has been appended as the last frame to the video. Trying to play the video in Avidemux would actually crash the application because the number of audio channels probably doesn't match (zero in the appended image, a non-zero number in the video). With hw accelerated decoding the decoder won't be able to handle format change as well (the bundled ffmpeg works).
Title: Re: With latest nightly, I cannot add a png file to video
Post by: AshleyQuick on April 20, 2017, 08:27:19 PM
I want a watermark (a small circular png logo) to display in the top right corner for the entire duration of the video.
Title: Re: With latest nightly, I cannot add a png file to video
Post by: eumagga0x2a on April 20, 2017, 09:30:00 PM
Well, then the "Logo" ("add logo") filter without partializing is the way to go.
Title: Re: With latest nightly, I cannot add a png file to video
Post by: AshleyQuick on April 20, 2017, 10:09:12 PM
What do you mean by "without partializing"? Can you elaborate?
Title: Re: With latest nightly, I cannot add a png file to video
Post by: Jan Gruuthuse on April 21, 2017, 03:49:21 AM
Using a logo / watermark, some info can be seen in this demo video: Applying 2 Combined filter (logo swap) (https://www.youtube.com/watch?v=xRmAmx0orZM&list=PLLGMi2RSm8sbiUG2tfv8mcCzJoEsK3JVN&index=3) at our YouTube channel: Avidemux Demo (https://www.youtube.com/channel/UC7ycUgCIuOlChtpiTFfLTmw/playlists)
Title: Re: With latest nightly, I cannot add a png file to video
Post by: eumagga0x2a on April 21, 2017, 06:39:25 AM
What do you mean by "without partializing"? Can you elaborate?

Originally, I assumed you want the logo to appear only for a fraction of the total video duration. This is called in Avidemux "partializing" of a video filter (add a filter, right-click this filter in the column of active filters: the feature is listed in the context menu).

Quote from: eumagga0x2a
In both cases you should use the "Logo" video filter and make the filter partial.

If you want the png to be visible all the time, just don't use the partializing feature.
Title: Re: With latest nightly, I cannot add a png file to video
Post by: AshleyQuick on April 21, 2017, 08:01:59 AM
OK I did not choose "Make Partial" in the right click context menu but there's still a problem. When I'm back on the main screen, I don't see the logo UNLESS I place a checkmark in "Play filtered". And, most importantly, when I save the video, it's still not there.
Title: Re: With latest nightly, I cannot add a png file to video
Post by: Jan Gruuthuse on April 21, 2017, 08:53:26 AM
>8>8 When I'm back on the main screen, I don't see the logo UNLESS I place a checkmark in "Play filtered" >8 >8

this is normal, without [v] Play filtered it shows source video

Quote
And, most importantly, when I save the video, it's still not there.

When you have the logo showing with [v] Play filtered, the saved video should also have the rendered logo.
You did play the newly saved video in a player (like vlc)?

describe your steps/workflow.

Just tested:
Title: Re: With latest nightly, I cannot add a png file to video
Post by: AshleyQuick on April 21, 2017, 08:59:18 AM
OK I finally got it to work. On this page (https://www.avidemux.org/admWiki/doku.php?id=using:video_filters), I read that I had to choose something other than "Copy" under "Video Output". I choose Mpeg4 AVC (x264), saved it as .mkv and voila.
Title: Re: With latest nightly, I cannot add a png file to video
Post by: Jan Gruuthuse on April 21, 2017, 09:10:26 AM
;) If you had looked at the video, you would have known.
Applying filters (changing what you see in video) always require choosing something else then [Copy] in Video Output

[Copy] is there just to cut/append video without re-encoding (not changing what you see in frames).
Title: Re: With latest nightly, I cannot add a png file to video
Post by: eumagga0x2a on April 21, 2017, 09:17:37 AM
OK I finally got it to work. On this page (https://www.avidemux.org/admWiki/doku.php?id=using:video_filters), I read that I had to choose something other than "Copy" under "Video Output".

It seems like the fact that one can't manipulate a video (apart from cutting at i-frames) in any way without reencoding is not obvious for everyone. Will look into disabling the "Filters" button and shortcut if the copy mode is selected.
Title: Re: With latest nightly, I cannot add a png file to video
Post by: Jan Gruuthuse on April 21, 2017, 09:33:53 AM
Checked linux QT5 2.6.17:
Video Output: [Copy] = Filters is grayed out, not selectable
same on 2.6.15 app
Title: Re: With latest nightly, I cannot add a png file to video
Post by: AshleyQuick on April 21, 2017, 10:24:36 AM

It seems like the fact that one can't manipulate a video (apart from cutting at i-frames) in any way without reencoding is not obvious for everyone. Will look into disabling the "Filters" button and shortcut if the copy mode is selected.

Definitely not obvious! :)

And I apologize for missing it in the video. Thanks guys for your patience!
Title: Re: With latest nightly, I cannot add a png file to video
Post by: eumagga0x2a on April 23, 2017, 09:00:59 PM
Checked linux QT5 2.6.17:
Video Output: [Copy] = Filters is grayed out, not selectable
same on 2.6.15 app

You're absolutely right, MainWindow::comboChanged function took care of that since ages. Nevertheless, I've pushed a small patch which tweaks enabling and disabling codec widget controls a bit.