May 13, 2021, 05:13:55 AM

News:

--


Recent posts

Pages1 2 3 ... 10
1
Main version 2.6 / Re: How to convert all files i...
Last post by Vendeur - May 12, 2021, 09:17:03 PM
Oh my god, I'm stupid... Forgot to change ext to mp4...

Final script seems working and looks like this:

THANK YOU for your help! :)

#
# Load all the files with .mp4 extension in a selected directory, convert with x264 video codec at 2000cbr, audio copy and set to polish.

#
gui = Gui()
adm = Avidemux()
ext = "mp4"
#
def convert(filein):   

    if(0 == adm.loadVideo(filein)):
        gui.displayError("oops","cannot load "+filein)
        raise
    adm.videoCodec("x264", "useAdvancedConfiguration=True", "general.params=CBR=2000", "general.threads=0", "general.preset=ultrafast", "general.tuning=none", "general.profile=baseline", "general.fast_decode=False"\
, "general.zero_latency=False"
, "general.fast_first_pass=True", "general.blueray_compatibility=False", "general.fake_interlaced=False", "level=-1", "vui.sar_height=1", "vui.sar_width=1", "MaxRefFrames=3", "MinIdr=25", "MaxIdr=250"
\
, "i_scenecut_threshold=40", "intra_refresh=False", "MaxBFrame=3", "i_bframe_adaptive=1", "i_bframe_bias=0", "i_bframe_pyramid=2", "b_deblocking_filter=True", "i_deblocking_filter_alphac0=0", "i_deblocking_filter_beta=0"
, "cabac=True"\
, "interlaced=False", "constrained_intra=False", "tff=True", "fake_interlaced=False", "analyze.b_8x8=True", "analyze.b_i4x4=True", "analyze.b_i8x8=True", "analyze.b_p8x8=True", "analyze.b_p16x16=False"
, "analyze.b_b16x16=False"\
, "analyze.weighted_pred=2", "analyze.weighted_bipred=True", "analyze.direct_mv_pred=1", "analyze.chroma_offset=0", "analyze.me_method=1", "analyze.me_range=16", "analyze.mv_range=-1"
, "analyze.mv_range_thread=-1"\
, "analyze.subpel_refine=7", "analyze.chroma_me=True", "analyze.mixed_references=True", "analyze.trellis=1", "analyze.psy_rd=1.000000", "analyze.psy_trellis=0.000000", "analyze.fast_pskip=True"
, "analyze.dct_decimate=True"\
, "analyze.noise_reduction=0", "analyze.psy=True", "analyze.intra_luma=11", "analyze.inter_luma=21", "ratecontrol.rc_method=0", "ratecontrol.qp_constant=0", "ratecontrol.qp_min=10"
, "ratecontrol.qp_max=51", "ratecontrol.qp_step=4"\
, "ratecontrol.bitrate=0", "ratecontrol.rate_tolerance=1.000000", "ratecontrol.vbv_max_bitrate=0", "ratecontrol.vbv_buffer_size=0", "ratecontrol.vbv_buffer_init=1"
, "ratecontrol.ip_factor=1.400000", "ratecontrol.pb_factor=1.300000"\
, "ratecontrol.aq_mode=1", "ratecontrol.aq_strength=1.000000", "ratecontrol.mb_tree=True", "ratecontrol.lookahead=40")

    adm.audioClearTracks()

    adm.setSourceTrackLanguage(0,"pol")

    adm.audioAddTrack(0)

    adm.audioCodec(0, "copy")
    adm.audioSetDrc(0, 0)

    adm.audioSetShift(0, 0, 0)
    adm.setContainer("MP4", "muxerType=0", "optimize=1", "forceAspectRatio=False", "aspectRatio=1", "rotation=0", "clockfreq=0")

    adm.save(filein + ".converted.mp4") # save the file
    print("Done")
 
#
# Main
#

inputFolder = gui.dirSelect("Select folder")
if inputFolder is None:
    return
list = get_folder_content(inputFolder, ext)
if list is None:
    gui.displayError("Error", "Folder \"" + inputFolder + "\" contains no files with ending \"" + ext + "\"")
    return
