VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 53 of 53
  1. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    If you have the pause as the last line in your batch file, the script should stop and wait for a keypress.
    If it's not stopping then add this to the beginning of the batch file and save.
    Code:
    cmd /k ffmpeg -i "sb1.mkv" -map 0:v -map 0:a -map 0:s -c copy..........
    Then try it again.
    Maybe it can't find ffmpeg.exe.
    Copy it from the 'Program Files' folder to the folder with the video and batch file'

    I keep copies if ffmpeg.exe and ffprobe.exe in my 'C:\Windows\System32\' folder.
    People will rabbit on about copying programs to system folders.
    I know what I'm doing. I build my own copies of the ffmpeg suite.
    Last edited by pcspeak; 18th Nov 2024 at 20:38.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Lon, powershell not necessary, regular CMD prompt will do.
    Quote Quote  
  3. one last screen shot... this is all the organization I can see in the ffmpeg bin folder.
    Image Attached Thumbnails Click image for larger version

Name:	binfolderofffmpeg.png
Views:	29
Size:	137.6 KB
ID:	83595  

    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    You could turn on file extensions so you can see the file types.
    Control panel/view tab/file (or Explorer) options/deselect "hide extensions for known file types"
    Quote Quote  
  5. A good reminder. Thanks. I hardly know how everything got set to not show everything.
    Quote Quote  
  6. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    I took another look at the batch file.
    Turns out it's quite a string. I included mild denoising before and after the sharpening. To me, it seems to give a slightly better result.
    sticksbones-2.cmd
    Code:
    ffmpeg -i "sb1.mkv" -map 0:0 -map 0:1 -map 0:2 ^
        -vf crop="in_w:in_h-62:0:0",pad="in_w:in_h+62:0:0",atadenoise,unsharp,atadenoise ^
        -c:v libx264 -profile:v high -level:v 4.0 -preset medium -crf 22 ^
        -c:a copy -c:s copy -y "sb1-new.mkv"
    Quote Quote  
  7. FWIW , here is a video inpainting machine learning example of "logo removal" of the timecode overlay using propainter. It's not what I would call "seamless", but probably an ok job. YMMV depending on the source, algorithm used, settings used, and pre/post filtering

    "compare_propainter_crop8_nofiltering.mkv" compares the original with propainter without any filtering except cropping 8 pixels from the bottom for the head switching noise
    "propainter_crop8_unfiltered_softsubs.mkv" is what it would look like with the audio/subs added
    "propainter_crop8_add60_unfiltered_softsubs.mk v" is the above, but with 60 pixels of black bar added to the bottom

    Note that these are unprocessed results (except for the crop). Normally you would prefilter - because of the noise/flicker in the source - video inpainting algorithms can copy noise and compression artifacts into the repair patch area , and post filter to smooth out the results and improve the temporal consistency. Also, these are the results of the publicly available generic models . If you train your own models specific for your usage case - you should be able to get better results


    Propainter tends to do ok when there is motion, when textures are "revealed" underneath the "logo" on other frames. But when you have complete logo coverage of an area underneath , such as when there is little motion - video inpainting relies on more spatial inpainting , instead of temporal where it can get data from other frames

    While both have various settings you can adjust , FGT IMO generally does a better job of spatial inpainting

    In the second scene, there is little camera or subject motion - the timecode overlay covers the same section and you cannot see "clean areas" on nearby frames without the overlay. The patch is more desaturated, discolored with propainter.

    "compare_sc2_propainter_fgt_unfiltered.mkv" compares a crop of area around the repair of scene2 with original, propainter, fgt



    There is a learning curve to use these free video inpainting tools . They are not 1 click. Seriously difficult if you're not familiar with python or command line tools. Propainter has a vapoursynth port, so it's somewhat easier to use . I think selur has a hybrid bundle addon for it. FGT is supposed to get an improved version FGT++, but the author has not released it yet

    I've posted about propainter before in other threads and forums, you can find other comparisons , examples, links to other video inpainting projects, pros/cons and more info if you search .

    https://github.com/sczhou/ProPainter
    https://github.com/dan64/vs-propainter

    https://github.com/hitachinsk/FGT

    I don't mind helping out with specific questions, but I will not help out step by step . It's something you have to invest time in learning
    Quote Quote  
  8. Today I'm just adding a refreshed screen shot from davenext prompt on seeing file extentions below.

    If everything is in the right folder to run the cmd I've done all I can on it.
    If the ^ markings in the cmd mean that all blank spaces and such are ignored as pcspeak said, then the
    cmd should not require any editing (?)

    I can make a screen shot of the actual cmd file.

    As we speak I've seen nothing run yet except for a screen wink. But I've also done all I can on it.

    I will add the new cmd pcspeak made today to the folder.
    Image Attached Thumbnails Click image for larger version

