Converting from h265 (HEVC) to h264

About encoding, codec settings, muxers and filter usage
old
New Cone
New Cone
Posts: 1
Joined: 03 Jun 2015 20:29

Converting from h265 (HEVC) to h264

Postby old » 03 Jun 2015 20:40

Hi All,

I'm trying to convert an h265 video to h264, but my stream is only converting the audio.
I'm not very experienced with how to set this up, as I rarely have to transcode videos.
Below is the generated stream output string:

Code: Select all

:sout=#transcode{vcodec=h264,scale=Auto,acodec=mpga,ab=128,channels=2,samplerate=8000}:file{dst=C:\\Users\\scott\\Documents\\GoTs2\\s2e1.mp4,no-overwrite} :sout-keep
But it's not working, only produces a file of 40 bytes in size.

Here's some info from the log:

Code: Select all

core debug: Stream buffering done (313 ms in 0 ms) core debug: using decoder module "faad" core debug: looking for encoder module matching "any": 21 candidates avcodec debug: CPU flags: 0x010053db core debug: no encoder modules matched stream_out_transcode error: cannot find audio encoder (module:any fourcc:none). Take a look few lines earlier to see possible reason. core debug: removing module "faad" stream_out_transcode error: cannot create audio chain core error: cannot create packetizer output (mp4a) core debug: Decoder wait done in 222 ms core debug: adding a new sout input (sout_input:0805e718) stream_out_transcode debug: creating video transcoding from fcc=`hevc' to fcc=`h264' core debug: looking for decoder module matching "any": 43 candidates avcodec debug: CPU flags: 0x010053db avcodec debug: trying to use direct rendering avcodec debug: allowing 4 thread(s) for decoding avcodec debug: avcodec codec (MPEG-H Part2/HEVC (H.265)) started avcodec debug: using frame thread mode with 4 threads core debug: using decoder module "avcodec" core debug: looking for encoder module matching "any": 21 candidates x264 debug: version x264 0.142.X x264 info: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX x264 info: profile High, level 4.0 core debug: using encoder module "x264" core debug: removing module "x264" x264 debug: framecount still in libx264 buffer: 0 packetizer_hevc error: Forbidden zero bit not null, corrupted NAL packetizer_hevc error: Forbidden zero bit not null, corrupted NAL avcodec warning: cannot decode one frame (644 bytes) avcodec warning: cannot decode one frame (327 bytes) packetizer_hevc error: Forbidden zero bit not null, corrupted NAL packetizer_hevc error: Forbidden zero bit not null, corrupted NAL packetizer_hevc error: Forbidden zero bit not null, corrupted NAL
Can VLC convert from h265 to h264 and how can I do this?

Thanks!
Scott

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Converting from h265 (HEVC) to h264

Postby Jean-Baptiste Kempf » 16 Jul 2015 14:05

There is a bug in the hevc packetizer then.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Takashi
New Cone
New Cone
Posts: 5
Joined: 09 Sep 2016 07:13

Re: Converting from h265 (HEVC) to h264

Postby Takashi » 09 Sep 2016 07:19

Has this been addressed already on the latest VLC release v2.2.4 or some workaround present now?

I'm getting this error while trying to stream h265 file over rtsp(rtsp://192.168.11.26:8554/stream)

packetizer_hevc decoder error: FOrbidden zero bit not null, corrupted NAL

Any comment's appreciated.

Takashi

Takashi
New Cone
New Cone
Posts: 5
Joined: 09 Sep 2016 07:13

Re: Converting from h265 (HEVC) to h264

Postby Takashi » 09 Sep 2016 07:36

