VideoHelp Forum
+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Member
    Join Date
    Jan 2009
    Location
    United Kingdom
    Search Comp PM
    Im trying to use the external encoder for virtualdub but it keeps hanging at the end of the render saying possible live lock.

    I simply need it to encode an avi to mp4 ready to upload to youtube.

    This is the code:

    Code:
    {
    	"description": "VirtualDub external encoder profile collection",
    	"externalEncoders": {
    		"sets": {			
    			"AVI to YouTube": {
    				"videoEncoder": "FFmpeg Video",
    				"audioEncoder": "FFmpeg AAC-LC",
    				"multiplexer": "FFmpeg Multiplexer",
    				"description": "(name.mp4 - video + audio)",
    				"extension": "mp4",
    				"processPartial": false,
    				"useOutputAsTemp": false
    			}
    		},
    		"profiles": {
    			"FFmpeg Video": {
    				"name": "FFmpeg Video Encoder",
    				"program": "C:\\Encoders\\ffmpeg\\ffmpeg.exe",
    				"commandArguments": "-f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 \"%(tempvideofile)\"",
    				"outputFilename": "%(outputname).264",
    				"type": 0,
    				"inputFormat": 0,
    				"checkReturnCode": true,
    				"logStdout": true,
    				"logStderr": false,
    				"bypassCompression": false,
    				"predeleteOutputFile": false
    			},
    			"FFmpeg AAC-LC": {
    				"name": "FFmpeg Audio",
    				"program": "C:\\Encoders\\ffmpeg\\ffmpeg.exe",
    				"commandArguments": "-i - -c:a aac -b:a 384k -profile:a aac_low \"%(tempaudiofile)\"",
    				"outputFilename": "%(outputname).aac",
    				"type": 1,
    				"inputFormat": 1,
    				"checkReturnCode": true,
    				"logStdout": true,
    				"logStderr": true,
    				"bypassCompression": false,
    				"predeleteOutputFile": false
    			},
    			"FFmpeg Multiplexer": {
    				"name": "FFMpeg Multuplex",
    				"program": "C:\\Encoders\\ffmpeg\\ffmpeg.exe",
    				"commandArguments": "-i \"%(tempvideofile)\" -i \"%(tempaudiofile)\" -map 0 -map 1 -c copy -f mp4 -y",
    				"outputFilename": "%(outputname).mp4",
    				"type": 2,
    				"inputFormat": 0,
    				"checkReturnCode": true,
    				"logStdout": true,
    				"logStderr": true,
    				"bypassCompression": false,
    				"predeleteOutputFile": false
    			}
    		}
    	}
    }
    3 files are created called:
    • test.mp4.264
    • test.mp4.aac
    • test.mp4

    The progress bar sits at 100%, the Log says:

    Dub: Processing thread not cycled for thirty seconds - possible livelock
    And I have to quit VirtualDub as its hung.

    Help appreciated!
    Quote Quote  
  2. Does this happen with every input file? What input file driver are you using? Is the source an AviSynth script?

    I see one of your temp files is called "test.mp4.264" (i.e. .264 file extension). Since you haven't forced mp4 output using -f either the temp video file will not be mp4 container but H.264 elementary stream. This will eventually lead to a broken output file since ffmpeg doesn't mux the latter correctly to mp4.
    Quote Quote  
  3. Member
    Join Date
    Jan 2009
    Location
    United Kingdom
    Search Comp PM
    Yeah any avi file. The source is whatevers loaded in virtualdub. I havent used ffmpeg before so not entirely sure about the commands im using. Ill try adding the -f to the video command. Do i need to add it to the audio one too?
    Quote Quote  
  4. It's "-f mp4" for mp4 format forcing. Also add "-y" to every command to make sure it overwrites existing files. And post the complete VirtualDub log, not just the last line.
    Quote Quote  
  5. Member
    Join Date
    Jan 2009
    Location
    United Kingdom
    Search Comp PM
    Ok. Added those commands but still same issue:

    Code:
    {
    	"description": "VirtualDub external encoder profile collection",
    	"externalEncoders": {
    		"sets": {			
    			"VHS to YouTube": {
    				"videoEncoder": "FFmpeg Video",
    				"audioEncoder": "FFmpeg AAC-LC",
    				"multiplexer": "FFmpeg Multiplexer",
    				"description": "(name.mp4 - video + audio)",
    				"extension": "mp4",
    				"processPartial": false,
    				"useOutputAsTemp": false
    			}
    		},
    		"profiles": {
    			"FFmpeg Video": {
    				"name": "FFmpeg Video Encoder",
    				"program": "C:\\Encoders\\ffmpeg\\ffmpeg.exe",
    				"commandArguments": "-f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -c:v libx264 -preset slow -profile:v high -crf 18 -coder 1 -pix_fmt yuv420p -movflags +faststart -g 30 -bf 2 -f mp4 -y \"%(tempvideofile)\"",
    				"outputFilename": "%(outputname).264",
    				"type": 0,
    				"inputFormat": 0,
    				"checkReturnCode": true,
    				"logStdout": true,
    				"logStderr": false,
    				"bypassCompression": false,
    				"predeleteOutputFile": false
    			},
    			"FFmpeg AAC-LC": {
    				"name": "FFmpeg Audio",
    				"program": "C:\\Encoders\\ffmpeg\\ffmpeg.exe",
    				"commandArguments": "-i - -c:a aac -b:a 384k -profile:a aac_low -y \"%(tempaudiofile)\"",
    				"outputFilename": "%(outputname).aac",
    				"type": 1,
    				"inputFormat": 1,
    				"checkReturnCode": true,
    				"logStdout": true,
    				"logStderr": true,
    				"bypassCompression": false,
    				"predeleteOutputFile": false
    			},
    			"FFmpeg Multiplexer": {
    				"name": "FFMpeg Multuplex",
    				"program": "C:\\Encoders\\ffmpeg\\ffmpeg.exe",
    				"commandArguments": "-i \"%(tempvideofile)\" -i \"%(tempaudiofile)\" -map 0 -map 1 -c copy -f mp4 -y",
    				"outputFilename": "%(outputname).mp4",
    				"type": 2,
    				"inputFormat": 0,
    				"checkReturnCode": true,
    				"logStdout": true,
    				"logStderr": true,
    				"bypassCompression": false,
    				"predeleteOutputFile": false
    			}
    		}
    	}
    }
    Attached the log as well.

    Thanks.
    Image Attached Files
    Quote Quote  
  6. you can also try vdub2 - it can export using x264 / aac / mp4 directly without the external encoder feature
    Quote Quote  
  7. Originally Posted by Bassquake View Post
    Attached the log as well.
    In the external encoder video settings activate "redirect standard error to log", then run and post log again.

    How long is the source video? Only 7 seconds? Does the encode finish if you cut it to 6 seconds?
    Quote Quote  
  8. Member
    Join Date
    Jan 2009
    Location
    United Kingdom
    Search Comp PM
    Im just selecting a part of the timeline for testing as its about 50 minutes long!

    Have attached log with "redirect standard error to log" for video:
    Image Attached Files
    Quote Quote  
  9. Member
    Join Date
    Jan 2009
    Location
    United Kingdom
    Search Comp PM
    Also tried it in vdub2 as suggested by poisondeathray. I know vdub2 exports mp4 but I'd rather the external encoder working as well.

    There's a bit more detail on the error which might give clues:

    Image
    [Attachment 46617 - Click to enlarge]


    And the log file is attached.
    Image Attached Files
    Quote Quote  
  10. You are missing "%(outputname)" from the muxer settings.
    Image Attached Files
    Last edited by sneaker; 27th Aug 2018 at 05:34.
    Quote Quote  
  11. Member
    Join Date
    Jan 2009
    Location
    United Kingdom
    Search Comp PM
    @sneaker: I tried your fix but it still does same thing. See log from normal virtualdub:

    Edit: Seems to work on vdub2 though :/
    Image Attached Files
    Quote Quote  
  12. I reuploaded the fix. Try again with VirtualDub2. It should fix the "CLI: multiplexing failed with ...." message. It will not fix the livelock you have with the old VirtualDub. That seems to be a deeper problem and is not because of wrong settings. Maybe it's a problem with the input drivers or VfW/ACM codecs.
    Quote Quote  
  13. Member
    Join Date
    Jan 2009
    Location
    United Kingdom
    Search Comp PM
    Thanks sneaker. Yes, it sounds like an issue with VirtualDub itself. Wish Id known that before bashing head on desk over it!
    Quote Quote  



Similar Threads

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