Name:	sticksandbones ffmpeg folder refresh.png
Views:	18
Size:	210.1 KB
ID:	83609  

    Quote Quote  
  9. @poisondeathray

    Thanks for showing all that. My idea for actually presenting this play to a private group is to have the original without mods just to show its historic nature and have this subtitle version as an option. This would avoid any distracting screen "smudges" and such from
    a watermark mask. Also the fact that the overlay for the timer is screen center rather than in a corner.
    Quote Quote  
  10. Originally Posted by pcspeak View Post
    If you have the pause as the last line in your batch file, the script should stop and wait for a keypress.
    If it's not stopping then add this to the beginning of the batch file and save.
    Code:
    cmd /k ffmpeg -i "sb1.mkv" -map 0:v -map 0:a -map 0:s -c copy..........
    Then try it again.

    Maybe it can't find ffmpeg.exe.
    Copy it from the 'Program Files' folder to the folder with the video and batch file'

    I keep copies if ffmpeg.exe and ffprobe.exe in my 'C:\Windows\System32\' folder.
    People will rabbit on about copying programs to system folders.
    I know what I'm doing. I build my own copies of the ffmpeg suite.
    I will add the pause command.

    Today I couldn't resist at least trying the new CMD. It executed a bit and then showed (in a blink) some red error text at the
    end. I'll add a screen shot of that. At least some of it appears to be working. The only thing I can do is follow instructions by rote on this.

    On the ffmpeg copy to syst32, I don't know if that is allowed without special permisssions.
    Quote Quote  
  11. Progress

    Here is the screen shot of the new cmd2 which I ran from the ffpeg folder.
    You can see that the system 32 folder is where the cmd took place. I did not add or do anything in the syst32 folder.
    Image Attached Thumbnails Click image for larger version

Name:	sticksandbonescmd2errors.png
Views:	25
Size:	116.6 KB
ID:	83610  

    Quote Quote  
  12. The command in post 36 works ok for me. I think you have a copy paste error, since apparently map 0:2 matches no streams

    You can delete all the caret symbols and do 1 big line if you want
    Quote Quote  
  13. At some point I will try it once more and maybe make a screen shot of the actual cmd text. Aside from that I can't do much if it is running for anyone else using what I have posted in the folder.

    I don't see why the cmd goes to sys32 or root in the execution shot. Anyway, other things to do today away from the PC.
    Quote Quote  
  14. A screenshot of the actual text of the cmd:
    Image Attached Thumbnails Click image for larger version