The reverse pattern, h264 > h265(HEVC), I get a different error like this:
# I use a hardware decoder(NVIDIA GeForce GT 730) and I can view the transcoded video on my local display just fine but not delivered to the remote PC with this error and RSTP Server error 500 on wireshark. RTSP server error 500 means internal server error = something's wrong with VLC 2.2.4?
--------------------------------------------------------------------------------------
live555 error: Failed to connect with rtsp://192.168.11.26:8554/stream
core error: open of `rtsp://192.168.11.26:8554/stream' failed
core error: ES_OUT_RESET_PCR called
--------------------------------------------------------------------------------------

But I can transcode and stream H264 -> MPEG-4 just fine.

Thanks again for any comment.

Takashi

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Converting from h265 (HEVC) to h264

Postby Jean-Baptiste Kempf » 23 Sep 2016 14:12

For H265, you NEED 3.0.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ysilla
New Cone
New Cone
Posts: 2
Joined: 28 Sep 2016 12:19

Re: Converting from h265 (HEVC) to h264

Postby ysilla » 28 Sep 2016 12:31

I'm having the same issue trying to stream from h265 to basically anything (tried most output types and most major transcode options), video just doesn't work, and audio picks one track without possibility to change from the main mkv I try to play (not even the first one, the file has English + commentary, and it streams the commentary no matter what I choose). If I add sout-all option, then I get 27 Audio streams on receiver (2 on original), all blank.

Also, every single time I try to stop the streaming, then vlc crashes. Even the log file seems totally broken then, with different log lines that seem to get mixed together (without any modification):

Code: Select all

packetizer_hevc error: Forbidden zero bit not null, corrupted NAL packetizer_hevc error: Forbidden zero bit not null, corrupted NAL core error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create packetizer output (spu ) core error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create packetizer output (cspu ore) error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create pacckoreetizer output (spu ) error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create paccorek error: etizer ouctput (annot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value spu ) core error: cannot create packetizer output (spu ) core error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create packetizer output (spu )
But I like the words it invented. "pacckoreetizer", that's cute :lol:

Also tried with a few 3.0 builds, never had it working, at best I had the same result, at worst nothing at all. No streaming, no message, nothing at all, the streaming window closes and that's it.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Converting from h265 (HEVC) to h264

Postby Jean-Baptiste Kempf » 28 Sep 2016 23:18

packetizer_hevc error: Forbidden zero bit not null, corrupted NAL

This is worrying. What version of VLC?
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ysilla
New Cone
New Cone
Posts: 2
Joined: 28 Sep 2016 12:19

Re: Converting from h265 (HEVC) to h264

Postby ysilla » 29 Sep 2016 06:53

packetizer_hevc error: Forbidden zero bit not null, corrupted NAL

This is worrying. What version of VLC?
This last log was on latest stable version 2.2.4, fresh clean install after trying on a few 3.0 builds. Behaviour on 3.0 was the same though (when it did something, as sometimes starting the stream did absolutely nothing)

Edit: just tried, I can reproduce it 100% on 2.2.4

A full log :

Code: Select all

-- logger module started -- avcodec error: could not write header: Invalid argument core error: cannot continue streaming due to errors core error: cannot continue streaming due to errors packetizer_hevc error: Forbidden zero bit not null, corrupted NAL x264: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2 x264: profile High, level 4.0 packetizer_hevc error: Forbidden zero bit not null, corrupted NAL packetizer_hevc error: Forbidden zero bit not null, corrupted NAL core error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create packetizer output (spu ) core error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create packetizer output (cores error: pu cannot a)dd a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create packetizer outpcoreu error: t (cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value spu ) core error: cocannot create packetizer output (rspu ) e error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create packetizer output (spu ) core error: cannot add a new stream (unsupported while muxing to this format). You can try increasing sout-mux-caching value core error: cannot create packetizer output (spu )
The crash doesn't happen during streaming (it does stream sound, wrong channel, but not video), but as soon as I hit "stop", it crashes

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Converting from h265 (HEVC) to h264

Postby Jean-Baptiste Kempf » 29 Sep 2016 10:36

packetizer_hevc error: Forbidden zero bit not null, corrupted NAL

This means there is a bug.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Takashi
New Cone
New Cone
Posts: 5
Joined: 09 Sep 2016 07:13

Re: Converting from h265 (HEVC) to h264

Postby Takashi » 12 Oct 2016 03:52

Well, it's a big step forward in that it is now acknowledged as a bug. Any plan on fixing this for the good of VLC lovers , hopefully in in the next release ? I could put some pocket money on it :D

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Converting from h265 (HEVC) to h264

Postby Jean-Baptiste Kempf » 27 Dec 2016 11:25

Try 3.0.0 from nightly builds.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 24 guests