for i in list:
    convert(i)
gui.displayInfo("Info","Operation completed")
2
Main version 2.6 / Re: How to convert all files i...
Last post by eumagga0x2a - May 12, 2021, 08:13:00 PM
Quote from: butterw on May 12, 2021, 08:06:10 PMraise("No file in folder !") in your script would be more helpful.

Or just avoiding raise alltogether, at least in the Main part:

inputFolder = gui.dirSelect("Select folder")
if inputFolder is None:
    return
list = get_folder_content(inputFolder, ext)
if list is None:
    gui.displayError("Error", "Folder \"" + inputFolder + "\" contains no files with ending \"" + ext + "\"")
    return
for i in list:
    convert(i)
gui.displayInfo("Info","Operation completed")

I posted more sophisticated scripts on different occasions, e.g. in https://avidemux.org/smif/index.php/topic,19507.0.html
3
Main version 2.6 / Re: How to convert all files i...
Last post by butterw - May 12, 2021, 08:06:10 PM
No mkv file in folder >> raise

raise("No file in folder !") in your script would be more helpful as it would provide a meaningful error message.

There are other errors in your script however:
adm.audioCodec(0, "FDK_AAC", "bitrate=128", "afterburner=True", "profile=2", "sbr=False")

ui.displayError should be gui.displayError
4
Main version 2.6 / Re: How to convert all files i...
Last post by eumagga0x2a - May 12, 2021, 07:59:59 PM
The exception is raised because the list, returned by get_folder_content is empty.
5
Main version 2.6 / Re: How to convert all files i...
Last post by Vendeur - May 12, 2021, 07:25:13 PM
Quote from: butterw on May 12, 2021, 10:40:27 AM
Quote from: Vendeur on June 22, 2016, 11:26:35 AMI hope one day that simple option will be available just in menu.

Batch processing could either be achieved with a project menu function that auto-generates a batch script based on the current settings.
or it could be an integrated job-list type feature (would make it simpler to cancel a started job).

scripts can be added to the custom menu in the Gui.

Yeah, this is so stupid, that such a good software have not so simple feture to convert all files in the a folder... After so many years...

I still can't run .py file. Even tried the old one (above in the topic) and do not work.
I reworked on my new one (below) and still got some error:



#
# Load all the files with .mp4 extension in a selected directory, convert with x264 video codec at 2000cbr, aac 128kb audio codec

#
gui = Gui()
adm = Avidemux()
ext = "mkv"
#
def convert(filein):   

    if(0 == adm.loadVideo(filein)):
        ui.displayError("oops","cannot load "+filein)
        raise
    adm.videoCodec("x264", "useAdvancedConfiguration=True", "general.params=CBR=2000", "general.threads=0", "general.preset=ultrafast", "general.tuning=none", "general.profile=baseline", "general.fast_decode=False"\
, "general.zero_latency=False"
, "general.fast_first_pass=True", "general.blueray_compatibility=False", "general.fake_interlaced=False", "level=-1", "vui.sar_height=1", "vui.sar_width=1", "MaxRefFrames=3", "MinIdr=25", "MaxIdr=250"
\
, "i_scenecut_threshold=40", "intra_refresh=False", "MaxBFrame=3", "i_bframe_adaptive=1", "i_bframe_bias=0", "i_bframe_pyramid=2", "b_deblocking_filter=True", "i_deblocking_filter_alphac0=0", "i_deblocking_filter_beta=0"
, "cabac=True"\
, "interlaced=False", "constrained_intra=False", "tff=True", "fake_interlaced=False", "analyze.b_8x8=True", "analyze.b_i4x4=True", "analyze.b_i8x8=True", "analyze.b_p8x8=True", "analyze.b_p16x16=False"
, "analyze.b_b16x16=False"\
, "analyze.weighted_pred=2", "analyze.weighted_bipred=True", "analyze.direct_mv_pred=1", "analyze.chroma_offset=0", "analyze.me_method=1", "analyze.me_range=16", "analyze.mv_range=-1"
, "analyze.mv_range_thread=-1"\
, "analyze.subpel_refine=7", "analyze.chroma_me=True", "analyze.mixed_references=True", "analyze.trellis=1", "analyze.psy_rd=1.000000", "analyze.psy_trellis=0.000000", "analyze.fast_pskip=True"
, "analyze.dct_decimate=True"\
, "analyze.noise_reduction=0", "analyze.psy=True", "analyze.intra_luma=11", "analyze.inter_luma=21", "ratecontrol.rc_method=0", "ratecontrol.qp_constant=0", "ratecontrol.qp_min=10"
, "ratecontrol.qp_max=51", "ratecontrol.qp_step=4"\
, "ratecontrol.bitrate=0", "ratecontrol.rate_tolerance=1.000000", "ratecontrol.vbv_max_bitrate=0", "ratecontrol.vbv_buffer_size=0", "ratecontrol.vbv_buffer_init=1"
, "ratecontrol.ip_factor=1.400000", "ratecontrol.pb_factor=1.300000"\
, "ratecontrol.aq_mode=1", "ratecontrol.aq_strength=1.000000", "ratecontrol.mb_tree=True", "ratecontrol.lookahead=40")

    adm.audioClearTracks()

    adm.setSourceTrackLanguage(0,"und")

    adm.audioAddTrack(0)

    adm.audioCodec(0,);

    adm.audioSetDrc(0, 0)

    adm.audioSetShift(0, 0, 0)
    adm.setContainer("MP4", "muxerType=0", "optimize=1", "forceAspectRatio=False", "aspectRatio=1", "rotation=0", "clockfreq=0")

    adm.save(filein + ".converted.mp4") # save the file
    print("Done")
 
