VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Well Samsung is selling the NX1. It records HEVC 4096 x 2160 @ 24p and 3840 x 2160 @ 30p. I'm sure people that buy it will be scratching their heads trying to edit it. The only way I've found (so far) to edit HEVC natively is to use an editor that supports ffmpeg to import. I'm not sure this is ideal, but it can work. Here's what I've tried so far:

    Aviutl - You'll need to change max resolution in System Properties to 4096 x 2160
    ShotCut - It can import HEVC. This program has limited editing abilities and runs better under Linux than Windows.
    Virtualdub - You can import HEVC via the latest ffmpeg input plugin or an Avisynth script.

    I have a feeling Samsung will have a hard time selling these because of the difficulties. I'll wait till the price falls substantially and maybe I'll take the plunge.

    Here is a site where you can download original source clips to try out for yourself: http://www.imaging-resource.com/news/2014/11/19/samsung-nx1-4k-video-samples-and-new-f...ailable-for-do

    If you don't want to download large files like that, I trimmed (losslessly) two of them at 10 sec each using ffmpeg + stream copy. You can try and see for yourself. Maybe this thread might help someone searching for a way to edit HEVC without transcoding into an intermediate codec first.
    Image Attached Files
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  2. Good work racer. Methinks that the general public will not be editing 4K directly for awhile.
    Extraordinary claims require extraordinary evidence -Carl Sagan
    Quote Quote  
  3. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Option # 2: Transcoding to intermediate codec to facilitate editing.....................

    This is easy to do in batch mode with ffmpeg. Copy and paste the scripts below into Notepad, edit path to ffmpeg (use 64-bit version!) and save as WhateverName.bat. Create a sub-folder called "INT" in your video clips folder. Then drag the 1st mp4 into the appropriate .bat file and all will be processed and save in the INT folder.

    1) HEVC_AVC.bat - This is a good option, the quality/size is decent and is easier to work with than hevc...
    Code:
    SET PATH="E:\FFMpeg\64-bit"
    for %%a in ("*.mp4") do ffmpeg -i "%%a" -c:v libx264 -level 50 -pix_fmt yuv420p -preset medium -crf 19 -g 24 -c:a copy -f mp4 "INT\%%~na.mp4"
    
    pause
    2) HEVC_ProRes.bat - This is also a good option for quality, but file size is much, much larger....
    Code:
    SET PATH="E:\FFMpeg\64-bit"
    for %%a in ("*.mp4") do ffmpeg -i "%%a" -c:v prores -profile:v 1 -threads 8 -c:a pcm_s16le -ar 48000 -f mov "INT\%%~na.mov"
    
    pause
    3) HEVC_MPG.bat - This would be a good option, but Mpeg-2 is limited to UHD resolutions. It doesn't support a resolution higher than 4095. You can still encode with it if you use the "-strict -1" command. However Vegas won't recognize Mpeg-2 resolution higher than UHD. The switch is included in this script just the same...
    Code:
    SET PATH="E:\FFMpeg\64-bit"
    for %%a in ("*.mp4") do ffmpeg -i "%%a" -strict -1 -c:v mpeg2video -pix_fmt yuv420p -q:v 4 -qmin 1 -g 12 -c:a mp2 -ar 48000 -ab 384k -f mpegts "INT\%%~na.ts"
    
    pause
    ...And last, but not least, if you want to trim losslessly, you can use this script. Edit the "-t" command, path to ffmpeg and create a sub-folder called "CUT"
    Code:
    SET PATH="E:\FFMpeg\64-bit"
    for %%a in ("*.mp4") do ffmpeg -i "%%a" -t 10 -c copy -f mp4 "cut\%%~na.mp4"
    
    pause
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  4. Mpeg-2 is limited to UHD resolutions.
    Is this a libav limitation? (if it is reporting it to the bug tracker and getting it fixed shouldn't be much of a problem)
    Don't recall anything in the specification which limits the resolution to UHD and below. (sure some decoders will be limited, but afaik the standard itself
    isn't limited that way)

    However Vegas won't recognize Mpeg-2 resolution higher than UHD.
    Complain to Sony.

    ... if you want to trim losslessly, you can use this script.
    you have to do the same thing you do with all MPEG based formats you cut on key-frames.

    -------------------------

    The main problem I see atm
    . is that libav doesn't support conversions from and to Rec. 2020 (https://trac.ffmpeg.org/ticket/2382) atm. (and none of the ways you mentioned does )
    The Sony NX1 does use Rec. 2020, doesn't it ?
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  5. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    The main problem I see atm. is that libav doesn't support conversions from and to Rec. 2020 (https://trac.ffmpeg.org/ticket/2382) atm. (and none of the ways you mentioned does )
    The Sony NX1 does use Rec. 2020, doesn't it ?
    Good question. If Media Info is to be believed, then the answer is NO.
    General
    Complete name : E:\Stock\Stock_Footage_4K\NX1 4k_clips\HEVC\NX1_4k_24p.MP4
    Format : MPEG-4
    Format profile : Base Media / Version 2
    Codec ID : mp42
    File size : 165 MiB
    Duration : 38s 384ms
    Overall bit rate mode : Variable
    Overall bit rate : 36.1 Mbps
    Encoded date : UTC 2014-11-14 04:57:42
    Tagged date : UTC 2014-11-14 04:57:42

    Video
    ID : 1
    Format : HEVC
    Format/Info : High Efficiency Video Coding
    Format profile : Main@L5.1
    Codec ID : hvc1
    Codec ID/Info : High Efficiency Video Coding
    Duration : 38s 375ms
    Bit rate : 36.0 Mbps
    Width : 4 096 pixels
    Height : 2 160 pixels
    Display aspect ratio : 1.896
    Frame rate mode : Constant
    Frame rate : 24.000 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Bits/(Pixel*Frame) : 0.169
    Stream size : 164 MiB (99%)
    Language : English
    Encoded date : UTC 2014-11-14 04:57:42
    Tagged date : UTC 2014-11-14 04:57:42
    Color primaries : BT.709
    Transfer characteristics : BT.709
    Matrix coefficients : BT.709

    Audio
    ID : 2
    Format : AAC
    Format/Info : Advanced Audio Codec
    Format profile : LC
    Codec ID : 40
    Duration : 38s 384ms
    Source duration : 38s 379ms
    Bit rate mode : Variable
    Bit rate : 192 Kbps
    Channel(s) : 2 channels
    Channel positions : Front: L R
    Sampling rate : 48.0 KHz
    Compression mode : Lossy
    Stream size : 890 KiB (1%)
    Source stream size : 890 KiB (1%)
    Language : English
    Encoded date : UTC 2014-11-14 04:57:42
    Tagged date : UTC 2014-11-14 04:57:42
    mdhd_Duration : 38384
    ......And for the record, ffmpeg always defaults to nearest key-frame / I-frame when you choose "-c copy"
    Last edited by racer-x; 29th Nov 2014 at 16:12.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  6. Ah, okay it's 8bit content. Rec. 2020 is for 10&12bit content.
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  7. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Interestingly enough, if you do a google search for "editing hevc", this post comes up at #4. Hopefully someone will get some use from it................

    It would be great if someone would contribute with other methods to help those who surely will come here for help.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  8. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    Well I just upgraded my PC to an i7 4790 with 12 GB RAM and wanted to see how well it could edit this 4k HEVC footage from Samsung NX1. It did very well actually. I did a screen recording while I edited a native 4k hevc clip. I just did quick basic edits and left the SysMonitor running for reference. It edited pretty smoothly using Aviutl and is very doable with a very fast PC.

    Attached is the screenshot video and the export video.
    Image Attached Files
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!