Name:	sticksandbonescmd2 as text.png
Views:	20
Size:	150.1 KB
ID:	83629  

    Quote Quote  
  15. Try it on the sample video first, "Sticks and Bones CLIP SIX.mkv", because that works for certain. It might be the stream numbering is different on "sb1.mkv". It might not have subs - it should be 0:2 (or it is on the sample)
    Quote Quote  
  16. For Win7 you can open a normal command prompt , you don't need power shell . Hold shift + right click => open command window here

    See this
    https://www.sevenforums.com/tutorials/27778-open-command-window-here.html

    If you open a command prompt and use ffmpeg -i input.ext, it will tell you about the stream maps, and some basic info about what ffmpeg "thinks" about the file

    If you use 2> to redirect, you can print that to a text file, so you don't have to post cut off screenshots that are missing information like the one in post 41.

    eg. Open a command prompt as above at the level of the "bin" folder (the same location where you have sb1.mkv and ffmpeg.exe in your screenshots)

    Code:
    ffmpeg -i "sb1.mkv" 2>info.txt
    Open info.txt in notepad, post the text back here
    Quote Quote  
  17. I don't know what all this is. But the screen shot at line 41 is the last line. I managed to squeeze it in on Paint and checked it.

    Doing diagnostics for error messages is not something I can do. And "It works for me" is no answer.

    But I will try the old sample sb whatevs for a run.
    Quote Quote  
  18. After I rewrote the txt and cmd to the Sticks and Bones CLIP SIX.mkv it worked and completed and wrote the new mkv file to the same directory.

    What I saw when attempting to open a cmd prompt in the folder didn't look right. I think it just copied in the location.
    on the Clip Six.

    The MediaInfo shows my text stream added to the CLIP SIX version:

    General
    Unique ID : 330712705679557441412774781154416760940 (0xF8CCF345ED6D7A9C6D0E6975AB3D986C)
    Complete name : C:\Program Files\ffmpeg-master-latest-win64-gpl-shared\ffmpeg-master-latest-win64-gpl-shared\bin\Sticks and Bones CLIP SIX.mkv
    Format : Matroska
    Format version : Version 4
    File size : 1.86 MiB
    Duration : 24 s 458 ms
    Overall bit rate mode : Variable
    Overall bit rate : 636 kb/s
    Frame rate : 29.970 FPS
    Movie name : sticksclip-NEW w sub
    Encoded date : 2024-11-18 19:26:28 UTC
    Writing application : mkvmerge v67.0.0.16 ('Under Stars') 64-bit
    Writing library : libebml v1.4.2 + libmatroska v1.6.4 / Lavf57.83.100

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L3
    Format settings : CABAC / 3 Ref Frames
    Format settings, CABAC : Yes
    Format settings, Reference frames : 3 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 24 s 457 ms
    Bit rate : 517 kb/s
    Width : 616 pixels
    Height : 480 pixels
    Display aspect ratio : 1.283
    Frame rate mode : Constant
    Frame rate : 29.970 (29970/1000) FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.058
    Stream size : 1.51 MiB (81%)
    Default : Yes
    Forced : No

    Audio
    ID : 2
    Format : MPEG Audio
    Format version : Version 1
    Format profile : Layer 3
    Format settings : Joint stereo / MS Stereo
    Codec ID : A_MPEG/L3
    Codec ID/Hint : MP3
    Duration : 24 s 451 ms
    Bit rate mode : Variable
    Bit rate : 115 kb/s
    Channel(s) : 2 channels
    Sampling rate : 44.1 kHz
    Frame rate : 38.281 FPS (1152 SPF)
    Compression mode : Lossy
    Delay relative to video : 7 ms
    Stream size : 342 KiB (18%)
    Default : Yes
    Forced : No

    Text
    ID : 3
    Format : UTF-8
    Codec ID : S_TEXT/UTF8
    Codec ID/Info : UTF-8 Plain Text
    Duration : 18 s 80 ms
    Bit rate : 89 b/s
    Frame rate : 0.387 FPS
    Count of elements : 7
    Stream size : 203 Bytes (0%)
    Default : Yes
    Forced : No


    I wasn't understanding how to get a printable text version of the completed CLIP SIX run where the CMD is:

    Code:
    ffmpeg -i "Sticks and Bones CLIP SIX.mkv" -map 0:0 -map 0:1 -map 0:2 ^
        -vf crop="in_w:in_h-62:0:0",pad="in_w:in_h+62:0:0",atadenoise,unsharp,atadenoise ^
        -c:v libx264 -profile:v high -level:v 4.0 -preset medium -crf 22 ^
        -c:a copy -c:s copy -y "sb1-new.mkv"
    .... and that with all the spaces and such is how it looks. The other thing I don't know how to do is make a 'code box display.'


    So to review:

    This "Sticks and Bones Clip SIX" has the srt subtitle muxed in and sb1.mkv does not (from running Media info on that.)

    Apologies if I get short tempered on this. I was going to quit this project but then the ClIP SIX started to work.
    Quote Quote  
  19. Above I found the # code command.
    Quote Quote  
  20. Success.

    I hope I am not making a jinx but I got the new code working with the original mkv. I don't know if there are other tweaks that pcspeak mentioned, but the black area does not seem to mask anything relevant on the part I watched. What I will do is get a copy of the play text from interlibrary loan and do what I can to fix any errors in the dialog on the Youtube srt. The play text is ordered from my library but all that takes a long time. I've done a few of these subs projects before but without the need of video edits.

    Thanks to all who helped and their patience in explaining things. I don't know if anything more will be needed since I have not viewed the whole show yet.
    Quote Quote  
  21. Avisynth script:

    #InpaintLoc(Loc="232,412,-192,-24")
    InpaintDelogo(mask="D:\Sticks and Bones.bmp", Loc="232,412,-192,-24", Mode="Inpaint", Inflate=2)
    CropResize(604,0, 0,2,-14,-8)
    TextSub("D:\Sticks and Bones.srt", 1)
    Image Attached Files
    Quote Quote  
  22. @ hello_hello,

    Greetings from many years ago.

    I am back continuing this thread with a new project. This one came from a public torrent on Internet Archive site so it's apparently public domain.

    I'd like to use the info above to enhance this play from 1988. It's in two parts of about 1 1/2 Gb each.

    General
    Complete name : C:\Users\lon\Desktop\the-taming-of-the-shrew-stratford-festival-1988\The_Taming_of_the_Shrew-Stratford_Festival-1988.mp4
    Format : MPEG-4
    Format profile : Base Media
    Codec ID : isom (isom/iso2/avc1/mp41)
    File size : 1.49 GiB
    Duration : 2 h 39 min
    Overall bit rate : 1 335 kb/s
    Frame rate : 29.970 FPS
    Movie name : TAMINGOFTHESHREW_Title2
    Writing application : WinXDVD-"Digiarty DVD Engine v2017"

    Video
    ID : 1
    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : Baseline@L3
    Format settings : 1 Ref Frames
    Format settings, CABAC : No
    Format settings, Reference frames : 1 frame
    Codec ID : avc1
    Codec ID/Info : Advanced Video Coding
    Duration : 2 h 39 min
    Bit rate : 1 200 kb/s
    Width : 636 pixels
    Height : 480 pixels
    Display aspect ratio : 4:3
    Frame rate mode : Constant
    Frame rate : 29.970 (30000/1001) FPS
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.131
    Stream size : 1.34 GiB (90%)
    Codec configuration box : avcC

    Audio
    ID : 2
    Format : AAC LC
    Format/Info : Advanced Audio Codec Low Complexity
    Codec ID : mp4a-40-2
    Duration : 2 h 39 min
    Bit rate mode : Constant
    Bit rate : 128 kb/s
    Channel(s) : 2 channels
    Channel layout : L R
    Sampling rate : 44.1 kHz
    Frame rate : 43.066 FPS (1024 SPF)
    Compression mode : Lossy
    Stream size : 146 MiB (10%)
    Default : Yes
    Alternate group : 1


    --> I just got it so I will add a 20 sec clip tomorrow

    @pcspeak, I'd like to know what changes to make of the CMD file discussed in this thread since no black box and such is needed just any video tweaks for this -- likely VHS recording to improve it.
    Quote Quote  
  23. Ok, I stayed up and found a nice clip of this Taming of the Shrew with the young Colm Fiore.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!