#
# Main
#

inputFolder = gui.dirSelect("Select folder")
#
list=get_folder_content(inputFolder,ext)
if(list is None):
    raise
for i in list:
        convert(i)
print("Done")
6
Main version 2.6 / Re: EXIF tags are not kept whe...
Last post by butterw - May 12, 2021, 06:29:19 PM
It may be possible to extract the info you want to keep and automatically reapply it to the Avidemux output (with an external command-line tool).
If you simply want to keep the recording date/time, adding it to the filename is the easiest solution.

7
Main version 2.6 / EXIF tags are not kept when ed...
Last post by noopsit - May 12, 2021, 06:01:11 PM
Hi, I'm using avidemux mainly to shorten my footage before I edit it in other tools like DaVinci or Premiere. I especially like the fact that no re-encoding is needed as long as you cut on key frames. My footage is mainly drone footage and it contains valuable information in the EXIF tagsd like the timestamp when the video was recored. Unfortunately, these tags are removed as soon as the video is saved. I have been using the MP4 muxer with video & audio options set to "Copy". It would be great if Avidemux could keep the EXIF data, or, in case multiple videos have been put together, the tags from the first video.

Great program btw! Thanks
8
Please report issues with third-party builds and packages to their respective maintainers (here: to Jhonny Oliveira). I guess, he needs to make avidemux-jobs-qt depend on avidemux-cli (the package you need to install to solve the issue for you).
9
I have installed Avidemux 2.7.8 on Ubuntu 20.04 from the PPA provided by xtradeb applications (ppa:xtradeb/apps).
I first executed `avidemux3_qt5` and queued up several jobs.
I then executed `avidemux3_jobs_qt5` and selected "Run jobs". Every job failed within 7 seconds. I checked the log and found that all jobs fail because of `/usr/bin/avidemux3_cli: not found`. No `avidemux3_cli` or similar file is to be found at `/usr/bin/`.
When running "Avidemux Jobs" the option "use Qt version" _has_ to be checked, otherwise all jobs will fail.

See https://pastebin.com/XfvLgmvj for a log.
10
Main version 2.6 / Re: How to convert all files i...
Last post by butterw - May 12, 2021, 10:40:27 AM
Quote from: Vendeur on June 22, 2016, 11:26:35 AMI hope one day that simple option will be available just in menu.

Batch processing could either be achieved with a project menu function that auto-generates a batch script based on the current settings.
or it could be an integrated job-list type feature (would make it simpler to cancel a started job).

scripts can be added to the custom menu in the Gui.
Pages1 2 3 ... 10